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:
Lukas Klingsbo
2025-02-13 11:40:14 +01:00
committed by GitHub
parent bac68dcbb9
commit 9f54a698d2
13 changed files with 22 additions and 20 deletions

View File

@ -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);
}

View File

@ -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/

View File

@ -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'''),
),
),
};

View File

@ -13,6 +13,7 @@ dependencies:
flame: ^1.24.0
flutter:
sdk: flutter
web: ^1.1.0
dev_dependencies:
flame_lint: ^1.2.1