Skip to content

Instantly share code, notes, and snippets.

@Dev-Owl
Created November 24, 2019 14:31
Show Gist options
  • Save Dev-Owl/2bc3a7737e36cc05420f8fa340257cc6 to your computer and use it in GitHub Desktop.
Save Dev-Owl/2bc3a7737e36cc05420f8fa340257cc6 to your computer and use it in GitHub Desktop.
Main file for our mazeball
import 'package:flame/util.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:mazeball/game.dart';
import 'dart:async';
void main() async {
//Make sure flame is ready before we launch our game
await setupFlame();
var game = new MazeBallGame();
runApp(game.widget);
}
/// Setup all Flame specific parts
Future setupFlame() async {
var flameUtil = Util();
await flameUtil.fullScreen();
await flameUtil.setOrientation(DeviceOrientation.portraitUp);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment