Closed laszlo-galosi closed 5 years ago
Hey @laszlo-galosi
Thanks for the feature request - it seems like a good improvement to add into library. I'll ping you back at the end of the week, but have already some working prototype locally (so that's definitely possible to implement). Stay tuned :)
My initial idea is to expose some basic API by GlobalKey
, so placing Scratcher would look like this:
final key = GlobalKey<ScratcherState>();
Scratcher(key: key, ...);
// ...
RaisedButton(
child: const Text('Reset'),
onPressed: () => key.currentState.reset(),
)
@laszlo-galosi The programatic access to scratcher widget just landed in version 1.2.0. It's available on https://pub.dev/packages/scratcher :)
Hi!
Great widget, great work. It would be useful feature, that the widget can reset itself to the default state, so revealed percent is 0, maybe with a defaultState property or something like that, when the points are cleared.
Thanks, Laszlo.