Skip to content

Instantly share code, notes, and snippets.

@marcossevilla
Last active February 17, 2021 17:06
Show Gist options
  • Save marcossevilla/611871bab3934a201625fe507982f32e to your computer and use it in GitHub Desktop.
Save marcossevilla/611871bab3934a201625fe507982f32e to your computer and use it in GitHub Desktop.
class WidgetToShowNames extends ConsumerWidget {
@override
Widget build(BuildContext context, ScopedReader watch) {
final names = watch(namesNotifier.state);
return ListView.builder(
itemCount: names.length,
itemBuilder: (_, index) {
final name = names[index];
return Text(name);
}
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment