I'm a graduate from the computer science department at Brigham Young University, UT ๐
josiahsrc / dough Goto Github PK
View Code? Open in Web Editor NEWThis package provides some widgets you can use to create a smooshy UI.
License: MIT License
This package provides some widgets you can use to create a smooshy UI.
License: MIT License
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.
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
The 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:
^
Add an analysis options file
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.
A squishy item that "comes off" when dragged somewhere else would be awesome.
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.
Dart team recommends that packages migrate to null-safety. Create/test a null safety API for dough.
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.
package:flutter/โฆ/scheduler/ticker.dart:66
#1 new Ticker
package:flutter/โฆ/scheduler/ticker.dart:68
#2 SingleTickerProviderStateMixin.createTicker
package:flutter/โฆ/widgets/ticker_provider.dart:129
#3 new AnimationController
package:flutter/โฆ/animation/animation_controller.dart:247
#4 _DoughState.initState
package:dough/dough.dart:47
#5 StatefulElement._firstBuild
package:flutter/โฆ/widgets/framework.dart:4640
#6 ComponentElement.mount
package:flutter/โฆ/widgets/framework.dart:4476
... Normal element mounting (15 frames)
#21 Element.inflateWidget
package:flutter/โฆ/widgets/framework.dart:3446
#22 MultiChildRenderObjectElement.mount
package:flutter/โฆ/widgets/framework.dart:5947
#23 Element.inflateWidget
package:flutter/โฆ/widgets/framework.dart:3446
#24 Element.updateChild
package:flutter/โฆ/widgets/framework.dart:3211
#25 ComponentElement.performRebuild
package:flutter/โฆ/widgets/framework.dart:4527
#26 StatefulElement.performRebuild
package:flutter/โฆ/widgets/framework.dart:4675
#27 Element.rebuild
package:flutter/โฆ/widgets/framework.dart:4218
#28 BuildOwner.buildScope
package:flutter/โฆ/widgets/framework.dart:2627
#29 WidgetsBinding.drawFrame
package:flutter/โฆ/widgets/binding.dart:883
#30 RendererBinding._handlePersistentFrameCallback
package:flutter/โฆ/rendering/binding.dart:284
#31 SchedulerBinding._invokeFrameCallback
package:flutter/โฆ/scheduler/binding.dart:1113
#32 SchedulerBinding.handleDrawFrame
package:flutter/โฆ/scheduler/binding.dart:1052
#33 SchedulerBinding._handleDrawFrame
package:flutter/โฆ/scheduler/binding.dart:968
#37 _invoke (dart:ui/hooks.dart:261:10)
#38 _drawFrame (dart:ui/hooks.dart:219:3)
(elided 3 frames from dart:async)
When the exception was thrown, this was the stack
#0 SingleTickerProviderStateMixin.dispose.
package:flutter/โฆ/widgets/ticker_provider.dart:142
#1 SingleTickerProviderStateMixin.dispose
package:flutter/โฆ/widgets/ticker_provider.dart:156
#2 _DoughState.dispose
package:dough/dough.dart:60
#3 StatefulElement.unmount
package:flutter/โฆ/widgets/framework.dart:4729
#4 _InactiveElements._unmount
package:flutter/โฆ/widgets/framework.dart:1922
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?
Describe the bug
Operand of null-aware operation '!' has type 'WidgetsBinding' which excludes null.
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.
Some 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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.