upstate 0.6.5

  • Readme
  • Changelog
  • Example
  • Installing
  • 70

upstate #

Upstate is a state management library for Flutter that is meant to be much simpler to use than existing solutions and yet provide advanced functionality and extensibility as your app scales. Like Flutter itself, it provides a continous workflow from the prototyping stage all the way to production without having to switch tools. It is also great for new developers.

Installation #

To use Upstate, add it to your dependencies in your pubspec.yaml file:


Usage #

To get started quickly check out the examples.

For more information check out my Medium articles:

  1. Introduction
  2. Behind the Scenes
  3. Type Safety
  4. Custom State Objects

And the API documentation

Upstate exposes many low level API's that can be mixed and matched to do lots of different things that I don't have the time to go into in detail. If you're wondering if you can do something specific, you probably can. Just submit an issue about it and I will get back to you asap.

[0.6.5] - Minor improvements #

  • Each state element now has a reference to the root state element.
  • State values will only notify listeners if the new value is different than the old one.

[0.6.4] - added ability to change state value without notifying parents #

To set a state value without notifying parents: stateVal.quietSet(newVal);

[0.6.3] - added ability to change state value without notifying listeners #

To set a state value without notifying listeners: stateVal.silentSet(newVal);

[0.6.2] - Added homepage #

[0.6.1] - Added api docs and more flexibility for type safety #

[0.6.0] - Added ability for custom state objects plus first breaking change #

First breaking change: StateBuilder no longer has a child argument. Passing a child to a builder is used in cases where high performance is needed in the case that the builder is being called on every frame for example. Instead of doing this, consider storing a stream in upstate and use a stream builder.

For more information on custom state objects see this article

[0.5.2] - Added option for complete type safety #

[0.5.1] - updated readme and small changes to enable state models #

[0.5.0] - initial beta release #


import 'package:flutter/material.dart';
import 'custom_state_object_example.dart';
import 'package:upstate/upstate.dart';

void main() {
    state: StateObject({'counter': 0}), 
    child: MyApp()));

Use this package as a library

1. Depend on it

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

  upstate: ^0.6.5

2. Install it

You can install packages from the command line:

with Flutter:

$ flutter pub get

Alternatively, your editor might support 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:upstate/upstate.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 Jul 2, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.8.4
  • pana: 0.13.13
  • Flutter: 1.17.5

Analysis suggestions

Package not compatible with SDK dart

because of import path [upstate] that is in a package requiring null.

Health suggestions

Format lib/src/base.dart.

Run flutter format to format lib/src/base.dart.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.7.0 <3.0.0
flutter 0.0.0
Transitive dependencies
collection 1.14.12 1.14.13
meta 1.1.8
sky_engine 0.0.99
typed_data 1.1.6 1.2.0
vector_math 2.0.8
Dev dependencies