A reference app in flutter using the BLoC pattern.

Overview

flutter_dice

A sample Flutter app that shows how to manage responsive state using the provider pattern.

Screenshot Screenshot

Concepts Illustrated

Provider pattern

  • Using a provider for global app state (i.e. Theme)
  • Using a provider as a view model for a screen
  • Using an MultiProvider to make the providers accessible
  • Using ChangeNotifierProvider<T> to make the app responsive
  • Consumption of providers using Provider.of<T>(context) method

Persistence

  • App and screen state saves when changed and is loaded on startup
  • An instrance of SharedPreferences is creeated globally as a singleton
  • Providers are able to save and load their own state

Dynamic Theme

  • Can change between light and dark theme.
  • Implemented as a provider.
You might also like...

News app in Flutter with BLOC pattern

News app in Flutter with BLOC pattern

NewsApp News app in Flutter with BLOC pattern This example uses a CustomScrollView, JSON Rest API, BottonNavigationBar,SliverList, ClipRRect, Card, Pr

Dec 25, 2022

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

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

The project is maintained by a non-profit organisation, along with an amazing collections of Flutter samples. We're trying to make continuous commits

Nov 10, 2022

Small Flutter app / social network / bloc pattern

azapp A new Flutter project. Getting Started This project is a starting point for a Flutter application. A few resources to get you started if this is

Jun 9, 2022

Bloc Pattern based weather app.

flutter_weather_app A new Flutter project. Getting Started This project is a starting point for a Flutter application. A few resources to get you star

Dec 29, 2021

A simple pair game made with Flutter, a custom library, BLoC and tunnel pattern.

A simple pair game made with Flutter, a custom library, BLoC and tunnel pattern.

Pair game A simple pair game created with Flutter. Article on Medium here: https://medium.com/@frmineoapps/a-simple-pair-game-made-with-flutter-a-cust

Jun 28, 2022

Demonstrates BLoC pattern in Flutter

Demonstrates BLoC pattern in Flutter

bloc_test A real-world example of using the BLoC pattern in Flutter. This app features a searchable list of users and demonstrates an elegant way to k

Jul 1, 2019

Clonning TIX ID with flutter with BLoC Pattern and RxDart

Clonning TIX ID with flutter with BLoC Pattern and RxDart

tix_app Cloning TIX ID in Flutter (Currently design only, next i will grab the movies from IMDB api for free) Feature Movies Movies Detail Ticket List

Aug 23, 2021

Flutter web example with Firebase Authentication, Firestore Collection, BloC Pattern

flutter_auth_web Flutter Firebase auth. Getting Started This project is a starting point for a Flutter application. A few resources to get you started

Feb 26, 2022

Breaking-bad - Used Flutter with BLoC pattern to show some info

Breaking-bad - Used Flutter with BLoC pattern to show some info

πŸ“˜ Overview Used Flutter with BLoC pattern to show some info. about my favorite

Dec 10, 2022
Comments
  • State saving with stream subscription

    State saving with stream subscription

    What if state was saved on stream's new value for each stream in the bloc? This might mean no need to saveState() manually for each logic function and a more reliable auto saving mechanism, of course with the possibility to implement that only for the streams you need to save on every data change.

    I'm also curious about your choice to await for every saveState() in the logic functions, if this is aimed to handle errors in a Future callback maybe there would be cases in which might work better to separate the logic action ( whose result might be handled even if the state saving fails ) from the saving state process, handling errors thrown by the latter in the stream subscription as well.

    I've implemented a use case of what exaplained above, looking forward for your opinion.

    opened by darioielardi 0
Owner
CodeGrue
Technologist, Hobbyist, Gamer, Author
CodeGrue
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
A reference credential wallet built on Flutter and DIDKit.

Check out the Credible documentation here. Credible Credible is a native mobile wallet that supports W3C Verifiable Credentials and Decentralized Iden

Spruce Systems, Inc. 31 Nov 7, 2022
The reference implementation of Sass, written in Dart.

A Dart implementation of Sass. Sass makes CSS fun again. Using Dart Sass From Chocolatey or Scoop (Windows) From Homebrew (macOS) Standalone From npm

Sass 3.4k Jan 5, 2023
A Dart package which simulates pass by reference feature

Reference Wrapper is a Dart package which simulates pass by reference feature us

null 0 Dec 19, 2021
An address search field which helps to autocomplete an address by a reference

Address Search Field Widget builders to create 'address search widgets' which helps to autocomplete an address using a reference. They can be used to

Jose Luna 13 Aug 14, 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
Easy Form State Management using BLoC pattern

?? Dart and Flutter Package ?? Easy Form State Management using BLoC pattern ?? Wizard/stepper forms, asynchronous validation, dynamic and conditional fields, submission progress, serialization and more! ??

GiancarloCode 406 Jan 8, 2023
A simple application connected with API (The Movie Database), related to movies. Application created using BLoC pattern and RxDart

MovieApp I will not hide that this is the most difficult application I have done so far (and I am still working on new features). It looks like this (

Adam Dybcio 9 Oct 28, 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

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

kw101 678 Jan 8, 2023