Buy Flutter100 Ebook on

State Management Crash Course Flutter

State Management Crash Course Flutter

State Management in Flutter is a hot topic. Let's learn how to use Provider & VxState to manage state inside your app.

If you’re coming to Flutter from an imperative framework (such as Android SDK or iOS UIKit), you need to start thinking about app development from a new perspective.

Many assumptions that you might have don’t apply to Flutter. For example, in Flutter it’s okay to rebuild parts of your UI from scratch instead of modifying it. Flutter is fast enough to do that, even on every frame if needed.

Flutter is declarative. This means that Flutter builds its user interface to reflect the current state of your app:

A mathematical formula of UI = f(state). 'UI' is the layout on the screen. 'f' is your build methods. 'state' is the application state.

When the state of your app changes (for example, the user flips a switch in the settings screen), you change the state, and that triggers a redraw of the user interface. There is no imperative changing of the UI itself (like widget.setText)—you change the state, and the UI rebuilds from scratch.

The declarative style of UI programming has many benefits. Remarkably, there is only one code path for any state of the UI. You describe what the UI should look like for any given state, once—and that is it.

App Overview

Source Code

iampawan/CDPSM
Contribute to iampawan/CDPSM development by creating an account on GitHub.

State Management with Provider

Docs

provider | Flutter Package
provider - A wrapper around InheritedWidget to make them easier to use and more reusable.

Source Code

iampawan/CDPSM
Contribute to iampawan/CDPSM development by creating an account on GitHub.

Articles by Codepur

Using Selector in Provider
This article shows how to use selector in provider. Selector is one of the widgets inside provider package. We see here how to use selector in form

State Management with VxState

Docs

Getting Started | VelocityX
VxState

Source Code

iampawan/CDPSM
Contribute to iampawan/CDPSM development by creating an account on GitHub.
Great! Next, complete checkout for full access to Codepur.
Welcome back! You've successfully signed in.
You've successfully subscribed to Codepur.
Success! Your account is fully activated, you now have access to all content.
Success! Your billing info has been updated.
Your billing was not updated.