bloc_pattern 2.0.0 copy "bloc_pattern: ^2.0.0" to clipboard
bloc_pattern: ^2.0.0 copied to clipboard

outdated

Apenas um package com bases para implantar o Bloc no seu Código.

example/lib/main.dart

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

import 'api/general_api.dart';
import 'increment/increment-controller.dart';
import 'increment/decrement-controller.dart';
import 'increment/increment-widget.dart';

void main() => runApp(MyApp());

class MyApp extends StatelessWidget {
  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return BlocProvider(
      child: MaterialApp(
        home: IncrementWidget(),
      ),
      blocs: [
        Bloc(() => IncrementController()),
        Bloc(() => DecrementController())
      ],
      dependencies: [
        Dependency((i) => GeneralApi(i['name']), singleton: true),
      ],
    );
  }
}
97
likes
0
pub points
91%
popularity

Publisher

verified publisherflutterando.com.br

Apenas um package com bases para implantar o Bloc no seu Código.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter

More

Packages that depend on bloc_pattern