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/37760898edbce7f0b01a22c2e828b87a to your computer and use it in GitHub Desktop.
Save fabiomsr/37760898edbce7f0b01a22c2e828b87a to your computer and use it in GitHub Desktop.
static ValueListenable<int> of(BuildContext context) {
return (context.inheritFromWidgetOfExactType(CounterListenableProvider)
as CounterListenableProvider)
.counter;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment