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

20
likes
130
pub points
20%
popularity

Publisher

unverified uploader

A new project related rules of physics.

Homepage
Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

flutter, particles_flutter

More

Packages that depend on physics_widget