immutable_state 1.0.0

immutable_state #

Pub build status

🎯 A lightweight framework for UI state management in Flutter and Dart, and an alternative to Redux.

package:immutable_state can be used by itself easily, or with ready-made integrations like package:flutter_immutable_state.

Visit the homepage for documentation and info.

1.0.0 #

  • Initial release.


import 'package:immutable_state/immutable_state.dart';

void main() {
  var appState = new Immutable(
    new AppState(
      titleState: new TitleState(
        title: 'Hello!',

  var titleState =
    (state) => state.titleState,
    change: (state, titleState) => state.changeTitleState(titleState),

  // Changes propagate to the parent...
  titleState.change((state) => state.changeTitle('world'));

class AppState {
  final TitleState titleState;


  bool operator ==(other) =>
      other is AppState && other.titleState == titleState;

  AppState changeTitleState(TitleState titleState) =>
      new AppState(titleState: titleState);

class TitleState {
  final String title;


  bool operator ==(other) => other is TitleState && other.title == title;

  TitleState changeTitle(String title) => new TitleState(title: title);

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:

  immutable_state: ^1.0.0

2. Install it

You can install packages from the command line:

with pub:

$ pub get

with Flutter:

$ flutter pub get

Alternatively, your editor might support pub get or flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:

import 'package:immutable_state/immutable_state.dart';
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
Learn more about scoring.

We analyzed this package on Sep 16, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.5.0
  • pana: 0.12.21


Detected platforms: Flutter, web, other

No platform restriction found in primary library package:immutable_state/immutable_state.dart.

Maintenance suggestions

Package is getting outdated. (-22.74 points)

The package was last published 64 weeks ago.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=1.8.0 <3.0.0
Dev dependencies
test ^0.12.0