added ensureInitialized call on examples that were not working without it

This commit is contained in:
Flavio Diez
2020-05-20 17:17:46 +02:00
parent d8c2e37244
commit 433bcf03cd
7 changed files with 22 additions and 15 deletions

View File

@ -11,6 +11,7 @@ import 'package:flutter/gestures.dart';
import 'package:flutter/material.dart';
void main() async {
WidgetsFlutterBinding.ensureInitialized();
final Size size = await Flame.util.initialDimensions();
final MyGame game = MyGame(size);
runApp(game.widget);