Building a List in Redux with Dart's Flutter Framework

in #utopian-io7 years ago (edited)

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

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



Posted on Utopian.io - Rewarding Open Source Contributors

Sort:  

Thank you for the contribution. It has been approved.

You can contact us on Discord.
[utopian-moderator]

Thanks again for moderating my contributions.

Hey @redart, I just gave you a tip for your hard work on moderation. Upvote this comment to support the utopian moderators and increase your future rewards!

Hey @tensor I am @utopian-io. I have just upvoted you!

Achievements

  • You have less than 500 followers. Just gave you a gift to help you succeed!
  • Seems like you contribute quite often. AMAZING!

Community-Driven Witness!

I am the first and only Steem Community-Driven Witness. Participate on Discord. Lets GROW TOGETHER!

mooncryption-utopian-witness-gif

Up-vote this comment to grow my power and help Open Source contributions like this one. Want to chat? Join me on Discord https://discord.gg/Pc8HG9x

Great Post @tensor, I See & Enjoyed. Thanks For Sharing. Don't Forget To Check The Best Post Of @worktrades


>*"Because Appreciating Some People & Their Creativity, That Is Same As Appreciate The Sweat Of Them"*

Leaving comments asking for votes, follows, or other self promotional messages could be seen as spam.

Your Reputation Could be a Tasty Snack with the Wrong Comment!

Thank You! ⚜

It is spam and that comment was from a bot. I know because it was posted almost 10 seconds after I posted my original blog post.

Sorry this not spam dude. if you don't like my coment, leave me, don't click downvote. I just try to be a good person here. Because i thing, when i Appreciating Some People & Their Creativity, That Is Same As Appreciate The Sweat Of Them. Plus leave your downvote @tensor i'm not a robot

Your comment appeared on my post about 10 seconds after I posted it. I'm sorry but that isn't human and if it is, then you are just going around blindly commenting on people's posts. Either way, the downvote stays.

Also, all I have to do is look at your comment history to verify that it is in fact spam. You have been spamming the exact same comment onto many other blog posts. If you want to actually use this platform properly then don't do that.

Cause my home setting is New. Cause that reason i can see new post any second. Please unpluge your downvote or i will report you to @good-karma with his Telegram

Coin Marketplace

STEEM 0.27
TRX 0.25
JST 0.039
BTC 96923.38
ETH 3370.74
USDT 1.00
SBD 3.55