Skip to content

Instantly share code, notes, and snippets.

@fabiomsr
Created May 1, 2019 18:57
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/4ee50d3aa2dd018bf0c04b927d9d5de1 to your computer and use it in GitHub Desktop.
Save fabiomsr/4ee50d3aa2dd018bf0c04b927d9d5de1 to your computer and use it in GitHub Desktop.
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text("ValueListenableBuilder example"),
),
body: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Text('You have pushed the button this many times:'),
CounterText(_counter)
],
),
),
floatingActionButton: FloatingActionButton(
onPressed: () => _counter.value++,
tooltip: 'Increment',
child: Icon(Icons.add),
));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment