bloc_ext 1.3.0 copy "bloc_ext: ^1.3.0" to clipboard
bloc_ext: ^1.3.0 copied to clipboard

An extension package for bloc Cubit - actions, effects, communications among cubits, rxDart.

example/lib/main.dart

import 'package:example/states/counter.dart';
import 'package:flutter/material.dart';
import 'package:get/instance_manager.dart';
import 'package:get/route_manager.dart';

import './states/todo.dart';
import './pages/counterPage.dart';
import './pages/todoPage.dart';
import './states/searchCategory.dart';

void main() {
  runApp(GetMaterialApp(
    smartManagement: SmartManagement.keepFactory,
    debugShowCheckedModeBanner: false,
    getPages: [
      GetPage(
          name: '',
          page: () => CounterPage(),
          binding: BindingsBuilder(() {
            Get.lazyPut(() => CounterState());
          })),
      GetPage(
          name: '/todo',
          page: () => TodoPage(),
          transition: Transition.zoom,
          binding: BindingsBuilder(() {
            Get.put<TodoState>(TodoState(), permanent: true);
            Get.put<SearchCategoryState>(SearchCategoryState(),
                permanent: true);
          }))
    ],
    initialRoute: '',

    ///home: CounterPage(),
  ));
}
0
likes
130
pub points
0%
popularity

Publisher

unverified uploader

An extension package for bloc Cubit - actions, effects, communications among cubits, rxDart.

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-2-Clause (LICENSE)

Dependencies

bloc, meta, rxdart

More

Packages that depend on bloc_ext