mirror of
https://github.com/flame-engine/flame.git
synced 2025-11-02 20:13:50 +08:00
chore: Fix Flutter 3.29.0 analyzer issues (#3492)
Fixes the analyze issues that the new flutter version triggered on.
This commit is contained in:
@ -1,12 +1,13 @@
|
||||
import 'dart:html'; // ignore: avoid_web_libraries_in_flutter
|
||||
import 'package:flutter/widgets.dart';
|
||||
import 'package:web/web.dart' as web;
|
||||
|
||||
import 'step2/main.dart' as step2;
|
||||
import 'step3/main.dart' as step3;
|
||||
import 'step4/main.dart' as step4;
|
||||
import 'step5/main.dart' as step5;
|
||||
|
||||
void main() {
|
||||
var page = window.location.search ?? '';
|
||||
var page = web.window.location.search;
|
||||
if (page.startsWith('?')) {
|
||||
page = page.substring(1);
|
||||
}
|
||||
|
||||
@ -11,9 +11,11 @@ dependencies:
|
||||
flame: ^1.24.0
|
||||
flutter:
|
||||
sdk: flutter
|
||||
web: ^1.1.0
|
||||
|
||||
dev_dependencies:
|
||||
flame_lint: ^1.2.1
|
||||
|
||||
flutter:
|
||||
assets:
|
||||
- assets/images/
|
||||
|
||||
@ -1,5 +1,3 @@
|
||||
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;
|
||||
@ -7,9 +5,10 @@ import 'package:tutorials_space_shooter/step3/main.dart' as step3;
|
||||
import 'package:tutorials_space_shooter/step4/main.dart' as step4;
|
||||
import 'package:tutorials_space_shooter/step5/main.dart' as step5;
|
||||
import 'package:tutorials_space_shooter/step6/main.dart' as step6;
|
||||
import 'package:web/web.dart' as web;
|
||||
|
||||
void main() {
|
||||
var page = window.location.search ?? '';
|
||||
var page = web.window.location.search;
|
||||
if (page.startsWith('?')) {
|
||||
page = page.substring(1);
|
||||
}
|
||||
@ -25,7 +24,7 @@ void main() {
|
||||
Directionality(
|
||||
textDirection: TextDirection.ltr,
|
||||
child: Text('''Error: unknown page. Pass "step{1,6}" as a GET param;
|
||||
e.g: ${window.location}?step1'''),
|
||||
e.g: ${web.window.location}?step1'''),
|
||||
),
|
||||
),
|
||||
};
|
||||
|
||||
@ -13,6 +13,7 @@ dependencies:
|
||||
flame: ^1.24.0
|
||||
flutter:
|
||||
sdk: flutter
|
||||
web: ^1.1.0
|
||||
|
||||
dev_dependencies:
|
||||
flame_lint: ^1.2.1
|
||||
|
||||
Reference in New Issue
Block a user