shut_the_box_engine 0.1.0 copy "shut_the_box_engine: ^0.1.0" to clipboard
shut_the_box_engine: ^0.1.0 copied to clipboard

Engine to build Shut The Boy Games upon.

Shut The Box Game Engine #

Features #

  • provides the logic and game-management layer to build shut the box games upon

Getting started #

add shut_the_box_engine to your pubspec.yaml

Usage #

this packages provides a gameProvider which can be used in provider patterns to access all stuff needed. let intellij show you the rest.

This is how you would create a Counter app (thats not what this package is about lol):

import 'package:shut_the_box_engine/shut_the_box_engine.dart' as E;

class GameView extends ConsumerWidget {
  final _gamep = E.gameProvider(E.Game());
  @override
  Widget build(BuildContext context, WidgetRef ref) {
    final gamep = ref.watch(_gamep); //.game;
    return Scaffold(
      body: Center(
        child: Text(gamep.game.players.length.toString()),
      ),
      floatingActionButton: FloatingActionButton(
        onPressed: () {
          ref.read(_gamep).addPlayers([E.Player()]);
        },
      ),
    );
  }
}

Additional information #

for an example see here

0
likes
90
pub points
0%
popularity

Publisher

unverified uploader

Engine to build Shut The Boy Games upon.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

Dependencies

flutter, flutter_riverpod

More

Packages that depend on shut_the_box_engine