Skip to content

Instantly share code, notes, and snippets.

@rutvik110
Last active April 2, 2022 05:45
Show Gist options
  • Save rutvik110/c949323bee17bb1d8aa9c0c67377aa58 to your computer and use it in GitHub Desktop.
Save rutvik110/c949323bee17bb1d8aa9c0c67377aa58 to your computer and use it in GitHub Desktop.
databaseprovider_itemsprovider
final databaseProvider = Provider<MyDatabase>( (ref) => MyDatabase());
final itemsProvider = FutureProvider<List<Item>>( (ref) async {
return ref.read(databaseProvider).fetchItems() ;
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment