Skip to content

johnebere58/gameplugin

Repository files navigation

Game Plugin

CI

A simple library to add simple fun games to your app

  • 2 Ball Game
  • 3 Ball Game
  • 4 Ball Game
  • 8 Ball Game

Installation

To add this code snippet to your pubspec.yaml file.

dependencies:
  flutter:
    sdk: flutter

gameplugin:
  git:
    url: git://github.com/johnebere58/gameplugin.git
    ref: master # branch name

Get Started

Add this following to the initState method of your widget Instantiate the game instance by call GameManager.initialize()

  @override
  void initState() {
    GameManager.initialize();
    super.initState();
  }

Then commence the game by calling

  GameManager().launchGame(context,);

Optional

You can choose to launch game with custom settings by adding gameSettings

  GameManager()
        .launchGame(context,
                gameSettings: GameSettings(
                  ballCount: BallCount.four,
                  ballShape: BallShape.circle,
                  ballSize: 50.0,
                  gameSpeed: GameSpeed.normal
                ));

Buy Me A Coffee

Getting Started

This project is a starting point for a Flutter plug-in package, a specialized package that includes platform-specific implementation code for Android and/or iOS.

For help getting started with Flutter development, view the online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.

About

A plugin the add simple games to your app

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published