easystate 0.0.8 copy "easystate: ^0.0.8" to clipboard
easystate: ^0.0.8 copied to clipboard

outdated

EasyState is the simplest and the easiest state management for Flutter.

Easystate #

EasyState easiest and simplest Flutter state manager library for beginners.

It is not the perfect state manager but will give you great understanding learn what state management is.

Installation #

Add EasyState to your pubspec.yaml file:

dependencies:
  easystate:

then, import it

import 'package:get/get.dart';

Examples #

  • Define your model
class CountModel extends EasyState {
  int value = 0;
  increase() {
    value ++;
    update();
  }
}
CountModel countModel = CountModel();
  • And consume it with StreamBuidler.
StreamBuilder(
  stream: countModel.stream,
  builder: (context, snapshot) => Text(
    snapshot.data != null ? snapshot.data.value.toString() : '0',
    style: Theme.of(context).textTheme.headline4,
  ),
),

Reference #

3
likes
0
pub points
0%
popularity

Publisher

verified publishersonub.com

EasyState is the simplest and the easiest state management for Flutter.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

flutter, rxdart

More

Packages that depend on easystate