All Projects → zrg-team → flutter_redux

zrg-team / flutter_redux

Licence: MIT license
A Flutter Starter Application

Programming Languages

dart
5743 projects

Projects that are alternatives of or similar to flutter redux

a11yAccordion
An accessible and easy to use Accordeon widget.
Stars: ✭ 37 (+48%)
Mutual labels:  widget
Crypti
A minimal bitcoin price desktop widget
Stars: ✭ 33 (+32%)
Mutual labels:  widget
extractnet
A Dragnet that also extract author, headline, date, keywords from context
Stars: ✭ 52 (+108%)
Mutual labels:  news
File-Maker
Generate data files for Wii Channels that have the latest news, forecast data, etc.
Stars: ✭ 65 (+160%)
Mutual labels:  news
now-playing-profile
Originally created by github.com/natemoo-re, a small Spotify widget suitable for your profile! Read the "spotify-setup-guide.md" to get started
Stars: ✭ 32 (+28%)
Mutual labels:  widget
Pagination
a paging widget based on Qt
Stars: ✭ 22 (-12%)
Mutual labels:  widget
covid19.swift
🌐 Small iOS app to show some COVID-19 health, data, news and tweets
Stars: ✭ 25 (+0%)
Mutual labels:  news
termux-snippets
An integrated tool and a collection of snippets which helps in the various aspects of the terminal.
Stars: ✭ 28 (+12%)
Mutual labels:  news
range-slider
Customizable slider (range) component for JavaScript with no dependencies
Stars: ✭ 26 (+4%)
Mutual labels:  widget
handy-scroll
Handy dependency-free floating scrollbar widget
Stars: ✭ 15 (-40%)
Mutual labels:  widget
flutter plugins
Flutter插件集合,好用常用的插件.
Stars: ✭ 22 (-12%)
Mutual labels:  widget
yii2-selectize-widget
Selectize From Brian Reavis Yii2 Widget
Stars: ✭ 73 (+192%)
Mutual labels:  widget
coronastats
A simple web app which shows updates about COVID-19
Stars: ✭ 18 (-28%)
Mutual labels:  news
next-react-boilerplate
🔥 NextJS with additional tech feature like react-boilerplate. Demo >>
Stars: ✭ 20 (-20%)
Mutual labels:  redux-store
Accordion
Silky-smooth accordion widgets with no external dependencies.
Stars: ✭ 32 (+28%)
Mutual labels:  widget
material
Material Design Widgets for PySide and PyQt4
Stars: ✭ 66 (+164%)
Mutual labels:  widget
nhl-my-team-ios-widget
"NHL-MyTeam" Scriptable iOS widget 🏒
Stars: ✭ 16 (-36%)
Mutual labels:  widget
yii2-jstree-widget
jsTree tree widget for yii2
Stars: ✭ 16 (-36%)
Mutual labels:  widget
incrementally loading listview
An extension of the Flutter ListView widget for incrementally loading items upon scrolling
Stars: ✭ 172 (+588%)
Mutual labels:  widget
mithril-datepicker
Pick a date! But only if you're using Mithril. (component for Mithril.js ^v1.0)
Stars: ✭ 23 (-8%)
Mutual labels:  widget

About

Flutter_redux is a simple flutter application. It demonstrates how to implement Redux for Dart.

Redux

Redux.JS author advice : If you've got a simple app, use the simplest thing possible. In Flutter, StatefulWidget is perfect for a simple counter app.

However, say you have more complex app, such as an E-commerce app with a Shopping Cart. The Shopping Cart should appear on multiple screens in your app and should be updated by many different types of Widgets on those different screens (An "Add Item to Cart" Widget on all your Product Screens, "Remove Item from Cart" Widget on the Shopping Cart Screen, "Change quantity" Widgets, etc). Now, in this case, you could create a Testable ShoppingCart class as a Singleton or Create a Root StatefulWidget that passes the ShoppingCartDown Down Down through your widget hierarchy to the "add to cart" or "remove from cart" Widgets . Yet passing the ShoppingCart all over the place can get messy. It also means it's way harder to move that "Add to Item" button to a new location, b/c you'd need up update the Widgets throughout your app that passes the state down.

Furthermore, you'd need a way to Observe when the ShoppingCart Changes so you could rebuild your Widgets when it does (from an "Add" button to an "Added" button, as an example). One way to handle it would be to simply setState every time the ShoppingCart changes in your Root Widget, but then your whole app below the RootWidget would be required to rebuild as well! Flutter is fast, but we should be smart about what we ask Flutter to rebuild!

Project structure

  • main.dart is where navigation live and where Redux's Store is provided to the app, and also the main entry point of the app that initiliaze a new Redux's Store.
  • common:
    1. components: Flutter Widget with usage as common
    2. actions: common actions.
    3. reducers: common reducer and main app reducer.
    4. states: common state class.
    5. configs.dart: config of your application.
    6. repository.dart: common api fetch.
    7. state.dart: main state.
    8. store.dart: create redux store.
  • modules: every application make up of many module. Sample: todo application make up of user (login information, user infomation, etc), todo (list todo, temp todo, etc). It make simpler to develop and easier finding problems.
    1. components: module's View Widget
    2. containers: where Flutter's widgets are connected to Redux state
    3. state.dart: describe the object Redux's state
    4. repository.dart: api fetch
    5. reducers.dart: module reducer
    6. actions.dart: contains Redux actions that can be triggered from widgets
  • pages: Screen of your application which made up of many components of module
  • styles: your styles

Demo

download at: https://play.google.com/store/apps/details?id=com.zrgteam.tinmoi

Checkout "develop" branch

Demo 1 Demo 2 Demo 3 Demo 4

Install

  • Step 1 : flutter packages get
  • Step 2 : Create a firebase project at https://firebase.google.com/
  • Step 3 : Put firebase's project file into android/app/google-services.json and ios/Runner/GoogleService-Info.plist
  • Step 4 : Correct your admob APPLICATION_ID in android/app/src/AndroidManifest.xml

Checkout branch starter for easier setup

Donate

ethereum address: 0x46D1c53249cA6232eb7d3E046713Bc3D2Ae15BA3

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].