Files
Munsterlander 2a3b8998bf docs: Space Shooter Tutorial Migrated (#2135)
As discussed previously, this PR moves the Space Shooter Tutorial to the tutorials folder for direct inclusion in the docs. A few things to note, other than basic grammar and formatting, nothing was changed other than migrating the information to the current tutorial format. This should allow the tutorials.flame-engine.org subdomain to be deleted.

Note: Upon moving this tutorial, I discovered it is incomplete and missing the majority of the game.

Also, I realized that I left the android folder and some files that weren't necessary for the platform tutorial and have deleted those.
2022-11-04 13:26:24 +01:00

30 lines
660 B
Dart

import 'dart:html'; // ignore: avoid_web_libraries_in_flutter
import 'package:flutter/widgets.dart';
import 'package:tutorials_space_shooter/step1/main.dart' as step1;
import 'package:tutorials_space_shooter/step2/main.dart' as step2;
void main() {
var page = window.location.search ?? '';
if (page.startsWith('?')) {
page = page.substring(1);
}
switch (page) {
case 'step1':
step1.main();
break;
case 'step2':
step2.main();
break;
default:
runApp(
Directionality(
textDirection: TextDirection.ltr,
child: Text('Error: unknown page name "$page"'),
),
);
}
}