physics_widget 0.0.2 copy "physics_widget: ^0.0.2" to clipboard
physics_widget: ^0.0.2 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.

20
likes
140
pub points
0%
popularity

Publisher

unverified uploader

A new project related rules of physics.

Homepage

Documentation

API reference

License

BSD-3-Clause (LICENSE)

Dependencies

flutter, particles_flutter

More

Packages that depend on physics_widget