Closed kavi6024 closed 1 year ago
It seems we haven't updated the Flutter constraints of Flame but since the latest Flame version we dont support Flutter 3.10 anymore because Flutter introduced a breaking change: https://docs.flutter.dev/release/breaking-changes/add-applifecyclestate-hidden
Any way to change the AppLifecycleState enum, or to implement it maunally ? Or, is there any update coming up on Flame ?
Any way to change the AppLifecycleState enum, or to implement it maunally ? Or, is there any update coming up on Flame ?
Can't you just update your Flutter version? In the next release we'll update the constraints.
This is the first time I am working with the Flame framework, and following the tutorial provided on Bare Flame game, I have this code.
`import 'package:flame/game.dart'; import 'package:flutter/widgets.dart';
void main() { final game = FlameGame(); runApp(GameWidget(game: game)); }`
Current bug behavior
This is the behaviour of the program when I run it. (M2101K7BI is my physical device's name)
`Launching lib\main.dart on M2101K7BI in debug mode... Running Gradle task 'assembleDebug'... ../../../../AppData/Local/Pub/Cache/hosted/pub.dev/flame-1.9.1/lib/src/game/flame_game.dart:279:30: Error: Member not found: 'hidden'. case AppLifecycleState.hidden: ^^^^^^ Target kernel_snapshot failed: Exception
FAILURE: Build failed with an exception.
Where: Script 'C:\Users\user\Flutter\packages\flutter_tools\gradle\flutter.gradle' line: 1201
What went wrong: Execution failed for task ':app:compileFlutterBuildDebug'.
Try:
Get more help at https://help.gradle.org
BUILD FAILED in 18s Exception: Gradle task assembleDebug failed with exit code 1 `
Steps to reproduce
This error occurred the first time I ran the program, so I don't exactly know the procedure to reproduce the same.
Flutter doctor output
More environment information