What Will I Learn?
- You will learn about Redux Architecture and its relationship with the Flutter Framework
- You will learn how the Flutter Redux and Dart Redux plugins work
- You will learn how to create Middleware, Actions, Reducers, and State
- You will learn how to make use of the inherited store widgets from Flutter Redux
Requirements
- IDEA intellij or Visual Studio Code with the Dart/Flutter Plugins
- The Dart SDK and the Flutter SDK
- A fair understanding of Mobile development and Imperative or Object Oriented Programming
Difficulty
- Intermediate
Description
In this Flutter video tutorial, we build a basic list application using the Redux architecture. Redux is a very powerful pattern to use with Flutter because of how Flutter makes use of widget trees. The most popular implementation of Redux for Flutter is the Flutter Redux plugin which makes use of Flutter's inherited widgets to contextually attach pieces of the Redux architecture to the widget tree.
In this application, we have a single action which allows the user to add strings to the list of strings in our state object. We create a reducer function that allows us to specify the business logic of this action for the application to work. We then create a StoreConnector widget which connects our data store to the input box. In this way, we can make it so that when data is passed into our input box, the widget tree will automatically update. The data is then sent into the other StoreConnector widget which is a column of list tile widgets. This widget creates more list tiles every time the user inputs a new piece of data into our input box.
The entire material application widget is wrapped in a StoreProvider Widget which is what allows us to use the StoreConnector widgets to access the store from anywhere in our application. Because of the way that the input box works in this application, we also need to attach a piece of middleware to our add action. In this way, we can add a side effect to our action without breaking the purity of the reducer function. This side effect allows us to take in the input from the input box in a way that lets us serve that input to our state from our action.
The source code for this project can be found here
More info on Facebook's Redux here
Video Tutorial
Curriculum
- Dart Flutter Cross Platform Chat Application Tutorial
- Building a Multi-Page Application with Dart's Flutter Mobile Framework
- Making Http requests and Using Json in Dart's Flutter Framework
- Building Dynamic Lists with Streams in Dart's Flutter Framework
- Using GridView, Tabs, and Steppers in Dart's Flutter Framework
- Using Global Keys to get State and Validate Input in Dart's Flutter Framework
- The Basics of Animation with Dart's Flutter Framework
- Advanced Physics Based Animations in Dart's Flutter Framework
- Building a Drag and Drop Application with Dart's Flutter Framework
- Building a Hero Animation and an Application Drawer in Dart's Flutter Framework
- Building a Temperature Conversion Application using Dart's Flutter Framework
- Using Inherited Widgets and Gesture Detectors in Dart's Flutter Framework
- Using Gradients, Fractional Offsets, Page Views and Other Widgets in Dart's Flutter Framework
- Building a Calculator Layout using Dart's Flutter Framework
- Finishing our Calculator Application with Dart's Flutter Framework
- Making use of Shared Preferences, Flex Widgets and Dismissibles with Dart's Flutter framework
- Using the Different Style Widgets and Properties in Dart's Flutter Framework
- Composing Animations and Chaining Animations in Dart's Flutter Framework
- Building a Countdown Timer with a Custom Painter and Animations in Dart's Flutter Framework
- Reading and Writing Data and Files with Path Provider using Dart's Flutter Framework
- Exploring Webviews and the Url Launcher Plugin in Dart's Flutter Framework
- Building a Movie Searcher with RxDart and SQLite in Dart's Flutter Framework (Part 1)
- Building a Movie Searcher with RxDart and SQLite in Dart's Flutter Framework (Part 2)
- Building a Movie Searcher with RxDart and SQLite in Dart's Flutter Framework (Part 3, Final)
- Adding a Real-time Database to a Flutter application with Firebase
Posted on Utopian.io - Rewarding Open Source Contributors