Skip to content

extrawest/slot_machine_game_prototype

Repository files navigation

Slot Machine Game

Maintenance Maintaner Ask Me Anything ! GitHub license GitHub release

PROJECT INFO

  • Slot Machine Game based on Flutter v3.3.9
  • Game is properly working on Android, iOS and WEB

Features

  • Slot machine (flutter_slot_machine package)
  • Different lotties effects based on the prize type
  • Shaders warming up

Demo

Slot Machine Game

Installing:

1) Clone this repo to your folder:

git clone https://gitlab.extrawest.com/i-training/flutter/slot_machine_game

2. Change current directory to the cloned folder:

cd slot_machine_game

3) Get packages

flutter pub get

Firebase hosting

  1. In order to add new build to Firebase hosting, follow these commands
firebase login
firebase init
  1. Choose account, then choose Hosting as an option
  2. Select Firebase project
  3. Run:
flutter build web
firebase deploy

Integration test

In order to run integration test you have to:

  1. Use test_driver located at test_driver/integration_test.dart.
  2. Add enviromental variables API_KEY(for google maps) and IS_TESTING through --dart-define
  3. (Optional) Use shader warming up to collect shaders to flutter_01.sksl.json

So, to run integration test, run the following command:

Without shaders warming up

flutter drive --driver=test_driver/integration_test.dart --target=integration_test/app_test.dart

With shaders warming up

flutter drive --profile --cache-sksl --write-sksl-on-exit flutter_01.sksl.json --driver=test_driver/integration_test.dart --target=integration_test/app_test.dart

To build release version with shaders warming up use the following:

Android

flutter build apk --bundle-sksl-path flutter_01.sksl.json

iOS

flutter build ios --bundle-sksl-path flutter_01.sksl.json

Created by Roman Ovsepian

Extrawest.com, 2022