Dough Library
Squishy widgets for Flutter.
Quick Links
Demos
Here are a few samples of the different widgets provided by this repo. You can find more information on how to use these widgets in the main Dough project.
I was messing around to achieve the realistic scaling mentioned in the README
In DraggableOverlayDoughTransformer.createDoughMatrix()
I made this change:
@override
Matrix4 createDoughMatrix() {
final adhesiveDx = delta.x * t / recipe.adhesion;
final adhesiveDy = delta.y * t / recipe.adhesion;
Matrix4 translate;
if (applyDelta) {
if (snapToTargetOnStop) {
final dx = -delta.x * (controller.isActive ? 1 : t);
final dy = -delta.y * (controller.isActive ? 1 : t);
translate = Matrix4.translationValues(
dx + adhesiveDx,
dy + adhesiveDy,
0,
)
//--- Rotate in 3 dimensions ---------------
* (Matrix4.identity()
..setEntry(3, 2, 0.01)
..rotateY(-(dx + adhesiveDx) * 0.01)
..rotateX((dy + adhesiveDy) * 0.01));
//-------------------------------------------
} else {
translate = Matrix4.translationValues(
-delta.x + adhesiveDx,
-delta.y + adhesiveDy,
0,
);
}
} else {
translate = Matrix4.translationValues(adhesiveDx, adhesiveDy, 0);
}
return translate * bendWithDeltaMatrix() * expansionMatrix();
}
Is that what you are looking for?
Hello. Am getting the above error when I pop the containing page. Am I doing something wrong?
Love the package otherwise, thanks!
════════ Exception caught by widgets library ═══════════════════════════════════ The following assertion was thrown while finalizing the widget tree: _DoughState#6945b(ticker active) was disposed with an active Ticker.
_DoughState created a Ticker via its SingleTickerProviderStateMixin, but at the time dispose() was called on the mixin, that Ticker was still active. The Ticker must be disposed before calling super.dispose().
Tickers used by AnimationControllers should be disposed by calling dispose() on the AnimationController itself. Otherwise, the ticker will leak.
The offending ticker was: Ticker(created by _DoughState#6945b(lifecycle state: created)) The stack trace when the Ticker was actually created was:
#0 new Ticker.
When the exception was thrown, this was the stack
#0 SingleTickerProviderStateMixin.dispose.
Long press Draggable, to have more control to move Dough Items inside List View
Describe the solution you'd like https://api.flutter.dev/flutter/widgets/LongPressDraggable-class.html
enhancementI have tried to do something similar to Squash effect or Jelly-like-click, using ScaleTransition and used controller.fling() to keep the current state until it is pressed.
A widget that morphs based on how a user moves their mobile device around in physical space (using gyro sensors). If a user shakes their phone to the left (or maybe tilts it to the left), a widget wrapped in the GyroDough
widget will droop left, as if it were a real piece of dough.
This applies to the DoughRecipe
class. It'd be nice if Provider
was used instead of InheritedWidget.
Use this to update the rolling sum of the gyro widget and other related functionality.
enhancement ChoreSome classes (such as DoughRecipe
and some of its fields) override equality checking manually using the ==
operator and hashcode()
override. This is prone to error as more fields are added. Replace this equality checking implementation with the equatable package equality checking implementation.
Multi-touch
This would let you pinch and squeeze the dough from two or more sides, and the dough would droop down out or pile up, away from the forces applied to it, just like real dough. Currently, attempting to pinch the dough or use multi-touch make the dough warp across the screen.
Sensors introduces platform dependency for android and iOS and does not include the mac/linux/windows platform. This is causing the package to lose pub points.
Find a way to support accelerometer functionality on mobile platforms (for GyroDough) while maintaining support for web/desktop platforms.
https://pub.dev/packages/dough/score
ChoreThe draggable dough widget feels awesome. The same concept could be applied to a ReorderableList
.
A possible implementation would be:
DraggableDough
, the list item will appear to stick to its slot. Once a drag threshold is met, the list item will elastically snap to the user's finger and will be freely movable/reorderable.Similar to this feature, except for reorderable lists instead:
enhancementDictionary Flutter Application! Dictionary Flutter Application is made with Flutter and Supabase which allows user to search words and fetch the meani
Clickable Widget This Flutter plugin provides some flutter widgets having gesture handlers their don't natively have in Flutter. By default some flutt
Usage It's not a great package, just help us to code briefly, everyone can make their own easily. To use this plugin, add mixins as a dependency in yo
API Placeholder A composable, light-weight package that can be used as a placeholder whenever you need some fake data. With this package, you can get
An introduction slider has some screens that can use to describe your application. You can describe your application's title, description, logo, etc. It comes with several features.
AI-Powered Voice Assistant Flutter Radio App This is a radio app where you can ask Alan AI to play some music. Alan AI: https://voice.alan.app/MTechVi
easy_tab_controller A user-friendly TabBarController widget for flutter developer. Getting Started This project is a starting point for a Flutter plug
Responsive and Animated Portfolio Website & App - Flutter UI Live Preview Watch it on YouTube Packages we are using: flutter_svg: link goole_fonts: li
Responsive Ui Builder Getting Started The responsive ui builder package contains
flutter_custom_clippers Flutter package that provides you custom clippers to help you achieve various custom shapes. Usage To use this plugin, add flu
flutter_brick This is a mason brick you can use to generate code that gets you started right up with a flutter project A flutter brick created with th
dosdownloader Dos downloader app is developed for downloading video. You can download video from YouTube and Facebook. You can also play video on back
A flutter package which will help you to create a draggable widget that can be dragged around the screen. Demo Features ?? Manually Control the positi
flutter stories editor This is a package created in the style of the instagram s
A Flutter slidable widget that provides an easy to use configuration. Highly customisable. Just as you want it!
photo_manager Photo/Assets management APIs for Flutter without UI integration, you can get assets (image/video/audio) from Android, iOS and macOS. 提供相
Package provides light widgets [for Linkify, Clean] and extensions for strings that contain bad words/URLs/links/emails/phone numbers
Custom Refresh Indicator A flutter package that allows you to easily create a custom refresh indicator widget. TLDR; ONLINE DEMO! QUICK START CustomRe
Flutter Beginner 2 A flutter app to practice some common and important widgets Developer Alexander Sosa (https://www.linkedin.com/in/alexander-sosa-as