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:
enhancementflutter_tags Create beautiful tags quickly and easily. Installing Add this to your package's pubspec.yaml file: dependencies: flutter_tags: "^0.4.9+
Flutter widgets you haven't used yet. Problems that proximity solves Currently, Flutter has a lot of useful pre-built widgets, no, too many widgets. T
This Dart package offers developers a streamlined library of Flutter widgets, useful for expanding widgets and text views, when users interact with them.
A flutter package to display a country, states, and cities. In addition it gives the possibility to select a list of countries, States and Cities depends on Selected, also you can search country, state, and city all around the world.
emoji_picker_flutter Yet another Emoji Picker for Flutter ?? Note: This package is based on emoji_picker which has been deprecated and not maintained
مثالهای پر استفاده فلاتر این ریپازیتوری شامل مثالهایی از استراتژیهای مورد نیاز و پرتکرار در توسعه اپلیکیشنها است. سعی شده است که در هر مثال به صور
vector_tile_renderer A vector tile renderer for use in creating map tile images or writing to a canvas. Written in Dart to enable use of vector tiles
Fluid layout aims to help building a responsive experience through all the different screen sizes. Based in the boostrap approach, FluidLayout calculates a padding content (fluid_padding) that changes depending on the parent size. The Fluid widget uses that padding to set its size
Flutter TypeAhead A TypeAhead (autocomplete) widget for Flutter, where you can show suggestions to users as they type Features Shows suggestions in an
Awesome Card A flutter package to create a Credit Card widget in your application. Stay tuned for the latest updates: ?? Screenshots ⚙️ Installation I
resizable_widget ResizableWidget enables users to resize the internal widgets by dragging. This package contains simple APIs, but if needed, you can c
A powerful & easy to use timeline package for Flutter! ?? Caveat: This package is an early stage. Not enough testing has been done to guarantee stabil
flutter_beautiful_popup 中文 A flutter package to help you beautify your app popup, can be used in all platform.Live Demo. Preview: Getting Started Add
Create mobile game store design using Flutter
On this Marketplace Design has two pages one for the product page which has a horizontal list of categories then a list of our products. Then on the details page, it shows the price, rating, total view, and description of the product with the Buy Now button.
Virtual Reality Store App Getting Started This a fluttet mobile application UI. that create for Virtual Reality Store. The app code is preloaded with
MOvApps (Flutter Project) Hi everybody. How are you guys? May you always be in good health and of course always be blessed by God! I want to showcase
Responsive Sizer Responsive Sizer helps implement a responsive layout by providing helper widgets and extensions Content Installation Parameters Take
flutter_scroll_to_top A wrapper to show a scroll to top prompt to the user on scrollable widgets. Installing Add the following dependency to your pubs