The project is maintained by a non-profit organisation, along with an amazing collections of Flutter samples. We're trying to make continuous commits for changes along with the Flutter tech progress.
- Shows a state management approach using the Provider package,mainly use StreamProvider and ChangeNotifier.
- Show a logic for fetch data from different datasources as above graph.
Change repositories/catalog.dart
const dataSource = 'memory';
repositories/catalog.dart
A route distribution for fetching data
memory/catalog.dart
All CURD operations will be here
file/catalog.dart
Define data
Change repositories/catalog.dart
const dataSource = 'db';
You can't use cart.items.contains(item)
to compare catalog whether exists in cart,because use database reload data.Add contains
method in cart controller,and use below
cart.contains(item.id)
- Http implement
![]() |
![]() |
![]() |
Welcome Contribute With Pull Request.
For Chinese,you can read this wechat official article