Last active
April 2, 2022 05:45
-
-
Save rutvik110/c949323bee17bb1d8aa9c0c67377aa58 to your computer and use it in GitHub Desktop.
databaseprovider_itemsprovider
This file contains hidden or 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
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