dash 0.5.3 copy "dash: ^0.5.3" to clipboard
dash: ^0.5.3 copied to clipboard

outdated

Dash library is responsible to offer a BlocProvider pattern that cares about dispose all the streams of blocs.

example/dash_example.dart

import 'package:dash/dash.dart';

import 'provider.dart';

class Main {
  init() {
    BlocSample _bloc = Provider.of<BlocSample>();
    _bloc.load();
  }

  dispose() {
    Provider.dispose<BlocSample>();
  }
}

class BlocSample extends Bloc {
  String test = 'BlocSample';

  static BlocSample instance() => BlocSample();

  load() {
    //load initial data
  }

  @override
  dispose() {
    //close streams
  }
}
9
likes
0
pub points
82%
popularity

Publisher

unverified uploader

Dash library is responsible to offer a BlocProvider pattern that cares about dispose all the streams of blocs.

Repository (GitHub)
View/report issues

License

unknown (license)

More

Packages that depend on dash