physics_widget 0.0.1 physics_widget: ^0.0.1 copied to clipboard
A new project related rules of physics.
This package is show container's animation using physics. this project is related on physics rules.
Features #
This package can perform using physics rules ant its gir given below.
Getting started #
This package is show container's animation using physics.
Usage #
Include short and useful examples for package users. Add longer examples
to /example
folder.
class _DraggableCardState extends State<DraggableCard>
with SingleTickerProviderStateMixin {
@override
Widget build(BuildContext context) {
return GestureDetector(
onPanStart: (details) => _controller.stop(canceled: true),
onPanUpdate: (details) => setState(
() => _dragAlignment += Alignment(
details.delta.dx / (size.width / 2),
details.delta.dy / (size.height / 2),
),
),
onPanEnd: (details) =>
_runAnimation(details.velocity.pixelsPerSecond, size),
child: Align(
alignment: _dragAlignment,
child: Card(
child: widget.child,
),
),
);
}
}
Images #
Additional information #
if you use this package you can retrieve containers which animated using physics rules.