Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .fvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"flutter": "3.22.0"
}
2 changes: 1 addition & 1 deletion .github/workflows/build_android_store.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build_microsoft_store.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -65,15 +65,15 @@ jobs:

- uses: subosito/flutter-action@v2
with:
flutter-version: 3.16.2
flutter-version: 3.22.0
channel: stable
cache: true

- name: Install Dependencies
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
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/deploy_develop.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,15 @@ jobs:

- uses: subosito/flutter-action@v2
with:
flutter-version: 3.16.2
flutter-version: 3.22.0
channel: stable
cache: true

- name: Install Dependencies
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
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pr_preview.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@ jobs:

- uses: subosito/flutter-action@v2
with:
flutter-version: 3.16.2
flutter-version: 3.22.0
channel: stable
cache: true

- name: Install Dependencies
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
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,6 @@ coverage/
packages/**/pubspec.lock

# Web related
lib/generated_plugin_registrant.dart

# Symbolication related
app.*.symbols
Expand Down
24 changes: 22 additions & 2 deletions .metadata
Original file line number Diff line number Diff line change
Expand Up @@ -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'
2 changes: 1 addition & 1 deletion ios/Flutter/AppFrameworkInfo.plist
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@
<key>CFBundleVersion</key>
<string>1.0</string>
<key>MinimumOSVersion</key>
<string>9.0</string>
<string>12.0</string>
</dict>
</plist>
2 changes: 1 addition & 1 deletion ios/Podfile
Original file line number Diff line number Diff line change
@@ -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'
Expand Down
7 changes: 5 additions & 2 deletions ios/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
archiveVersion = 1;
classes = {
};
objectVersion = 51;
objectVersion = 54;
objects = {

/* Begin PBXBuildFile section */
Expand Down Expand Up @@ -171,7 +171,7 @@
97C146E61CF9000F007C117D /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 1300;
LastUpgradeCheck = 1510;
ORGANIZATIONNAME = "";
TargetAttributes = {
97C146ED1CF9000F007C117D = {
Expand Down Expand Up @@ -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 = (
Expand Down Expand Up @@ -251,6 +253,7 @@
};
9740EEB61CF901F6004384FC /* Run Script */ = {
isa = PBXShellScriptBuildPhase;
alwaysOutOfDate = 1;
buildActionMask = 2147483647;
files = (
);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1300"
LastUpgradeVersion = "1510"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
2 changes: 2 additions & 0 deletions ios/Runner/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -50,5 +50,7 @@
<false/>
<key>CADisableMinimumFrameDurationOnPhone</key>
<true/>
<key>UIApplicationSupportsIndirectInputEvents</key>
<true/>
</dict>
</plist>
11 changes: 6 additions & 5 deletions lib/layout/components/boat.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import 'package:flutter/material.dart';
import 'package:rive/rive.dart';
// import 'package:rive/rive.dart';

const _animationName = 'Puzzleboat';

Expand All @@ -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],
// );
}
}
11 changes: 6 additions & 5 deletions lib/layout/components/submarine.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import 'package:flutter/material.dart';
import 'package:rive/rive.dart';
// import 'package:rive/rive.dart';

const _animationName = 'Animation 1';

Expand All @@ -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],
// );
}
}
131 changes: 65 additions & 66 deletions lib/puzzle/view/puzzle_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand All @@ -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(),
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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());
// }
// }
Loading