A simple library to add simple fun games to your app
- 2 Ball Game
- 3 Ball Game
- 4 Ball Game
- 8 Ball Game
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
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,);
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
));
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.




