bloc_storage 1.0.1 copy "bloc_storage: ^1.0.1" to clipboard
bloc_storage: ^1.0.1 copied to clipboard

A package for storing and retrieving BLoC instances globally.

Bloc Storage #

A lightweight package for storing and retrieving BLoC instances globally

  1. Easy storage of BLoC instances
  2. Easy retrieval of BLoC instances
  3. Clear specific or all stored BLoC instances

Basics #

Syntax #

To initiate a store , call the BlocStorage.store method, and pass the required bloc:

    BlocStorage.store<AuthBloc>(
      context.read<AuthBloc>()
    );

To retrieve a stored bloc, call the BlocStorage.retrieve method, and specify the required bloc

    BlocStorage.retrieve<AuthBloc>();

To clear a stored bloc, call the BlocStorage.clear method, and specify the required bloc

    BlocStorage.clear<AuthBloc>();

To clear all stored bloc, call the BlocStorage.clearAll method, and specify the required bloc

    BlocStorage.clearAll();

Installation #

Grab it from pub.dev.

1
likes
0
points
40
downloads

Publisher

unverified uploader

Weekly Downloads

A package for storing and retrieving BLoC instances globally.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

bloc, cupertino_icons, flutter

More

Packages that depend on bloc_storage