Created
May 1, 2019 18:56
-
-
Save fabiomsr/938cefc167a972f0e03f99194bd40d5d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class CounterText extends StatelessWidget { | |
final ValueListenable<int> _counter; | |
CounterText(this._counter); | |
@override | |
Widget build(BuildContext context) { | |
return ValueListenableBuilder<int>( | |
valueListenable: _counter, | |
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