import 'package:snappable/snappable.dart';
@override Widget build(BuildContext context) { return Snappable( child: Text('This will be snapped'), ); }
class MyWidget extends StatelessWidget { final key = GlobalKey<SnappableState>(); @override Widget build(BuildContext context) { return Snappable( key: key, child: Text('This will be snapped'), ); } void snap() { key.currentState.snap(); } }
currentState.reset()
.
class MyWidget extends StatelessWidget { @override Widget build(BuildContext context) { return Snappable( snapOntap: true, child: Text('This will be snapped'), ); } }
Android Studio Setup Open Android Studio and select Configure->Plugins 2. Click Browse repositories… ...