bonfire_bloc 0.0.2 copy "bonfire_bloc: ^0.0.2" to clipboard
bonfire_bloc: ^0.0.2 copied to clipboard

Integration for the Bloc state management library to Bonfire games.

example/lib/main.dart

import 'package:bonfire_bloc_example/bloc/inventory_bloc.dart';
import 'package:bonfire_bloc_example/game/game.dart';
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return BlocProvider(
      create: (context) => InventoryBloc(),
      child: MaterialApp(
        title: 'Flutter Demo',
        theme: ThemeData(
          colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
          useMaterial3: true,
        ),
        home: const GameWidget(),
      ),
    );
  }
}
0
likes
150
pub points
51%
popularity

Publisher

unverified uploader

Integration for the Bloc state management library to Bonfire games.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

Dependencies

bonfire, flutter, flutter_bloc

More

Packages that depend on bonfire_bloc