Skip to content

Instantly share code, notes, and snippets.

@fabiomsr
Created May 1, 2019 18:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fabiomsr/c972950dcb6ea1481faf365903dbbe9f to your computer and use it in GitHub Desktop.
Save fabiomsr/c972950dcb6ea1481faf365903dbbe9f to your computer and use it in GitHub Desktop.
class CounterText extends StatelessWidget {
@override
Widget build(BuildContext context) {
return ValueListenableBuilder<int>(
valueListenable: CounterListenableProvider.of(context),
builder: (context, value, child) {
return new Text(value.toString());
});
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment