Skip to content
This repository has been archived by the owner on Apr 3, 2023. It is now read-only.

Commit

Permalink
Update libs
Browse files Browse the repository at this point in the history
  • Loading branch information
cuong0993 committed Nov 6, 2021
1 parent a52eabe commit 2e72ac6
Show file tree
Hide file tree
Showing 14 changed files with 148 additions and 155 deletions.
2 changes: 1 addition & 1 deletion android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ android {
resValue "string", "app_name", dartEnvironmentVariables.ENV_APP_NAME ? dartEnvironmentVariables.ENV_APP_NAME : "hittick"
resValue "string", "facebook_app_id", dartEnvironmentVariables.ENV_FACEBOOK_APP_ID ? dartEnvironmentVariables.ENV_FACEBOOK_APP_ID : ""
applicationId "com.chaomao.hittick"
minSdkVersion 16
minSdkVersion 19
targetSdkVersion 31
multiDexEnabled true
versionCode 32
Expand Down
157 changes: 74 additions & 83 deletions ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -349,87 +349,78 @@ PODS:
- BoringSSL-GRPC/Implementation (0.0.7):
- BoringSSL-GRPC/Interface (= 0.0.7)
- BoringSSL-GRPC/Interface (0.0.7)
- cloud_firestore (2.5.4):
- Firebase/Firestore (= 8.8.0)
- cloud_firestore (3.1.0):
- Firebase/Firestore (= 8.9.0)
- firebase_core
- Flutter
- cloud_functions (3.0.5):
- Firebase/Functions (= 8.8.0)
- cloud_functions (3.1.0):
- Firebase/Functions (= 8.9.0)
- firebase_core
- Flutter
- device_info (0.0.1):
- Flutter
- FBAEMKit (11.2.1):
- FBAEMKit/AEM (= 11.2.1)
- FBAEMKit/AEM (11.2.1):
- FBSDKCoreKit_Basics (~> 11.2.1)
- FBSDKCoreKit (11.2.1):
- FBSDKCoreKit/Core (= 11.2.1)
- FBSDKCoreKit/Core (11.2.1):
- FBAEMKit (~> 11.2.1)
- FBSDKCoreKit_Basics (~> 11.2.1)
- FBSDKCoreKit_Basics (11.2.1):
- FBSDKCoreKit_Basics/Basics (= 11.2.1)
- FBSDKCoreKit_Basics/Basics (11.2.1)
- FBSDKLoginKit (11.2.1):
- FBSDKLoginKit/Login (= 11.2.1)
- FBSDKLoginKit/Login (11.2.1):
- FBSDKCoreKit (~> 11.2.1)
- FBSDKCoreKit_Basics (~> 11.2.1)
- Firebase/Auth (8.8.0):
- FBAEMKit (12.0.2):
- FBSDKCoreKit_Basics (= 12.0.2)
- FBSDKCoreKit (12.0.2):
- FBAEMKit (= 12.0.2)
- FBSDKCoreKit_Basics (= 12.0.2)
- FBSDKCoreKit_Basics (12.0.2)
- FBSDKLoginKit (12.0.2):
- FBSDKCoreKit (= 12.0.2)
- Firebase/Auth (8.9.0):
- Firebase/CoreOnly
- FirebaseAuth (~> 8.8.0)
- Firebase/CoreOnly (8.8.0):
- FirebaseCore (= 8.8.0)
- Firebase/Crashlytics (8.8.0):
- FirebaseAuth (~> 8.9.0)
- Firebase/CoreOnly (8.9.0):
- FirebaseCore (= 8.9.0)
- Firebase/Crashlytics (8.9.0):
- Firebase/CoreOnly
- FirebaseCrashlytics (~> 8.8.0)
- Firebase/Firestore (8.8.0):
- FirebaseCrashlytics (~> 8.9.0)
- Firebase/Firestore (8.9.0):
- Firebase/CoreOnly
- FirebaseFirestore (~> 8.8.0)
- Firebase/Functions (8.8.0):
- FirebaseFirestore (~> 8.9.0)
- Firebase/Functions (8.9.0):
- Firebase/CoreOnly
- FirebaseFunctions (~> 8.8.0)
- Firebase/Storage (8.8.0):
- FirebaseFunctions (~> 8.9.0)
- Firebase/Storage (8.9.0):
- Firebase/CoreOnly
- FirebaseStorage (~> 8.8.0)
- firebase_auth (3.1.4):
- Firebase/Auth (= 8.8.0)
- FirebaseStorage (~> 8.9.0)
- firebase_auth (3.2.0):
- Firebase/Auth (= 8.9.0)
- firebase_core
- Flutter
- firebase_core (1.8.0):
- Firebase/CoreOnly (= 8.8.0)
- firebase_core (1.10.0):
- Firebase/CoreOnly (= 8.9.0)
- Flutter
- firebase_crashlytics (2.2.4):
- Firebase/Crashlytics (= 8.8.0)
- firebase_crashlytics (2.3.0):
- Firebase/Crashlytics (= 8.9.0)
- firebase_core
- Flutter
- firebase_storage (10.0.6):
- Firebase/Storage (= 8.8.0)
- firebase_storage (10.1.0):
- Firebase/Storage (= 8.9.0)
- firebase_core
- Flutter
- FirebaseAuth (8.8.0):
- FirebaseAuth (8.9.0):
- FirebaseCore (~> 8.0)
- GoogleUtilities/AppDelegateSwizzler (~> 7.4)
- GoogleUtilities/Environment (~> 7.4)
- GoogleUtilities/AppDelegateSwizzler (~> 7.6)
- GoogleUtilities/Environment (~> 7.6)
- GTMSessionFetcher/Core (~> 1.5)
- FirebaseCore (8.8.0):
- FirebaseCore (8.9.0):
- FirebaseCoreDiagnostics (~> 8.0)
- GoogleUtilities/Environment (~> 7.4)
- GoogleUtilities/Logger (~> 7.4)
- FirebaseCoreDiagnostics (8.8.0):
- GoogleDataTransport (~> 9.0)
- GoogleUtilities/Environment (~> 7.4)
- GoogleUtilities/Logger (~> 7.4)
- GoogleUtilities/Environment (~> 7.6)
- GoogleUtilities/Logger (~> 7.6)
- FirebaseCoreDiagnostics (8.9.0):
- GoogleDataTransport (~> 9.1)
- GoogleUtilities/Environment (~> 7.6)
- GoogleUtilities/Logger (~> 7.6)
- nanopb (~> 2.30908.0)
- FirebaseCrashlytics (8.8.0):
- FirebaseCrashlytics (8.9.0):
- FirebaseCore (~> 8.0)
- FirebaseInstallations (~> 8.0)
- GoogleDataTransport (~> 9.0)
- GoogleUtilities/Environment (~> 7.4)
- GoogleDataTransport (~> 9.1)
- GoogleUtilities/Environment (~> 7.6)
- nanopb (~> 2.30908.0)
- PromisesObjC (< 3.0, >= 1.2)
- FirebaseFirestore (8.8.0):
- FirebaseFirestore (8.9.1):
- abseil/algorithm (= 0.20200225.0)
- abseil/base (= 0.20200225.0)
- abseil/container/flat_hash_map (= 0.20200225.0)
Expand All @@ -442,23 +433,23 @@ PODS:
- "gRPC-C++ (~> 1.28.0)"
- leveldb-library (~> 1.22)
- nanopb (~> 2.30908.0)
- FirebaseFunctions (8.8.0):
- FirebaseFunctions (8.9.0):
- FirebaseCore (~> 8.0)
- GTMSessionFetcher/Core (~> 1.5)
- FirebaseInstallations (8.8.0):
- FirebaseInstallations (8.9.0):
- FirebaseCore (~> 8.0)
- GoogleUtilities/Environment (~> 7.4)
- GoogleUtilities/UserDefaults (~> 7.4)
- GoogleUtilities/Environment (~> 7.6)
- GoogleUtilities/UserDefaults (~> 7.6)
- PromisesObjC (< 3.0, >= 1.2)
- FirebaseStorage (8.8.0):
- FirebaseStorage (8.9.0):
- FirebaseCore (~> 8.0)
- GTMSessionFetcher/Core (~> 1.5)
- Flutter (1.0.0)
- flutter_email_sender (0.0.1):
- Flutter
- flutter_facebook_auth (3.5.1):
- FBSDKCoreKit (~> 11.2.0)
- FBSDKLoginKit (~> 11.2.0)
- flutter_facebook_auth (3.5.3):
- FBSDKCoreKit (~> 12.0.2)
- FBSDKLoginKit (~> 12.0.2)
- Flutter
- FMDB (2.7.5):
- FMDB/standard (= 2.7.5)
Expand Down Expand Up @@ -629,29 +620,29 @@ SPEC CHECKSUMS:
abseil: 6c8eb7892aefa08d929b39f9bb108e5367e3228f
AppAuth: 31bcec809a638d7bd2f86ea8a52bd45f6e81e7c7
BoringSSL-GRPC: 8edf627ee524575e2f8d19d56f068b448eea3879
cloud_firestore: 814002a5be7dc955deaa18216ebe8c2e8be15d10
cloud_functions: bd1bf3640509a57f1b078b76a70d7ec4fc559654
cloud_firestore: 2cff0618e560f435fc05da5c94c2d213eb7ba640
cloud_functions: e7c23b62967917c4eb47911b90f798c4415ad0d4
device_info: d7d233b645a32c40dfdc212de5cf646ca482f175
FBAEMKit: 5de0a7aaa854eec69bb5be20795952a63d38a5f6
FBSDKCoreKit: bf655f808b040ed66a72b9922911b39d703e64f4
FBSDKCoreKit_Basics: 73ebe3a27eb688ac5b5aa7e99f68992993042115
FBSDKLoginKit: 2e76831ef08d356b8f9150ea51cce865074ea304
Firebase: 629510f1a9ddb235f3a7c5c8ceb23ba887f0f814
firebase_auth: 0b7168e2db1bff6e5b40a7dc268447b8dedb59c1
firebase_core: 3b4c707f5a8eff38f52fd5580895bcd89357bf42
firebase_crashlytics: 5e4c7b5695a7ffe144a55dacfddebbf8eb36028a
firebase_storage: aee188c71bcc3c68fa6a9efa2625b92f677991be
FirebaseAuth: bcf0adeff88bda5dcb3beeabe5760f1226ab7b2f
FirebaseCore: 98b29e3828f0a53651c363937a7f7d92a19f1ba2
FirebaseCoreDiagnostics: fe77f42da6329d6d83d21fd9d621a6b704413bfc
FirebaseCrashlytics: 3660c045c8e45cc4276110562a0ef44cf43c8157
FirebaseFirestore: 29baf05d5e7e0d5003eb34e5805d92b9858b36d4
FirebaseFunctions: 747034115d113cf600c4995ff7e4d384697e7c49
FirebaseInstallations: 2563cb18a723ef9c6ef18318a49519b75dce613c
FirebaseStorage: 54ff752ecbd27f1c354c3f5e8c55f6ad5783699b
FBAEMKit: c6b8ddf8371640fcd1a3b844d0f8884c8f334cea
FBSDKCoreKit: 506c0fd1c09a3075f62be8fa36bdd921c563daa9
FBSDKCoreKit_Basics: c0701d1634c944d60dd3c6361d66dbd0e707a456
FBSDKLoginKit: d7c9f6ddff20d7b04c94d1f1f065dc7a441d44a0
Firebase: 13d8d96499e2635428d5bf0ec675df21f95d9a95
firebase_auth: 0d56cc4d105ff70d1547a7fcb10ee574ad05adf5
firebase_core: f770e033e790657b3505f04be4cb24c482912f11
firebase_crashlytics: ed8c1d66dc407d617cbed798f05a5d9115da7494
firebase_storage: a3bbe618ef41930ae31da8f4691d37e4ed84f14d
FirebaseAuth: 2b78b2a32c07b3ecfa4970bdf1d3632b8304099b
FirebaseCore: 599ee609343eaf4941bd188f85e3aa077ffe325b
FirebaseCoreDiagnostics: 5daa63f1c1409d981a2d5007daa100b36eac6a34
FirebaseCrashlytics: 40efbd81157dae307ec95612fa1328347284d2c2
FirebaseFirestore: 15ae9648476436efed698a909e44c4737498f9b4
FirebaseFunctions: c78ec2f93cd453f25fb5e4c694c830f7a31ab349
FirebaseInstallations: caa7c8e0d3e2345b8829d2fa9ca1b4dfbf2fcc85
FirebaseStorage: 452c98c31ccb40b819764bf3039426c4388d9939
Flutter: 50d75fe2f02b26cc09d224853bb45737f8b3214a
flutter_email_sender: 02d7443217d8c41483223627972bfdc09f74276b
flutter_facebook_auth: 870a465b1afff3ace7a592bd44665d921991726c
flutter_facebook_auth: 5638a1a8cc23016ec6f72945ba879f4482870c69
FMDB: 2ce00b547f966261cd18927a3ddb07cb6f3db82a
google_sign_in: c5cecea71f3be43282263550556e311c4cc03582
GoogleDataTransport: 629c20a4d363167143f30ea78320d5a7eb8bd940
Expand Down
12 changes: 6 additions & 6 deletions lib/game/game_controller.dart
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,8 @@ class GameController extends StateNotifier<GameState> {
_read(midiLoadedProvider.notifier).playNote(tile.note);
_tilesCount += 1;
_time = (0.0 - tile.initialY) / _speedDpsPerSecond;
_read(tilesCountProvider).state = _tilesCount;
_read(timeProvider).state = _time;
_read(tilesCountProvider.state).state = _tilesCount;
_read(timeProvider.state).state = _time;
if (tile.y >= pauseY) {
_errorCount++;
guideText = 'txt_too_late';
Expand All @@ -111,7 +111,7 @@ class GameController extends StateNotifier<GameState> {
_errorCount++;
guideText = 'txt_too_many_fingers';
}
_read(guideTextProvider).state = guideText;
_read(guideTextProvider.state).state = guideText;
}

Future _onComplete() async {
Expand All @@ -137,8 +137,8 @@ class GameController extends StateNotifier<GameState> {
final tiles = createTiles(_tileChunks, _unitDuration, _numberTileColumn);
await game.start(tiles, _speedDpsPerSecond, _onTouchTile, _onComplete);
state = GameState.playing(_duration, _songName);
_read(tilesCountProvider).state = _tilesCount;
_read(timeProvider).state = _time;
_read(guideTextProvider).state = '';
_read(tilesCountProvider.state).state = _tilesCount;
_read(timeProvider.state).state = _time;
_read(guideTextProvider.state).state = '';
}
}
19 changes: 10 additions & 9 deletions lib/game/game_page.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import 'package:flame/game.dart' as flame;
import 'package:flutter/material.dart';

// ignore: depend_on_referenced_packages
import 'package:flutter_gen/gen_l10n/l10n.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
Expand Down Expand Up @@ -33,7 +32,7 @@ class GamePage extends ConsumerWidget {
ref.read(gameStateProvider.notifier).onRestart();
}

ref.listen(isPausedProvider, (state) {
ref.listen(isPausedProvider, (_, state) {
showDialog<void>(
context: context,
useSafeArea: false,
Expand All @@ -42,7 +41,7 @@ class GamePage extends ConsumerWidget {
});
return WillPopScope(
onWillPop: () {
ref.read(isPausedProvider).state = true;
ref.read(isPausedProvider.state).state = true;
return Future.value(false);
},
child: Material(
Expand All @@ -69,7 +68,7 @@ class GamePage extends ConsumerWidget {
children: [
Consumer(
builder: (context, ref, child) {
final time = ref.watch(timeProvider).state;
final time = ref.watch(timeProvider.state).state;
return LinearProgressIndicator(
backgroundColor:
onBackgroundColor.withOpacity(0.1),
Expand All @@ -95,7 +94,7 @@ class GamePage extends ConsumerWidget {
Consumer(
builder: (context, ref, child) {
final time =
ref.watch(timeProvider).state;
ref.watch(timeProvider.state).state;
return Text(
'${time.toInt() ~/ 60}:${(time.toInt() % 60).toString().padLeft(2, '0')}/${gameState.duration ~/ 60}:${(gameState.duration % 60).toString().padLeft(2, '0')}',
style: Theme.of(context)
Expand All @@ -116,13 +115,15 @@ class GamePage extends ConsumerWidget {
Icons.pause_circle_outline_rounded,
),
onPressed: () {
ref.read(isPausedProvider).state = true;
ref.read(isPausedProvider.state).state =
true;
},
),
Consumer(
builder: (context, ref, child) {
final tilesCount =
ref.watch(tilesCountProvider).state;
final tilesCount = ref
.watch(tilesCountProvider.state)
.state;
return Text(
tilesCount.toString(),
style: Theme.of(context)
Expand Down Expand Up @@ -161,7 +162,7 @@ class GuideTextWidget extends ConsumerWidget {

@override
Widget build(BuildContext context, WidgetRef ref) {
final guideText = ref.watch(guideTextProvider).state;
final guideText = ref.watch(guideTextProvider.state).state;
var text = '';
if (guideText == 'txt_too_late') {
text = L10n.of(context)!.txt_too_late;
Expand Down
5 changes: 2 additions & 3 deletions lib/home/home_page.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import 'package:auto_route/auto_route.dart';
import 'package:flutter/material.dart';

// ignore: depend_on_referenced_packages
import 'package:flutter_gen/gen_l10n/l10n.dart';
import 'package:flutter_hooks/flutter_hooks.dart';
Expand Down Expand Up @@ -69,9 +68,9 @@ class HomePage extends StatelessWidget {
Icons.account_circle_rounded,
),
),
loading: (_) =>
loading: () =>
const Icon(Icons.account_circle_rounded),
error: (_, __, ___) =>
error: (_, __) =>
const Icon(Icons.account_circle_rounded),
);
},
Expand Down
7 changes: 4 additions & 3 deletions lib/instrument/instruments_controller.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,14 @@ import 'instruments_repository_impl.dart';
final selectedInstrumentIdProvider = StateProvider<String?>((_) => null);

final selectedInstrumentProvider = Provider<Instrument?>((ref) {
final selectedInstrumentId = ref.watch(selectedInstrumentIdProvider).state;
final selectedInstrumentId =
ref.watch(selectedInstrumentIdProvider.state).state;
final instruments = ref.watch(instrumentsProvider);
return instruments.when(
data: (instruments) =>
instruments.firstWhereOrNull((e) => e.id == selectedInstrumentId),
loading: (_) => null,
error: (_, __, ___) => null,
loading: () => null,
error: (_, __) => null,
);
});

Expand Down
9 changes: 5 additions & 4 deletions lib/instrument/instruments_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ class InstrumentsPage extends ConsumerWidget {
@override
Widget build(BuildContext context, WidgetRef ref) {
final instruments = ref.watch(instrumentsProvider);
final selectedInstrumentId = ref.watch(selectedInstrumentIdProvider).state;
final selectedInstrumentId =
ref.watch(selectedInstrumentIdProvider.state).state;
return Scaffold(
appBar: AppBar(
title: Text(
Expand All @@ -37,13 +38,13 @@ class InstrumentsPage extends ConsumerWidget {
ref
.watch(instrumentRepositoryProvider)
.changeInstrument(value!);
ref.read(selectedInstrumentIdProvider).state = value;
ref.read(selectedInstrumentIdProvider.state).state = value;
},
);
},
),
loading: (_) => const LoadingWidget(),
error: (_, __, ___) => const LoadingWidget(),
loading: () => const LoadingWidget(),
error: (_, __) => const LoadingWidget(),
),
);
}
Expand Down
Loading

0 comments on commit 2e72ac6

Please sign in to comment.