A shopper Flutter app that use BloC pattern and CRUD operations with different ways | Flutter Bloc Crud

flutter, flutter bloc crud, flutter and bloc crud, flutter crud bloc, flutter bloc crud example

A Flutter application that uses flutter bloc crud opperations

The project is maintained by a non-profit organization, along with an amazing collection of Flutter samples. We’re trying to make continuous commits for changes along with the Flutter tech progress.

The Desigin Pattern

Design Pattern

Goals for this sample

  • 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.

Memory fetch data

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

Sqlite fetch data

Change repositories/catalog.dart

const dataSource = 'db';

Notice

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)

Todo

  • Http implement

Screen Shots

Welcome Contribute With Pull Request.


For Chinese,you can read this wechat official article


About

微信公众号

Tags: flutter bloc crud, flutter bloc api call, flutter bloc pattern example, flutter bloc template, flutter bloc sample project, flutter bloc post request flutter bloc 8 tutorial, flutter crud, bloc pattern in flutter, flutter crud example with flutter bloc library, flutter bloc crud example, flutter bloc crud github, flutter bloc crud api

5/5 (2 votes)
Share to:
Scroll to Top