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

outdated

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

Easystate #

EasyState is the easiest and the simplest Flutter state manager library for beginners.

This is not the perfect state manager, but will give you great understanding about 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 #

4
likes
0
pub points
34%
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