From 2b9d62f0ae07ce7ca811f243d768ba8bd3a83a5f Mon Sep 17 00:00:00 2001 From: DevKage Date: Sun, 28 Jan 2024 12:01:55 +0530 Subject: [PATCH] Upgrade packages and fix warnings --- lib/main.dart | 2 +- lib/widgets/game_over_menu.dart | 2 +- lib/widgets/hud.dart | 2 +- lib/widgets/main_menu.dart | 2 +- lib/widgets/pause_menu.dart | 2 +- lib/widgets/settings_menu.dart | 2 +- pubspec.yaml | 12 ++++++------ windows/flutter/CMakeLists.txt | 7 ++++++- 8 files changed, 18 insertions(+), 13 deletions(-) diff --git a/lib/main.dart b/lib/main.dart index 933f9aa..2fdba40 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -40,7 +40,7 @@ Future initHive() async { // The main widget for this game. class DinoRunApp extends StatelessWidget { - const DinoRunApp({Key? key}) : super(key: key); + const DinoRunApp({super.key}); @override Widget build(BuildContext context) { diff --git a/lib/widgets/game_over_menu.dart b/lib/widgets/game_over_menu.dart index 803cd5d..4d6a2d8 100644 --- a/lib/widgets/game_over_menu.dart +++ b/lib/widgets/game_over_menu.dart @@ -18,7 +18,7 @@ class GameOverMenu extends StatelessWidget { // Reference to parent game. final DinoRun game; - const GameOverMenu(this.game, {Key? key}) : super(key: key); + const GameOverMenu(this.game, {super.key}); @override Widget build(BuildContext context) { diff --git a/lib/widgets/hud.dart b/lib/widgets/hud.dart index 65830cf..9a3dd63 100644 --- a/lib/widgets/hud.dart +++ b/lib/widgets/hud.dart @@ -16,7 +16,7 @@ class Hud extends StatelessWidget { // Reference to parent game. final DinoRun game; - const Hud(this.game, {Key? key}) : super(key: key); + const Hud(this.game, {super.key}); @override Widget build(BuildContext context) { diff --git a/lib/widgets/main_menu.dart b/lib/widgets/main_menu.dart index 3ec1fdf..7b6671c 100644 --- a/lib/widgets/main_menu.dart +++ b/lib/widgets/main_menu.dart @@ -14,7 +14,7 @@ class MainMenu extends StatelessWidget { // Reference to parent game. final DinoRun game; - const MainMenu(this.game, {Key? key}) : super(key: key); + const MainMenu(this.game, {super.key}); @override Widget build(BuildContext context) { diff --git a/lib/widgets/pause_menu.dart b/lib/widgets/pause_menu.dart index 2cc466c..56fb0dc 100644 --- a/lib/widgets/pause_menu.dart +++ b/lib/widgets/pause_menu.dart @@ -17,7 +17,7 @@ class PauseMenu extends StatelessWidget { // Reference to parent game. final DinoRun game; - const PauseMenu(this.game, {Key? key}) : super(key: key); + const PauseMenu(this.game, {super.key}); @override Widget build(BuildContext context) { diff --git a/lib/widgets/settings_menu.dart b/lib/widgets/settings_menu.dart index 5bae2c3..09a3c03 100644 --- a/lib/widgets/settings_menu.dart +++ b/lib/widgets/settings_menu.dart @@ -16,7 +16,7 @@ class SettingsMenu extends StatelessWidget { // Reference to parent game. final DinoRun game; - const SettingsMenu(this.game, {Key? key}) : super(key: key); + const SettingsMenu(this.game, {super.key}); @override Widget build(BuildContext context) { diff --git a/pubspec.yaml b/pubspec.yaml index c1da700..f983e36 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -9,21 +9,21 @@ environment: sdk: ">=2.17.0 <3.0.0" dependencies: - flame: 1.10.0 - flame_audio: 2.1.2 + flame: 1.14.0 + flame_audio: 2.1.7 hive: 2.2.3 - path_provider: 2.1.1 - provider: 6.0.5 + path_provider: 2.1.2 + provider: 6.1.1 flutter: sdk: flutter cupertino_icons: 1.0.6 dev_dependencies: hive_generator: 2.0.1 - build_runner: 2.4.6 + build_runner: 2.4.8 flutter_test: sdk: flutter - flutter_lints: ^2.0.3 + flutter_lints: 3.0.1 flutter: uses-material-design: true diff --git a/windows/flutter/CMakeLists.txt b/windows/flutter/CMakeLists.txt index b2e4bd8..4f2af69 100644 --- a/windows/flutter/CMakeLists.txt +++ b/windows/flutter/CMakeLists.txt @@ -9,6 +9,11 @@ include(${EPHEMERAL_DIR}/generated_config.cmake) # https://github.com/flutter/flutter/issues/57146. set(WRAPPER_ROOT "${EPHEMERAL_DIR}/cpp_client_wrapper") +# Set fallback configurations for older versions of the flutter tool. +if (NOT DEFINED FLUTTER_TARGET_PLATFORM) + set(FLUTTER_TARGET_PLATFORM "windows-x64") +endif() + # === Flutter Library === set(FLUTTER_LIBRARY "${EPHEMERAL_DIR}/flutter_windows.dll") @@ -91,7 +96,7 @@ add_custom_command( COMMAND ${CMAKE_COMMAND} -E env ${FLUTTER_TOOL_ENVIRONMENT} "${FLUTTER_ROOT}/packages/flutter_tools/bin/tool_backend.bat" - windows-x64 $ + ${FLUTTER_TARGET_PLATFORM} $ VERBATIM ) add_custom_target(flutter_assemble DEPENDS