agility_redux_bloc 0.0.46
agility_redux_bloc: ^0.0.46 copied to clipboard

Agility Redux is a modular, pluggable Redux state management library.

example/lib/main.dart

import 'package:agility_redux_bloc/agility_redux_bloc.dart';
import 'package:flutter/material.dart';

import 'counter_bloc/counter_bloc.dart';

void main() {
  GlobalNavigator().addGlobalNavigator('page');
  GlobalNavigator().addGlobalNavigator('popupBox');
  GlobalNavigator().addGlobalNavigator('innerPage');

  BlocManager().registerBloc(CounterBloc());

  BlocManager().initStore();

  runApp(MyApp());
}

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        primarySwatch: Colors.blue,
        visualDensity: VisualDensity.adaptivePlatformDensity,
      ),
      home: LayoutBuilder(
        builder: (BuildContext context, BoxConstraints constraints) {
          print('build ${constraints.maxWidth}');
          double padding = (constraints.maxWidth - 1000) / 2.0;
          print('padding: $padding');
          return Container(
            color: Colors.red,
            child: AppNavigator(
              initialPage: 'counter/menu_page',
              pageNavigatorName: 'page',
              popupBoxNavigatorName: 'popupBox',
              width: 600,
            ),
          );
        },
      ),
    );
  }
}
0
likes
95
pub points
73%
popularity

Publisher

songfei.org

Agility Redux is a modular, pluggable Redux state management library.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

Dependencies

agility_redux, agility_redux_widget, crypto, flutter, logging

More

Packages that depend on agility_redux_bloc