diff --git a/.fvmrc b/.fvmrc new file mode 100644 index 0000000..7c3d0b5 --- /dev/null +++ b/.fvmrc @@ -0,0 +1,3 @@ +{ + "flutter": "3.22.0" +} \ No newline at end of file diff --git a/.github/workflows/build_android_store.yaml b/.github/workflows/build_android_store.yaml index 5257af8..f59071e 100644 --- a/.github/workflows/build_android_store.yaml +++ b/.github/workflows/build_android_store.yaml @@ -33,7 +33,7 @@ jobs: - uses: subosito/flutter-action@v2 with: - flutter-version: 3.16.2 + flutter-version: 3.22.0 channel: stable cache: true diff --git a/.github/workflows/build_microsoft_store.yaml b/.github/workflows/build_microsoft_store.yaml index a2a1d63..9c5244d 100644 --- a/.github/workflows/build_microsoft_store.yaml +++ b/.github/workflows/build_microsoft_store.yaml @@ -22,7 +22,7 @@ jobs: - uses: subosito/flutter-action@v2 with: - flutter-version: 3.16.2 + flutter-version: 3.22.0 channel: stable cache: true diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index f64ad20..46a6de8 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -24,7 +24,7 @@ jobs: - uses: subosito/flutter-action@v2 with: - flutter-version: 3.16.2 + flutter-version: 3.22.0 channel: stable cache: true @@ -65,7 +65,7 @@ jobs: - uses: subosito/flutter-action@v2 with: - flutter-version: 3.16.2 + flutter-version: 3.22.0 channel: stable cache: true @@ -73,7 +73,7 @@ jobs: run: flutter packages get - name: Build for Web - run: flutter build web + run: flutter build web --wasm - name: Deploy uses: FirebaseExtended/action-hosting-deploy@v0 diff --git a/.github/workflows/deploy_develop.yaml b/.github/workflows/deploy_develop.yaml index 32f427a..05c9d30 100644 --- a/.github/workflows/deploy_develop.yaml +++ b/.github/workflows/deploy_develop.yaml @@ -23,7 +23,7 @@ jobs: - uses: subosito/flutter-action@v2 with: - flutter-version: 3.16.2 + flutter-version: 3.22.0 channel: stable cache: true @@ -31,7 +31,7 @@ jobs: run: flutter packages get - name: Build for Web - run: flutter build web + run: flutter build web --wasm - name: Deploy uses: FirebaseExtended/action-hosting-deploy@v0 diff --git a/.github/workflows/pr_preview.yaml b/.github/workflows/pr_preview.yaml index 504adc2..19255b5 100644 --- a/.github/workflows/pr_preview.yaml +++ b/.github/workflows/pr_preview.yaml @@ -20,7 +20,7 @@ jobs: - uses: subosito/flutter-action@v2 with: - flutter-version: 3.16.2 + flutter-version: 3.22.0 channel: stable cache: true @@ -28,7 +28,7 @@ jobs: run: flutter packages get - name: Build for Web - run: flutter build web + run: flutter build web --wasm - name: Deploy uses: FirebaseExtended/action-hosting-deploy@v0 diff --git a/.gitignore b/.gitignore index bd315f7..979a6ce 100644 --- a/.gitignore +++ b/.gitignore @@ -105,7 +105,6 @@ coverage/ packages/**/pubspec.lock # Web related -lib/generated_plugin_registrant.dart # Symbolication related app.*.symbols diff --git a/.metadata b/.metadata index cd984dd..72aedeb 100644 --- a/.metadata +++ b/.metadata @@ -4,7 +4,27 @@ # This file should be version controlled and should not be manually edited. version: - revision: 9b2d32b605630f28625709ebd9d78ab3016b2bf6 - channel: stable + revision: "5dcb86f68f239346676ceb1ed1ea385bd215fba1" + channel: "stable" project_type: app + +# Tracks metadata for the flutter migrate command +migration: + platforms: + - platform: root + create_revision: 5dcb86f68f239346676ceb1ed1ea385bd215fba1 + base_revision: 5dcb86f68f239346676ceb1ed1ea385bd215fba1 + - platform: web + create_revision: 5dcb86f68f239346676ceb1ed1ea385bd215fba1 + base_revision: 5dcb86f68f239346676ceb1ed1ea385bd215fba1 + + # User provided section + + # List of Local paths (relative to this file) that should be + # ignored by the migrate tool. + # + # Files that are not part of the templates will be ignored by default. + unmanaged_files: + - 'lib/main.dart' + - 'ios/Runner.xcodeproj/project.pbxproj' diff --git a/ios/Flutter/AppFrameworkInfo.plist b/ios/Flutter/AppFrameworkInfo.plist index f2872cf..8c6e561 100644 --- a/ios/Flutter/AppFrameworkInfo.plist +++ b/ios/Flutter/AppFrameworkInfo.plist @@ -21,6 +21,6 @@ CFBundleVersion 1.0 MinimumOSVersion - 9.0 + 12.0 diff --git a/ios/Podfile b/ios/Podfile index 9d2f9f3..626c27b 100644 --- a/ios/Podfile +++ b/ios/Podfile @@ -1,5 +1,5 @@ # Uncomment this line to define a global platform for your project -# platform :ios, '9.0' +# platform :ios, '12.0' # CocoaPods analytics sends network stats synchronously affecting flutter build latency. ENV['COCOAPODS_DISABLE_STATS'] = 'true' diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj index df0f0cf..02e9fb3 100644 --- a/ios/Runner.xcodeproj/project.pbxproj +++ b/ios/Runner.xcodeproj/project.pbxproj @@ -3,7 +3,7 @@ archiveVersion = 1; classes = { }; - objectVersion = 51; + objectVersion = 54; objects = { /* Begin PBXBuildFile section */ @@ -171,7 +171,7 @@ 97C146E61CF9000F007C117D /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 1300; + LastUpgradeCheck = 1510; ORGANIZATIONNAME = ""; TargetAttributes = { 97C146ED1CF9000F007C117D = { @@ -215,10 +215,12 @@ /* Begin PBXShellScriptBuildPhase section */ 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; buildActionMask = 2147483647; files = ( ); inputPaths = ( + "${TARGET_BUILD_DIR}/${INFOPLIST_PATH}", ); name = "Thin Binary"; outputPaths = ( @@ -251,6 +253,7 @@ }; 9740EEB61CF901F6004384FC /* Run Script */ = { isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; buildActionMask = 2147483647; files = ( ); diff --git a/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme index c87d15a..5e31d3d 100644 --- a/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +++ b/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -1,6 +1,6 @@ CADisableMinimumFrameDurationOnPhone + UIApplicationSupportsIndirectInputEvents + diff --git a/lib/layout/components/boat.dart b/lib/layout/components/boat.dart index aa8c8ce..1ca40cd 100644 --- a/lib/layout/components/boat.dart +++ b/lib/layout/components/boat.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:rive/rive.dart'; +// import 'package:rive/rive.dart'; const _animationName = 'Puzzleboat'; @@ -8,9 +8,10 @@ class Boat extends StatelessWidget { @override Widget build(BuildContext context) { - return const RiveAnimation.asset( - 'assets/images/boat-waves.riv', - animations: [_animationName], - ); + return const SizedBox.shrink(); + // return const RiveAnimation.asset( + // 'assets/images/boat-waves.riv', + // animations: [_animationName], + // ); } } diff --git a/lib/layout/components/submarine.dart b/lib/layout/components/submarine.dart index 37fadd6..264ec00 100644 --- a/lib/layout/components/submarine.dart +++ b/lib/layout/components/submarine.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:rive/rive.dart'; +// import 'package:rive/rive.dart'; const _animationName = 'Animation 1'; @@ -8,9 +8,10 @@ class Submarine extends StatelessWidget { @override Widget build(BuildContext context) { - return const RiveAnimation.asset( - 'assets/images/submarine.riv', - animations: [_animationName], - ); + return const SizedBox.shrink(); + // return const RiveAnimation.asset( + // 'assets/images/submarine.riv', + // animations: [_animationName], + // ); } } diff --git a/lib/puzzle/view/puzzle_page.dart b/lib/puzzle/view/puzzle_page.dart index 7d2c86b..4a88be1 100644 --- a/lib/puzzle/view/puzzle_page.dart +++ b/lib/puzzle/view/puzzle_page.dart @@ -7,7 +7,7 @@ import 'package:island_slide_puzzle/models/models.dart'; import 'package:island_slide_puzzle/puzzle/puzzle.dart'; import 'package:island_slide_puzzle/theme/theme.dart'; import 'package:island_slide_puzzle/timer/timer.dart'; -import 'package:rive/rive.dart' hide LinearGradient; +// import 'package:rive/rive.dart' hide LinearGradient; import '../../audio/audio_control_listener.dart'; import '../../layout/components/island_puzzle_tile.dart'; @@ -24,8 +24,7 @@ class PuzzlePage extends StatelessWidget { @override Widget build(BuildContext context) { - final isDarkMode = - MediaQuery.of(context).platformBrightness == Brightness.dark; + final isDarkMode = MediaQuery.of(context).platformBrightness == Brightness.dark; final themeBloc = ThemeBloc( themes: [ if (isDarkMode) const IslandDarkTheme() else const IslandTheme(), @@ -147,39 +146,39 @@ class _WellDoneHeader extends StatelessWidget { height: 150, child: child, ), - child: (_) => const Center(child: _BannerAnimation()), + child: (_) => const Center(child: Text('Well done')), ); } } -class _BannerAnimation extends StatefulWidget { - const _BannerAnimation({Key? key}) : super(key: key); - - @override - _BannerAnimationState createState() => _BannerAnimationState(); -} - -class _BannerAnimationState extends State<_BannerAnimation> { - late RiveAnimationController _controller; - bool startAnimationFinished = false; - - @override - void initState() { - super.initState(); - _controller = SingleShotAnimation( - 'Animation 1', - onStop: () => setState(() => startAnimationFinished = true), - ); - } - - @override - Widget build(BuildContext context) { - return RiveAnimation.asset( - 'assets/images/banner.riv', - controllers: [_controller], - ); - } -} +// class _BannerAnimation extends StatefulWidget { +// const _BannerAnimation({Key? key}) : super(key: key); +// +// @override +// _BannerAnimationState createState() => _BannerAnimationState(); +// } +// +// class _BannerAnimationState extends State<_BannerAnimation> { +// late RiveAnimationController _controller; +// bool startAnimationFinished = false; +// +// @override +// void initState() { +// super.initState(); +// _controller = SingleShotAnimation( +// 'Animation 1', +// onStop: () => setState(() => startAnimationFinished = true), +// ); +// } +// +// @override +// Widget build(BuildContext context) { +// return RiveAnimation.asset( +// 'assets/images/banner.riv', +// controllers: [_controller], +// ); +// } +// } class _PuzzleHeader extends StatelessWidget { const _PuzzleHeader({Key? key}) : super(key: key); @@ -402,37 +401,37 @@ class _PuzzleTile extends StatelessWidget { } } -/// Controller tailered for managing one-shot animations -class SingleShotAnimation extends SimpleAnimation { - /// Fires when the animation stops being active - final VoidCallback? onStop; - - /// Fires when the animation starts being active - final VoidCallback? onStart; - - SingleShotAnimation( - String animationName, { - double mix = 1, - bool autoplay = true, - this.onStop, - this.onStart, - }) : super(animationName, mix: mix, autoplay: autoplay) { - isActiveChanged.addListener(onActiveChanged); - } - - /// Dispose of any callback listeners - @override - void dispose() { - super.dispose(); - isActiveChanged.removeListener(onActiveChanged); - } - - /// Perform tasks when the animation's active state changes - void onActiveChanged() { - // Fire any callbacks - isActive - ? onStart?.call() - // onStop can fire while widgets are still drawing - : WidgetsBinding.instance?.addPostFrameCallback((_) => onStop?.call()); - } -} +// /// Controller tailered for managing one-shot animations +// class SingleShotAnimation extends SimpleAnimation { +// /// Fires when the animation stops being active +// final VoidCallback? onStop; +// +// /// Fires when the animation starts being active +// final VoidCallback? onStart; +// +// SingleShotAnimation( +// String animationName, { +// double mix = 1, +// bool autoplay = true, +// this.onStop, +// this.onStart, +// }) : super(animationName, mix: mix, autoplay: autoplay) { +// isActiveChanged.addListener(onActiveChanged); +// } +// +// /// Dispose of any callback listeners +// @override +// void dispose() { +// super.dispose(); +// isActiveChanged.removeListener(onActiveChanged); +// } +// +// /// Perform tasks when the animation's active state changes +// void onActiveChanged() { +// // Fire any callbacks +// isActive +// ? onStart?.call() +// // onStop can fire while widgets are still drawing +// : WidgetsBinding.instance?.addPostFrameCallback((_) => onStop?.call()); +// } +// } diff --git a/lib/theme/widgets/puzzle_button.dart b/lib/theme/widgets/puzzle_button.dart index 1c01f1a..26c766f 100644 --- a/lib/theme/widgets/puzzle_button.dart +++ b/lib/theme/widgets/puzzle_button.dart @@ -34,9 +34,8 @@ class PuzzleButton extends StatelessWidget { child: TextButton( style: TextButton.styleFrom( padding: EdgeInsets.zero, - primary: textColor, + foregroundColor: textColor, backgroundColor: backgroundColor, - onSurface: backgroundColor, textStyle: PuzzleTextStyle.headline5, shape: RoundedRectangleBorder( borderRadius: BorderRadius.circular(24), diff --git a/macos/Flutter/GeneratedPluginRegistrant.swift b/macos/Flutter/GeneratedPluginRegistrant.swift index 0e92d7d..e51913c 100644 --- a/macos/Flutter/GeneratedPluginRegistrant.swift +++ b/macos/Flutter/GeneratedPluginRegistrant.swift @@ -8,7 +8,6 @@ import Foundation import audio_session import just_audio import path_provider_foundation -import rive_common import shared_preferences_foundation import url_launcher_macos @@ -16,7 +15,6 @@ func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { AudioSessionPlugin.register(with: registry.registrar(forPlugin: "AudioSessionPlugin")) JustAudioPlugin.register(with: registry.registrar(forPlugin: "JustAudioPlugin")) PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin")) - RivePlugin.register(with: registry.registrar(forPlugin: "RivePlugin")) SharedPreferencesPlugin.register(with: registry.registrar(forPlugin: "SharedPreferencesPlugin")) UrlLauncherPlugin.register(with: registry.registrar(forPlugin: "UrlLauncherPlugin")) } diff --git a/macos/Podfile b/macos/Podfile index e9997e6..c4d53e7 100644 --- a/macos/Podfile +++ b/macos/Podfile @@ -46,4 +46,4 @@ post_install do |installer| end end -end \ No newline at end of file +end diff --git a/macos/Runner.xcodeproj/project.pbxproj b/macos/Runner.xcodeproj/project.pbxproj index 2d64813..8a36360 100644 --- a/macos/Runner.xcodeproj/project.pbxproj +++ b/macos/Runner.xcodeproj/project.pbxproj @@ -3,7 +3,7 @@ archiveVersion = 1; classes = { }; - objectVersion = 51; + objectVersion = 54; objects = { /* Begin PBXAggregateTarget section */ @@ -202,7 +202,7 @@ isa = PBXProject; attributes = { LastSwiftUpdateCheck = 0920; - LastUpgradeCheck = 1300; + LastUpgradeCheck = 1510; ORGANIZATIONNAME = ""; TargetAttributes = { 33CC10EC2044A3C60003C045 = { @@ -255,6 +255,7 @@ /* Begin PBXShellScriptBuildPhase section */ 3399D490228B24CF009A79C7 /* ShellScript */ = { isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; buildActionMask = 2147483647; files = ( ); @@ -403,7 +404,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.11; + MACOSX_DEPLOYMENT_TARGET = 10.14; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = macosx; SWIFT_COMPILATION_MODE = wholemodule; @@ -486,7 +487,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.11; + MACOSX_DEPLOYMENT_TARGET = 10.14; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = macosx; @@ -533,7 +534,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.11; + MACOSX_DEPLOYMENT_TARGET = 10.14; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = macosx; SWIFT_COMPILATION_MODE = wholemodule; diff --git a/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme index 2e1d8e2..1669b7f 100644 --- a/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +++ b/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -1,6 +1,6 @@ =3.2.0-194.0.dev <4.0.0" - flutter: ">=3.13.0" + dart: ">=3.4.0 <4.0.0" + flutter: ">=3.19.2" diff --git a/pubspec.yaml b/pubspec.yaml index 86b106c..7371f6d 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -4,7 +4,7 @@ version: 1.1.0+1 publish_to: none environment: - sdk: ">=2.17.0 <3.0.0" + sdk: ">=3.0.0 <4.0.0" dependencies: bloc: ^8.0.1 @@ -19,12 +19,21 @@ dependencies: flutter_svg: ^2.0.9 gap: ^3.0.1 google_fonts: ^6.1.0 - intl: ^0.18.0 - just_audio: ^0.9.20 + intl: ^0.19.0 + just_audio: ^0.9.37 platform: ^3.1.0 - rive: ^0.12.3 - shared_preferences: ^2.0.13 - url_launcher: ^6.0.20 +# rive: ^0.13.4 + shared_preferences: ^2.2.3 + shared_preferences_web: ^2.3.0 + url_launcher: ^6.2.6 + +dependency_overrides: + just_audio_web: + git: + url: https://github.com/ryanheise/just_audio.git + ref: feature/web_package + path: just_audio_web + web: ^0.5.0 dev_dependencies: bloc_test: ^9.0.1 diff --git a/web/index.html b/web/index.html index 72ab3ce..0f695d6 100644 --- a/web/index.html +++ b/web/index.html @@ -1,6 +1,5 @@ - - + Slide Puzzle @@ -47,73 +45,6 @@ - - + - - \ No newline at end of file + diff --git a/windows/flutter/generated_plugin_registrant.cc b/windows/flutter/generated_plugin_registrant.cc index 72ff4b7..4f78848 100644 --- a/windows/flutter/generated_plugin_registrant.cc +++ b/windows/flutter/generated_plugin_registrant.cc @@ -6,12 +6,9 @@ #include "generated_plugin_registrant.h" -#include #include void RegisterPlugins(flutter::PluginRegistry* registry) { - RivePluginRegisterWithRegistrar( - registry->GetRegistrarForPlugin("RivePlugin")); UrlLauncherWindowsRegisterWithRegistrar( registry->GetRegistrarForPlugin("UrlLauncherWindows")); } diff --git a/windows/flutter/generated_plugins.cmake b/windows/flutter/generated_plugins.cmake index e141d51..88b22e5 100644 --- a/windows/flutter/generated_plugins.cmake +++ b/windows/flutter/generated_plugins.cmake @@ -3,7 +3,6 @@ # list(APPEND FLUTTER_PLUGIN_LIST - rive_common url_launcher_windows )