A shopper Flutter app that use BloC pattern and CRUD operations with different ways(memory/sqlite/http)

Overview

Flutter Samples

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.

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

Screen Shots Screen Shots Screen Shots

Welcome Contribute With Pull Request.


For Chinese,you can read this wechat official article


About

微信公众号

You might also like...

Charlatan - A library for configuring and providing fake http responses to your dio HTTP client.

charlatan This package provides the ability to configure and return fake HTTP responses from your Dio HTTP Client. This makes it easy to test the beha

Nov 28, 2022

A mobile game using Flutter to test your reaction speed in various ways

A mobile game using Flutter to test your reaction speed in various ways

FLX Test your Reflexes! A simple mobile game built with Flutter, Provider and BLoC pattern Key Features Three different play modes! Visual mode: tap w

May 11, 2021

🍕 FoodHub App is a Flutter application built to demonstrate the use of modern development tools with best practices implementation like Provider, Sqlite, Testing, Flash Dialog, Notification, Alarm Schedule, Dark Mode Theme, etc.

🍕 FoodHub App is a Flutter application built to demonstrate the use of modern development tools with best practices implementation like Provider, Sqlite, Testing, Flash Dialog, Notification, Alarm Schedule, Dark Mode Theme, etc.

FoodHub App Features List Restaurant Detail Restaurant Restaurant Favorite Search Restaurant Schedule Notification Dark Mode Theme Quick start This is

Jul 27, 2023

A flutter plugin about qr code or bar code scan , it can scan from file、url、memory and camera qr code or bar code .Welcome to feedback your issue.

A flutter plugin about qr code or bar code scan , it can scan from file、url、memory and camera qr code or bar code .Welcome to feedback your issue.

r_scan A flutter plugin about qr code or bar code scan , it can scan from file、url、memory and camera qr code or bar code .Welcome to feedback your iss

Nov 11, 2022

A flutter library for loading images from network, resizing as per container size and caching while being memory sensitive.

Optimized Cached Image A flutter library for loading images from network, resizing and caching them for memory sensitivity. This resizes and stores th

Dec 20, 2022

System info plus - A Flutter plugin to get device Random Access Memory (RAM) size

system_info_plus A Flutter plugin to get device Random Access Memory (RAM) size.

Aug 21, 2022

A portable canvas that can work in many platforms (Flutter, Web, Desktop, in-memory Image).

pcanvas A portable canvas that can work in many platforms (Flutter, Web, Desktop, in-memory Image). Motivation Canvas operations can be highly depende

Dec 8, 2022

A starter kit for beginner learns with Bloc pattern, RxDart, sqflite, Fluro and Dio to architect a flutter project. This starter kit build an App Store app as a example

A starter kit for beginner learns with Bloc pattern, RxDart, sqflite, Fluro and Dio to architect a flutter project. This starter kit build an App Store app as a example

Flutter Starter Kit - App Store Example A starter kit for beginner learns with Bloc pattern, RxDart, sqflite, Fluro and Dio to architect a flutter pro

Jan 8, 2023

A CustomPaint example where we can draw with different colors and different stroke sizes

A CustomPaint example where we can draw with different colors and different stroke sizes

CustomPaint A CustomPaint example where we can draw with different colors and different stroke sizes. A Flutter application which runs on iOS, Android

Dec 27, 2021
Owner
Flutter Samples
Flutter Samples
Petrus Nguyễn Thái Học 193 Dec 29, 2022
A Flutter Task App with Parse (Back4app) as the backend demonstrating CRUD operations.

Siro's Task App Description A Flutter Task App with Parse (Back4app) as the backend demonstrating CRUD operations. Getx State Management Objective Thi

Jack Siro 4 Aug 27, 2022
A Flutter application that demonstrate simple CRUD operations with Firebase cloud database.

Cricket Team A Flutter application that demonstrate simple CRUD operations with Firebase cloud database. Preview Home Empty Swipe Add Player Update Pl

Bhavik Makwana 45 Jun 19, 2021
Implementing simple storage operations, CRUD (Create, Read, Update, Delete), using Firebase Firestore

CRUD Firebase Implementing simple storage operations, CRUD (Create, Read, Update

Luciano Martins 6 Oct 29, 2022
CRUD Table Flutter consists of a Lazy loading function, resizable columns, and integrated CRUD Form.

CRUD Table Flutter CRUD Table Flutter is a package for crating CURD-UI for your entity/object/class easily. It consists of a Lazy loading function, re

null 10 Dec 31, 2022
Weather app using Bloc architecture pattern & generic HTTP client with interface implementation and much more for more detail read Readme

weather Weather application for current weather, hourly forecast for 48 hours, Daily forecast for 7 days and national weather alerts. How to Run Insta

Jibran Ahmed SiddiQui 9 Oct 29, 2022
An easy-to-use flutter http network requests handler with more functionality than http but more simpler than dio.

network_requests An easy-to-use flutter http network requests handler with more functionality than http but more simpler than dio. Platform Supported

Coder_Manuel 3 Dec 15, 2022
Raden Saleh 20 Aug 12, 2023
App HTTP Client is a wrapper around the HTTP library Dio to make network requests and error handling simpler, more predictable, and less verbose.

App HTTP Client App HTTP Client is a wrapper around the HTTP library Dio to make network requests and error handling simpler, more predictable, and le

Joanna May 44 Nov 1, 2022
Flutter bloc example - An app for State management using BLoC pattern in Flutter

Flutter BLoC My first app for State management using BLoC pattern in Flutter Col

Harshil Patel 1 Jun 16, 2022