snappable

Creator: coderz1093

Last updated:

0 purchases

TODO
Add to Cart

Description:

snappable

snappable #
Thanos effect library in Flutter
Check out blog post describing the package on Fidev.
Examples #



Getting Started #
Import it #
import 'package:snappable/snappable.dart';
copied to clipboard
Wrap any widget in Snappable #
@override
Widget build(BuildContext context) {
return Snappable(
child: Text('This whill be snapped'),
);
}
copied to clipboard
Snap with a Key

class MyWidget extends StatelessWidget {
final key = GlobalKey<SnappableState>();
@override
Widget build(BuildContext context) {
return Snappable(
key: key,
child: Text('This whill be snapped'),
);
}

void snap() {
key.currentState.snap();
}
}
copied to clipboard
Undo by currentState.reset().
or snap by tap

class MyWidget extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Snappable(
snapOntap: true,
child: Text('This whill be snapped'),
);
}
}
copied to clipboard
Undo by tapping again.

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.