From be503c692969c5ca18645e32109a90a7835d3fb1 Mon Sep 17 00:00:00 2001 From: OroshiX Date: Tue, 15 Aug 2023 17:56:33 +0200 Subject: [PATCH 1/6] Add/modify entry => use view model to prepare extraction --- lib/tagros/presentation/add_modify.dart | 870 +++++++++--------- lib/tagros/presentation/entry_view_model.dart | 277 ++++++ 2 files changed, 722 insertions(+), 425 deletions(-) create mode 100644 lib/tagros/presentation/entry_view_model.dart diff --git a/lib/tagros/presentation/add_modify.dart b/lib/tagros/presentation/add_modify.dart index 96f3aef..9f740f7 100644 --- a/lib/tagros/presentation/add_modify.dart +++ b/lib/tagros/presentation/add_modify.dart @@ -1,4 +1,3 @@ -import 'package:collection/collection.dart'; import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; import 'package:flutter/scheduler.dart'; @@ -8,14 +7,10 @@ import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:tagros_comptes/common/presentation/component/background_gradient.dart'; import 'package:tagros_comptes/generated/l10n.dart'; import 'package:tagros_comptes/state/providers.dart'; -import 'package:tagros_comptes/tagros/data/source/db/db_providers.dart'; import 'package:tagros_comptes/tagros/domain/game/camp.dart'; -import 'package:tagros_comptes/tagros/domain/game/info_entry.dart'; -import 'package:tagros_comptes/tagros/domain/game/info_entry_player.dart'; -import 'package:tagros_comptes/tagros/domain/game/player.dart'; import 'package:tagros_comptes/tagros/domain/game/poignee.dart'; import 'package:tagros_comptes/tagros/domain/game/prise.dart'; -import 'package:tagros_comptes/tagros/presentation/game_view_model.dart'; +import 'package:tagros_comptes/tagros/presentation/entry_view_model.dart'; import 'package:tagros_comptes/tagros/presentation/widget/boxed.dart'; import 'package:tagros_comptes/tagros/presentation/widget/selectable_tag.dart'; import 'package:tagros_comptes/tagros/presentation/widget/snack_utils.dart'; @@ -30,78 +25,40 @@ class EntryScreen extends HookConsumerWidget { @override Widget build(BuildContext context, WidgetRef ref) { - final players = useState([]); - final add = useState(false); - final entry = useState(InfoEntryBean(points: 0, nbBouts: 0)); - final playersArg = ref.watch(currentGameProvider).valueOrNull?.players; - final ValueNotifier playerAttack = useState( - playersArg != null ? PlayerBean.fromDb(playersArg.last) : null); - final withPlayers = useState?>(null); + final add = ref.watch(entryViewModelProvider(roundId: roundId) + .select((value) => value.valueOrNull?.id == null)); final textPointsController = useTextEditingController(text: "0"); useEffect(() { - if (playersArg == null) return null; - final playersValue = playersArg.reversed - .map((e) => PlayerBean.fromDb(e)) - .whereNotNull() - .toList(); - players.value = playersValue; - InfoEntryPlayerBean? info; - if (roundId == null) { - add.value = true; - final pLength = playersValue.length; - info = InfoEntryPlayerBean( - player: playersValue[0], - infoEntry: InfoEntryBean(points: 0, nbBouts: 0)); - if (pLength == 5) { - info = info.copyWith(withPlayers: [playersValue[0]]); - } else if (pLength > 5) { - info = info.copyWith(withPlayers: [playersValue[0], playersValue[0]]); - } - withPlayers.value = info.withPlayers; - playerAttack.value = info.player; - } else { - ref.read(gamesDaoProvider).fetchEntry(roundId!).then((info) { - playerAttack.value = info.player; - entry.value = info.infoEntry; - withPlayers.value = info.withPlayers; - textPointsController.text = info.infoEntry.points.toStringAsFixed(1); - }); - } - if (kDebugMode) { - print( - "So we ${roundId == null ? "add" : "modify"} an entry, we have the players: $players"); - } + textPointsController.text = ref.read( + entryViewModelProvider(roundId: roundId).select( + (value) => value.valueOrNull?.points.toStringAsFixed(1) ?? "0")); return null; - }, [playersArg]); + }, [ + ref.watch(entryViewModelProvider(roundId: roundId) + .select((value) => value.valueOrNull == null)) + ]); + if (kDebugMode) { + print("So we ${roundId == null ? "add" : "modify"} an entry"); + } return BackgroundGradient( child: Scaffold( appBar: AppBar( - title: Text( - S.of(context).addModifyAppBarTitle(add.value ? 'add' : 'modify')), + title: + Text(S.of(context).addModifyAppBarTitle(add ? 'add' : 'modify')), ), floatingActionButton: FloatingActionButton( heroTag: UniqueKey(), child: const Icon(Icons.check), onPressed: () { - if (_validate( - length: players.value.length, - withPlayers: withPlayers.value, - attack: playerAttack.value)) { - final infoEntry = InfoEntryPlayerBean( - player: playerAttack.value!, - infoEntry: entry.value, - withPlayers: withPlayers.value, - ); + final (saved, added) = ref + .read(entryViewModelProvider(roundId: roundId).notifier) + .saveEntry(); + if (saved != null) { context.pop(); SchedulerBinding.instance .addPostFrameCallback((timeStamp) async { - if (add.value) { - ref.read(tableauViewModelProvider)?.addEntry(infoEntry); - } else { - ref.read(tableauViewModelProvider)?.modifyEntry(infoEntry); - } ref.read(messageObserverProvider.notifier).state = - Tuple2(add.value, infoEntry); + Tuple2(added, saved); }); } else { displayFlushbar(context, ref, @@ -109,376 +66,439 @@ class EntryScreen extends HookConsumerWidget { message: S.of(context).addModifyMissingMessage); } }), - body: SingleChildScrollView( - child: Padding( - padding: const EdgeInsets.symmetric(vertical: 8, horizontal: 16), - child: Column( - mainAxisSize: MainAxisSize.min, - mainAxisAlignment: MainAxisAlignment.start, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Boxed( - title: S.of(context).addModifyTitleAttack, - child: Column( - children: [ - Row( - mainAxisSize: MainAxisSize.max, - crossAxisAlignment: CrossAxisAlignment.center, - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Expanded( - flex: 2, child: Text(S.of(context).preneur)), - Expanded( - flex: 5, - child: Container( - height: 35, - padding: - const EdgeInsets.symmetric(vertical: 2), - child: ListView.builder( - key: const ValueKey('player1'), - reverse: true, - scrollDirection: Axis.horizontal, - itemCount: players.value.length, - itemBuilder: (BuildContext context, - int index) => - SelectableTag( - selected: playerAttack.value?.id == - players.value[index].id, - text: players.value[index].name, - onPressed: () { - playerAttack.value = - players.value[index]; - }), - ), - ), - ), - ]), - if (players.value.length >= 5) - Row( - mainAxisSize: MainAxisSize.max, - crossAxisAlignment: CrossAxisAlignment.center, - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Expanded( - flex: 2, - child: Text(S - .of(context) - .addModifyFirstPartner( - players.value.length > 5 - ? Tagros.tagros - : Tagros.tarot))), - Expanded( - flex: 5, - child: Container( - height: 35, - padding: - const EdgeInsets.symmetric(vertical: 2), - child: ListView.builder( - key: const ValueKey('player2'), - reverse: true, - scrollDirection: Axis.horizontal, - itemCount: players.value.length, - itemBuilder: (BuildContext context, - int index) => - SelectableTag( - selected: withPlayers.value?[0] == - players.value[index], - text: players.value[index].name, - onPressed: () { - final wPlayers = - withPlayers.value!.toList(); - wPlayers[0] = - players.value[index]; - withPlayers.value = wPlayers; - })), - ), - ), - ]), - if (players.value.length > 5) - Row( - mainAxisSize: MainAxisSize.max, - crossAxisAlignment: CrossAxisAlignment.center, - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Expanded( - flex: 2, - child: - Text(S.of(context).addModifySecondPartner), - ), - Expanded( - flex: 5, - child: Container( - height: 35, - padding: - const EdgeInsets.symmetric(vertical: 2), - child: ListView.builder( - key: const ValueKey('player3'), - reverse: true, - scrollDirection: Axis.horizontal, - itemCount: players.value.length, - itemBuilder: (BuildContext context, - int index) => - SelectableTag( - selected: withPlayers.value?[1] == - players.value[index], - text: players.value[index].name, - onPressed: () { - final wPlayers = - withPlayers.value!.toList(); - wPlayers[1] = - players.value[index]; - - withPlayers.value = wPlayers; - })), - ), - ), - ]), - Row( - mainAxisSize: MainAxisSize.max, - crossAxisAlignment: CrossAxisAlignment.center, - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Text(S.of(context).addModifyContractType), - DropdownButton( - key: const ValueKey('dropdown-contract'), - value: entry.value.prise, - items: Prise.values - .map((e) => DropdownMenuItem( - value: e, child: Text(e.displayName))) - .toList(), - onChanged: (Prise? p) { - if (p != null) { - entry.value = - entry.value.copyWith(prise: p); - } - }) - ]), - ], - ), - ), - Boxed( - title: S.of(context).addModifyTitleContract, - child: Column( - children: [ - Row( - mainAxisAlignment: MainAxisAlignment.start, - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - Padding( - padding: const EdgeInsets.only(right: 8), - child: Text(S.of(context).addModifyFor), - ), - DropdownButton( - value: entry.value.pointsForAttack, - items: [ - S.of(context).theAttack, - S.of(context).theDefense - ] - .map((e) => DropdownMenuItem( - key: UniqueKey(), - value: e == S.of(context).theAttack, - child: Text(e))) - .toList(), - onChanged: (bool? value) { - if (value != null) { - entry.value = entry.value - .copyWith(pointsForAttack: value); - } - }) - ], - ), - Row( - mainAxisAlignment: MainAxisAlignment.start, - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - Container( - constraints: - BoxConstraints.loose(const Size(60, 35)), - child: TextFormField( - controller: textPointsController, - onTap: () => textPointsController.selection = - TextSelection( - baseOffset: 0, - extentOffset: - textPointsController.text.length), - inputFormatters: [HalfDecimalInputFormatter()], - onChanged: (String value) { - final points = value.isEmpty - ? 0 - : double.tryParse(value) ?? 0; - entry.value = entry.value.copyWith( - points: (points * 2).round() / 2); - }, - keyboardType: - const TextInputType.numberWithOptions( - decimal: true), - ), - ), - Padding( - padding: const EdgeInsets.only(left: 4), - child: Text(S.of(context).points), - ), - ], - ), - Row( - mainAxisAlignment: MainAxisAlignment.start, - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - DropdownButton( - key: const ValueKey('dropdown-oudlers'), - value: entry.value.nbBouts, - items: List.generate( - players.value.length > 5 ? 7 : 4, - (index) => index) - .map((e) => DropdownMenuItem( - key: UniqueKey(), - value: e, - child: Text(e.toString()))) - .toList(), - onChanged: (int? value) { - if (value != null) { - entry.value = - entry.value.copyWith(nbBouts: value); - if (kDebugMode) { - print(entry.value); - } - } - }), - Padding( - padding: const EdgeInsets.only(left: 2), - child: Text(S - .of(context) - .addModifyOudler(entry.value.nbBouts)), - ) - ], - ) - ], - )), - Boxed( - title: S.of(context).addModifyBonus, - child: Column(children: [ - Row( + body: ref.watch(entryViewModelProvider(roundId: roundId).select( + (value) => value.when( + data: (data) { + return SingleChildScrollView( + child: Padding( + padding: const EdgeInsets.symmetric( + vertical: 8, horizontal: 16), + child: Column( + mainAxisSize: MainAxisSize.min, mainAxisAlignment: MainAxisAlignment.start, - crossAxisAlignment: CrossAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.start, children: [ - Checkbox( - value: entry.value.poignees.isNotEmpty && - entry.value.poignees[0] != PoigneeType.none, - onChanged: (bool? value) { - if (value != null) { - var p = entry.value.poignees.toList(); - if (p.isEmpty) { - p = [PoigneeType.simple]; - } - p[0] = value - ? PoigneeType.simple - : PoigneeType.none; - entry.value = - entry.value.copyWith(poignees: p); - } - }), - Expanded( - flex: 1, - child: Text(S.of(context).addModifyPoignee)), - if (entry.value.poignees.isNotEmpty) - Expanded( - flex: 2, - child: Padding( - padding: const EdgeInsets.only(left: 16), - child: DropdownButton( - key: const ValueKey('dropdown-handful'), - value: entry.value.poignees[0], - isExpanded: true, - items: PoigneeType.values - .map( - (e) => DropdownMenuItem( - key: UniqueKey(), - value: e, - child: Text(S - .of(context) - .addModifyPoigneeNbTrumps( - getNbAtouts(e, - players.value.length), - e.displayName))), - ) - .toList(), - onChanged: (PoigneeType? poignee) { - if (poignee != null) { - final p = entry.value.poignees.toList(); - p[0] = poignee; - entry.value = - entry.value.copyWith(poignees: p); - } - }), - ), + Boxed( + title: S.of(context).addModifyTitleAttack, + child: Column( + children: [ + Row( + mainAxisSize: MainAxisSize.max, + crossAxisAlignment: + CrossAxisAlignment.center, + mainAxisAlignment: + MainAxisAlignment.spaceBetween, + children: [ + Expanded( + flex: 2, + child: Text(S.of(context).preneur)), + Expanded( + flex: 5, + child: Container( + height: 35, + padding: const EdgeInsets.symmetric( + vertical: 2), + child: ListView.builder( + key: const ValueKey('player1'), + reverse: true, + scrollDirection: Axis.horizontal, + itemCount: data.allPlayers.length, + itemBuilder: (BuildContext context, + int index) { + final player = + data.allPlayers[index]; + return SelectableTag( + selected: data.taker?.id == + player.id, + text: player.name, + onPressed: () { + ref + .read( + entryViewModelProvider( + roundId: + roundId) + .notifier) + .setTaker(player); + }); + }, + ), + ), + ), + ]), + if (data.showPartnerPage) + Row( + mainAxisSize: MainAxisSize.max, + crossAxisAlignment: + CrossAxisAlignment.center, + mainAxisAlignment: + MainAxisAlignment.spaceBetween, + children: [ + Expanded( + flex: 2, + child: Text(S + .of(context) + .addModifyFirstPartner( + data.allPlayers.length > 5 + ? Tagros.tagros + : Tagros.tarot))), + Expanded( + flex: 5, + child: Container( + height: 35, + padding: const EdgeInsets.symmetric( + vertical: 2), + child: ListView.builder( + key: const ValueKey('player2'), + reverse: true, + scrollDirection: + Axis.horizontal, + itemCount: + data.allPlayers.length, + itemBuilder: + (BuildContext context, + int index) { + final player = + data.allPlayers[index]; + return SelectableTag( + selected: + data.partner1?.id == + player.id, + text: player.name, + onPressed: () { + ref + .read(entryViewModelProvider( + roundId: + roundId) + .notifier) + .setPartner1( + player); + }); + }), + ), + ), + ]), + if (data.showPartner2Page) + Row( + mainAxisSize: MainAxisSize.max, + crossAxisAlignment: + CrossAxisAlignment.center, + mainAxisAlignment: + MainAxisAlignment.spaceBetween, + children: [ + Expanded( + flex: 2, + child: Text(S + .of(context) + .addModifySecondPartner), + ), + Expanded( + flex: 5, + child: Container( + height: 35, + padding: const EdgeInsets.symmetric( + vertical: 2), + child: ListView.builder( + key: const ValueKey('player3'), + reverse: true, + scrollDirection: + Axis.horizontal, + itemCount: + data.allPlayers.length, + itemBuilder: + (BuildContext context, + int index) { + final player = + data.allPlayers[index]; + return SelectableTag( + selected: + data.partner2?.id == + player.id, + text: player.name, + onPressed: () { + ref + .read(entryViewModelProvider( + roundId: + roundId) + .notifier) + .setPartner2( + player); + }); + }), + ), + ), + ]), + Row( + mainAxisSize: MainAxisSize.max, + crossAxisAlignment: + CrossAxisAlignment.center, + mainAxisAlignment: + MainAxisAlignment.spaceBetween, + children: [ + Text(S.of(context).addModifyContractType), + DropdownButton( + key: const ValueKey( + 'dropdown-contract'), + value: data.prise, + items: Prise.values + .map((e) => + DropdownMenuItem( + value: e, + child: + Text(e.displayName))) + .toList(), + onChanged: (Prise? p) { + if (p != null) { + ref + .read(entryViewModelProvider( + roundId: roundId) + .notifier) + .setPrise(p); + } + }) + ]), + ], ), + ), + Boxed( + title: S.of(context).addModifyTitleContract, + child: Column( + children: [ + Row( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: + CrossAxisAlignment.center, + children: [ + Padding( + padding: + const EdgeInsets.only(right: 8), + child: Text(S.of(context).addModifyFor), + ), + DropdownButton( + value: data.pointsForAttack, + items: [ + S.of(context).theAttack, + S.of(context).theDefense + ] + .map((e) => + DropdownMenuItem( + key: UniqueKey(), + value: e == + S + .of(context) + .theAttack, + child: Text(e))) + .toList(), + onChanged: (bool? value) { + if (value != null) { + ref + .read(entryViewModelProvider( + roundId: roundId) + .notifier) + .setPointsForAttack(value); + } + }) + ], + ), + Row( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: + CrossAxisAlignment.center, + children: [ + Container( + constraints: BoxConstraints.loose( + const Size(60, 35)), + child: TextFormField( + controller: textPointsController, + onTap: () => + textPointsController.selection = + TextSelection( + baseOffset: 0, + extentOffset: + textPointsController + .text.length), + inputFormatters: [ + HalfDecimalInputFormatter() + ], + onChanged: (String value) => ref + .read(entryViewModelProvider( + roundId: roundId) + .notifier) + .setPoints(value), + keyboardType: const TextInputType + .numberWithOptions(decimal: true), + ), + ), + Padding( + padding: const EdgeInsets.only(left: 4), + child: Text(S.of(context).points), + ), + ], + ), + Row( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: + CrossAxisAlignment.center, + children: [ + DropdownButton( + key: const ValueKey( + 'dropdown-oudlers'), + value: data.nbBouts, + items: List.generate( + data.allPlayers.length > 5 + ? 7 + : 4, + (index) => index) + .map((e) => DropdownMenuItem( + key: UniqueKey(), + value: e, + child: Text(e.toString()))) + .toList(), + onChanged: (int? value) { + if (value != null) { + ref + .read(entryViewModelProvider( + roundId: roundId) + .notifier) + .setNbBouts(value); + } + }), + Padding( + padding: const EdgeInsets.only(left: 2), + child: Text(S + .of(context) + .addModifyOudler(data.nbBouts)), + ) + ], + ) + ], + )), + Boxed( + title: S.of(context).addModifyBonus, + child: Column(children: [ + Row( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Checkbox( + value: data.poignees.isNotEmpty && + data.poignees[0] != + PoigneeType.none, + onChanged: (bool? value) { + if (value != null) { + ref + .read(entryViewModelProvider( + roundId: roundId) + .notifier) + .switchPoignee(value); + } + }), + Expanded( + flex: 1, + child: Text( + S.of(context).addModifyPoignee)), + if (data.poignees.isNotEmpty) + Expanded( + flex: 2, + child: Padding( + padding: + const EdgeInsets.only(left: 16), + child: DropdownButton( + key: const ValueKey( + 'dropdown-handful'), + value: data.poignees[0], + isExpanded: true, + items: PoigneeType.values + .map( + (e) => DropdownMenuItem< + PoigneeType>( + key: UniqueKey(), + value: e, + child: Text(S + .of(context) + .addModifyPoigneeNbTrumps( + getNbAtouts( + e, + data.allPlayers + .length), + e.displayName))), + ) + .toList(), + onChanged: + (PoigneeType? poignee) { + if (poignee != null) { + ref + .read( + entryViewModelProvider( + roundId: + roundId) + .notifier) + .setPoignee(poignee); + } + }), + ), + ), + ], + ), + Row( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Checkbox( + value: data.petitsAuBout.isNotEmpty && + data.petitsAuBout[0] != Camp.none, + onChanged: (bool? value) { + if (value != null) { + ref + .read(entryViewModelProvider( + roundId: roundId) + .notifier) + .switchPetitAuBout(value); + } + }), + Text(S.of(context).addModifyPetitAuBout), + if (data.petitsAuBout.isNotEmpty) + Flexible( + child: Padding( + padding: + const EdgeInsets.only(left: 20), + child: DropdownButton( + key: const ValueKey( + 'dropdown-petit'), + value: data.petitsAuBout[0], + items: Camp.values + .map((e) => DropdownMenuItem( + value: e, + child: + Text(e.displayName), + )) + .toList(), + onChanged: (Camp? petit) { + if (petit != null) { + ref + .read( + entryViewModelProvider( + roundId: + roundId) + .notifier) + .setPetitAuBout(petit); + } + }), + ), + ) + ], + ) + ])), ], ), - Row( - mainAxisAlignment: MainAxisAlignment.start, - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - Checkbox( - value: entry.value.petitsAuBout.isNotEmpty && - entry.value.petitsAuBout[0] != Camp.none, - onChanged: (bool? value) { - if (value != null) { - var p = entry.value.petitsAuBout.toList(); - if (p.isEmpty) { - p = [Camp.attack]; - } - p[0] = value ? Camp.attack : Camp.none; - entry.value = - entry.value.copyWith(petitsAuBout: p); - } - }), - Text(S.of(context).addModifyPetitAuBout), - if (entry.value.petitsAuBout.isNotEmpty) - Flexible( - child: Padding( - padding: const EdgeInsets.only(left: 20), - child: DropdownButton( - key: const ValueKey('dropdown-petit'), - value: entry.value.petitsAuBout[0], - items: Camp.values - .map((e) => DropdownMenuItem( - value: e, - child: Text(e.displayName), - )) - .toList(), - onChanged: (Camp? petit) { - if (petit != null) { - final p = - entry.value.petitsAuBout.toList(); - p[0] = petit; - entry.value = entry.value - .copyWith(petitsAuBout: p); - } - }), - ), - ) - ], - ) - ])), - ], - ), - ), - ), + ), + ); + }, + error: (error, stack) => Center(child: Text(error.toString())), + loading: () => + const Center(child: CircularProgressIndicator())))), ), ); } - - bool _validate( - {required int length, - required PlayerBean? attack, - required List? withPlayers}) { - if (attack == null) return false; - if (length < 5) return true; - if (withPlayers == null || withPlayers.isEmpty) return false; - if (length == 5) return true; - if (withPlayers.length != 2) return false; - return true; - } } enum Tagros { tagros, tarot } diff --git a/lib/tagros/presentation/entry_view_model.dart b/lib/tagros/presentation/entry_view_model.dart new file mode 100644 index 0000000..77ad15e --- /dev/null +++ b/lib/tagros/presentation/entry_view_model.dart @@ -0,0 +1,277 @@ +import 'dart:async'; + +import 'package:collection/collection.dart'; +import 'package:flutter/foundation.dart'; +import 'package:freezed_annotation/freezed_annotation.dart'; +import 'package:riverpod_annotation/riverpod_annotation.dart'; +import 'package:tagros_comptes/tagros/data/source/db/db_providers.dart'; +import 'package:tagros_comptes/tagros/domain/game/camp.dart'; +import 'package:tagros_comptes/tagros/domain/game/game_with_players.dart'; +import 'package:tagros_comptes/tagros/domain/game/info_entry.dart'; +import 'package:tagros_comptes/tagros/domain/game/info_entry_player.dart'; +import 'package:tagros_comptes/tagros/domain/game/player.dart'; +import 'package:tagros_comptes/tagros/domain/game/poignee.dart'; +import 'package:tagros_comptes/tagros/domain/game/prise.dart'; +import 'package:tagros_comptes/tagros/presentation/game_view_model.dart'; + +part 'entry_view_model.freezed.dart'; +part 'entry_view_model.g.dart'; + +@Riverpod(dependencies: [currentGame, gamesDao, tableauViewModel]) +class EntryViewModel extends _$EntryViewModel { + EntryViewModel(); + + @override + Future build({int? roundId}) async { + final gameCompleter = Completer(); + ref.watch(currentGameProvider.select( + (value) => value.when( + data: (data) { + gameCompleter.complete(data); + }, + error: (error, stack) { + gameCompleter.completeError(error, stack); + }, + loading: () {}), + )); + final game = await gameCompleter.future; + final allPlayers = game.players; + + if (roundId != null) { + final entry = await ref.watch(gamesDaoProvider).fetchEntry(roundId); + return EntryUIState( + allPlayers: allPlayers.map((e) => PlayerBean.fromDb(e)).toList(), + id: entry.infoEntry.id, + taker: entry.player, + partner1: entry.withPlayers?.firstOrNull, + partner2: entry.withPlayers?.length == 2 + ? entry.withPlayers?.lastOrNull + : null, + points: entry.infoEntry.points, + nbBouts: entry.infoEntry.nbBouts, + prise: entry.infoEntry.prise, + pointsForAttack: entry.infoEntry.pointsForAttack, + petitsAuBout: entry.infoEntry.petitsAuBout, + poignees: entry.infoEntry.poignees, + ); + } + + final player1 = allPlayers.firstOrNull; + final playerBean = player1 != null ? PlayerBean.fromDb(player1) : null; + return EntryUIState( + allPlayers: + allPlayers.map((e) => PlayerBean.fromDb(e)).whereNotNull().toList(), + taker: playerBean, + partner1: allPlayers.length >= 5 ? playerBean : null, + partner2: allPlayers.length >= 7 ? playerBean : null, + ); + } + + void setTaker(PlayerBean? player) { + final uiState = state.valueOrNull; + if (uiState == null) return; + state = AsyncData(uiState.copyWith(taker: player)); + } + + void setPartner1(PlayerBean? player) { + final uiState = state.valueOrNull; + if (uiState == null) return; + state = AsyncData(uiState.copyWith(partner1: player)); + } + + void setPartner2(PlayerBean? player) { + final uiState = state.valueOrNull; + if (uiState == null) return; + state = AsyncData(uiState.copyWith(partner2: player)); + } + + void setPoints(String value) { + final uiState = state.valueOrNull; + if (uiState == null) return; + double points = value.isEmpty ? 0 : double.tryParse(value) ?? 0; + points = (points * 2).round() / 2; + state = AsyncData(uiState.copyWith(points: points)); + } + + void setNbBouts(int nbBouts) { + final uiState = state.valueOrNull; + if (uiState == null) return; + state = AsyncData(uiState.copyWith(nbBouts: nbBouts)); + } + + void setPrise(Prise prise) { + final uiState = state.valueOrNull; + if (uiState == null) return; + state = AsyncData(uiState.copyWith(prise: prise)); + } + + void setPointsForAttack(bool pointsForAttack) { + final uiState = state.valueOrNull; + if (uiState == null) return; + state = AsyncData(uiState.copyWith(pointsForAttack: pointsForAttack)); + } + + void setPetitsAuBout(List petitsAuBout) { + final uiState = state.valueOrNull; + if (uiState == null) return; + state = AsyncData(uiState.copyWith(petitsAuBout: petitsAuBout)); + } + + void switchPetitAuBout(bool on) { + final uiState = state.valueOrNull; + if (uiState == null) return; + var p = uiState.petitsAuBout.toList(); + if (p.isEmpty) { + p = [Camp.attack]; + } + p[0] = on ? Camp.attack : Camp.none; + state = AsyncData(uiState.copyWith(petitsAuBout: p)); + } + + void setPetitAuBout(Camp camp) { + final uiState = state.valueOrNull; + if (uiState == null) return; + var p = uiState.petitsAuBout.toList(); + if (p.isEmpty) { + p = [camp]; + } else { + p[0] = camp; + } + state = AsyncData(uiState.copyWith(petitsAuBout: p)); + } + + void switchPoignee(bool on) { + final uiState = state.valueOrNull; + if (uiState == null) return; + final p = uiState.poignees.toList(); + if (p.isEmpty) { + p.add(PoigneeType.simple); + } + p[0] = on ? PoigneeType.simple : PoigneeType.none; + setPoignees(p); + } + + void setPoignee(PoigneeType poignee) { + final uiState = state.valueOrNull; + if (uiState == null) return; + final p = uiState.poignees.toList(); + if (p.isEmpty) { + p.add(poignee); + } else { + p[0] = poignee; + } + setPoignees(p); + } + + void setPoignees(List poignees) { + final uiState = state.valueOrNull; + if (uiState == null) return; + state = AsyncData(uiState.copyWith(poignees: poignees)); + } + + void incrementPage() { + final uiState = state.valueOrNull; + if (uiState == null) return; + state = AsyncData(uiState.copyWith(page: uiState.page + 1)); + } + + void decrementPage() { + final uiState = state.valueOrNull; + if (uiState == null) return; + state = AsyncData(uiState.copyWith(page: uiState.page - 1)); + } + + void clear() { + final uiState = state.valueOrNull; + if (uiState == null) return; + state = AsyncData(EntryUIState(allPlayers: uiState.allPlayers)); + } + + bool showPartnerPage() { + final uiState = state.valueOrNull; + if (uiState == null) return false; + return uiState.allPlayers.length >= 5; + } + + bool showPartner2Page() { + final uiState = state.valueOrNull; + if (uiState == null) return false; + return uiState.allPlayers.length >= 7; + } + + bool _validate() { + final uiState = state.valueOrNull; + if (uiState == null) return false; + if (uiState.taker == null) return false; + + // todo check if nb points are not too high + if (uiState.points < 0) return false; + if (uiState.nbBouts < 0) return false; + + if (uiState.allPlayers.length < 5) return true; + if (uiState.partner1 == null && uiState.allPlayers.length >= 5) { + return false; + } + if (uiState.partner2 == null && uiState.allPlayers.length >= 7) { + return false; + } + return true; + } + + /// returns: + /// - first bool: saved - if the entry was saved + /// - second bool: added - if the entry was added or modified + (InfoEntryPlayerBean?, bool) saveEntry() { + if (!_validate()) return (null, false); + final uiState = state.valueOrNull; + if (uiState == null) return (null, false); + final entry = InfoEntryPlayerBean( + infoEntry: InfoEntryBean( + points: uiState.points, + nbBouts: uiState.nbBouts, + prise: uiState.prise, + pointsForAttack: uiState.pointsForAttack, + petitsAuBout: uiState.petitsAuBout, + poignees: uiState.poignees, + id: uiState.id, + ), + player: uiState.taker!, + withPlayers: uiState.partner1 == null + ? null + : uiState.partner2 == null + ? [uiState.partner1] + : [uiState.partner1, uiState.partner2], + ); + if (uiState.id != null) { + ref.read(tableauViewModelProvider)?.modifyEntry(entry); + return (entry, false); + } else { + ref.read(tableauViewModelProvider)?.addEntry(entry); + return (entry, true); + } + } +} + +@freezed +class EntryUIState with _$EntryUIState { + factory EntryUIState({ + required List allPlayers, + PlayerBean? taker, + PlayerBean? partner1, + PlayerBean? partner2, + @Default(0) double points, + @Default(0) int nbBouts, + @Default(Prise.petite) Prise prise, + @Default(true) bool pointsForAttack, + @Default([]) List petitsAuBout, + @Default([]) List poignees, + @Default(0) int page, + int? id, + }) = _EntryUIState; + + EntryUIState._(); + + bool get showPartnerPage => allPlayers.length >= 5; + + bool get showPartner2Page => allPlayers.length >= 7; +} From 6e28748b990df4635334690aec020d45b4a56bc0 Mon Sep 17 00:00:00 2001 From: OroshiX Date: Tue, 15 Aug 2023 18:21:21 +0200 Subject: [PATCH 2/6] Fix screenshot location --- integration_test/common.dart | 24 +++++++++++++++++++++--- integration_test/screenshots_test.dart | 8 ++++---- test_driver/integration_test.dart | 15 ++++++++++++++- 3 files changed, 39 insertions(+), 8 deletions(-) diff --git a/integration_test/common.dart b/integration_test/common.dart index 0c78a19..9b51e99 100644 --- a/integration_test/common.dart +++ b/integration_test/common.dart @@ -41,15 +41,33 @@ Future createApp(WidgetTester widgetTester, /// Take a screenshot of the current screen. /// Cannot take more than one screenshot per test. Future takeScreenshot( - IntegrationTestWidgetsFlutterBinding binding, WidgetTester tester, - {required String screenshotName, bool settle = true}) async { + IntegrationTestWidgetsFlutterBinding binding, + WidgetTester tester, { + required int screenshotNumber, + bool settle = true, + required String locale, + DeviceType deviceType = DeviceType.phone, +}) async { if (UniversalPlatform.isAndroid) { await binding.convertFlutterSurfaceToImage(); if (settle) { await tester.pumpAndSettle(); } } - await binding.takeScreenshot(screenshotName); + await binding + .takeScreenshot('${screenshotNumber}_${locale}_${deviceType.folderName}'); +} + +enum DeviceType { + phone("phoneScreenshots"), + sevenInchTablet("sevenInchScreenshots"), + tenInchTablet("tenInchScreenshots"), + tv("tvScreenshots"), + wearable("wearScreenshots"); + + final String folderName; + + const DeviceType(this.folderName); } class _FakeThemeRepository extends Fake implements ThemeRepository { diff --git a/integration_test/screenshots_test.dart b/integration_test/screenshots_test.dart index 5e7080f..154e190 100644 --- a/integration_test/screenshots_test.dart +++ b/integration_test/screenshots_test.dart @@ -21,7 +21,7 @@ void main() { await _addRandomRound(t, namesEn); } - await takeScreenshot(binding, t, screenshotName: '1_en-US'); + await takeScreenshot(binding, t, screenshotNumber: 1, locale: 'en'); }); testWidgets('Player dialog with 5 players fr', (t) async { await createApp(t, lang: 'fr'); @@ -31,7 +31,7 @@ void main() { await _addRandomRound(t, namesFr); } - await takeScreenshot(binding, t, screenshotName: '1_fr-FR'); + await takeScreenshot(binding, t, screenshotNumber: 1, locale: 'fr'); }); testWidgets('Edit game en', (t) async { @@ -42,7 +42,7 @@ void main() { await _editGame(t, names); await takeScreenshot(binding, t, - screenshotName: '2_en-US', settle: false); + screenshotNumber: 2, settle: false, locale: 'en'); }); testWidgets('Edit game fr', (t) async { @@ -53,7 +53,7 @@ void main() { await _editGame(t, names); await takeScreenshot(binding, t, - screenshotName: '2_fr-FR', settle: false); + screenshotNumber: 2, settle: false, locale: 'fr'); }); }); } diff --git a/test_driver/integration_test.dart b/test_driver/integration_test.dart index 54a119b..b2611ca 100644 --- a/test_driver/integration_test.dart +++ b/test_driver/integration_test.dart @@ -10,7 +10,20 @@ Future main() async { onScreenshot: (String screenshotName, List screenshotBytes, [Map? args]) async { try { - final screenshotPath = 'screenshots/$screenshotName.png'; + final splits = screenshotName.split('_'); + final String locale; + switch (splits[1]) { + case 'fr': + locale = 'fr-FR'; + case 'en': + locale = 'en-US'; + default: + locale = 'unknown'; + } + final deviceFolder = splits[2]; + final name = splits[0]; + final screenshotPath = + 'android/fastlane/metadata/android/$locale/images/$deviceFolder/${name}_$locale.png'; final file = await File(screenshotPath).create(recursive: true); await file.writeAsBytes(screenshotBytes); return true; From dfc848275737e74a13e1119bf7e90bee0aa1d25c Mon Sep 17 00:00:00 2001 From: OroshiX Date: Sun, 17 Dec 2023 20:33:59 +0100 Subject: [PATCH 3/6] Upgrade dependencies, build for macos + iOS + android --- android/app/build.gradle | 8 +- ios/.gitignore | 1 + ios/Podfile | 3 +- ios/Podfile.lock | 134 ++-- ios/build/.last_build_id | 1 + lib/main.dart | 2 +- lib/navigation/router_listenable.dart | 2 +- lib/tagros/data/source/db/app_database.dart | 2 +- lib/tagros/data/source/db/games_dao.dart | 6 +- lib/tagros/domain/game/player.dart | 6 +- lib/theme/data/theme_fake.dart | 6 +- lib/theme/domain/theme.dart | 4 +- macos/Flutter/GeneratedPluginRegistrant.swift | 4 +- macos/Podfile.lock | 57 +- macos/Runner.xcodeproj/project.pbxproj | 2 +- .../xcshareddata/xcschemes/Runner.xcscheme | 2 +- macos/Runner/AppDelegate.swift | 2 +- pubspec.lock | 573 ++++++++++-------- pubspec.yaml | 66 +- 19 files changed, 487 insertions(+), 394 deletions(-) create mode 100644 ios/build/.last_build_id diff --git a/android/app/build.gradle b/android/app/build.gradle index d6ed4cb..d288e83 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -33,7 +33,7 @@ apply plugin: 'kotlin-android' apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" android { - compileSdkVersion 33 + compileSdkVersion 34 sourceSets { main.java.srcDirs += 'src/main/kotlin' @@ -42,7 +42,7 @@ android { defaultConfig { applicationId "com.aroxoft.tagros.points" minSdkVersion 26 - targetSdkVersion 33 + targetSdkVersion 34 versionCode flutterVersionCode.toInteger() versionName flutterVersionName testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" @@ -73,6 +73,6 @@ flutter { dependencies { testImplementation 'junit:junit:4.13.2' - androidTestImplementation 'androidx.test:runner:1.5.2' - androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1' + androidTestImplementation 'androidx.test:runner:1.6.2' + androidTestImplementation 'androidx.test.espresso:espresso-core:3.6.1' } diff --git a/ios/.gitignore b/ios/.gitignore index e96ef60..1d09072 100644 --- a/ios/.gitignore +++ b/ios/.gitignore @@ -24,6 +24,7 @@ Flutter/flutter_assets/ Flutter/flutter_export_environment.sh ServiceDefinitions.json Runner/GeneratedPluginRegistrant.* +build/ios/Pods.build/ # Exceptions to above rules. !default.mode1v3 diff --git a/ios/Podfile b/ios/Podfile index 88359b2..0507ef8 100644 --- a/ios/Podfile +++ b/ios/Podfile @@ -1,5 +1,6 @@ # Uncomment this line to define a global platform for your project -# platform :ios, '11.0' + +platform :ios, '14.0' # CocoaPods analytics sends network stats synchronously affecting flutter build latency. ENV['COCOAPODS_DISABLE_STATS'] = 'true' diff --git a/ios/Podfile.lock b/ios/Podfile.lock index 3a1d2d3..319b01c 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -2,104 +2,66 @@ PODS: - Flutter (1.0.0) - flutter_native_splash (0.0.1): - Flutter - - Google-Mobile-Ads-SDK (10.4.0): - - GoogleAppMeasurement (< 11.0, >= 7.0) + - Google-Mobile-Ads-SDK (11.2.0): - GoogleUserMessagingPlatform (>= 1.1) - - google_mobile_ads (1.0.0): + - google_mobile_ads (5.1.0): - Flutter - - Google-Mobile-Ads-SDK (~> 10.4.0) + - Google-Mobile-Ads-SDK (~> 11.2.0) - webview_flutter_wkwebview - - GoogleAppMeasurement (10.11.0): - - GoogleAppMeasurement/AdIdSupport (= 10.11.0) - - GoogleUtilities/AppDelegateSwizzler (~> 7.11) - - GoogleUtilities/MethodSwizzler (~> 7.11) - - GoogleUtilities/Network (~> 7.11) - - "GoogleUtilities/NSData+zlib (~> 7.11)" - - nanopb (< 2.30910.0, >= 2.30908.0) - - GoogleAppMeasurement/AdIdSupport (10.11.0): - - GoogleAppMeasurement/WithoutAdIdSupport (= 10.11.0) - - GoogleUtilities/AppDelegateSwizzler (~> 7.11) - - GoogleUtilities/MethodSwizzler (~> 7.11) - - GoogleUtilities/Network (~> 7.11) - - "GoogleUtilities/NSData+zlib (~> 7.11)" - - nanopb (< 2.30910.0, >= 2.30908.0) - - GoogleAppMeasurement/WithoutAdIdSupport (10.11.0): - - GoogleUtilities/AppDelegateSwizzler (~> 7.11) - - GoogleUtilities/MethodSwizzler (~> 7.11) - - GoogleUtilities/Network (~> 7.11) - - "GoogleUtilities/NSData+zlib (~> 7.11)" - - nanopb (< 2.30910.0, >= 2.30908.0) - - GoogleUserMessagingPlatform (2.0.1) - - GoogleUtilities/AppDelegateSwizzler (7.11.1): - - GoogleUtilities/Environment - - GoogleUtilities/Logger - - GoogleUtilities/Network - - GoogleUtilities/Environment (7.11.1): - - PromisesObjC (< 3.0, >= 1.2) - - GoogleUtilities/Logger (7.11.1): - - GoogleUtilities/Environment - - GoogleUtilities/MethodSwizzler (7.11.1): - - GoogleUtilities/Logger - - GoogleUtilities/Network (7.11.1): - - GoogleUtilities/Logger - - "GoogleUtilities/NSData+zlib" - - GoogleUtilities/Reachability - - "GoogleUtilities/NSData+zlib (7.11.1)" - - GoogleUtilities/Reachability (7.11.1): - - GoogleUtilities/Logger - - nanopb (2.30909.0): - - nanopb/decode (= 2.30909.0) - - nanopb/encode (= 2.30909.0) - - nanopb/decode (2.30909.0) - - nanopb/encode (2.30909.0) + - GoogleUserMessagingPlatform (2.5.0) + - integration_test (0.0.1): + - Flutter - package_info_plus (0.4.5): - Flutter - path_provider_foundation (0.0.1): - Flutter - FlutterMacOS - - PromisesObjC (2.2.0) - - purchases_flutter (5.6.0): + - purchases_flutter (8.1.0): - Flutter - - PurchasesHybridCommon (= 5.6.0) - - PurchasesHybridCommon (5.6.0): - - RevenueCat (= 4.25.2) - - RevenueCat (4.25.2) - - sqlite3 (3.41.2): - - sqlite3/common (= 3.41.2) - - sqlite3/common (3.41.2) - - sqlite3/fts5 (3.41.2): + - PurchasesHybridCommon (= 13.1.0) + - PurchasesHybridCommon (13.1.0): + - RevenueCat (= 5.3.0) + - RevenueCat (5.3.0) + - "sqlite3 (3.46.1+1)": + - "sqlite3/common (= 3.46.1+1)" + - "sqlite3/common (3.46.1+1)" + - "sqlite3/dbstatvtab (3.46.1+1)": + - sqlite3/common + - "sqlite3/fts5 (3.46.1+1)": - sqlite3/common - - sqlite3/perf-threadsafe (3.41.2): + - "sqlite3/perf-threadsafe (3.46.1+1)": - sqlite3/common - - sqlite3/rtree (3.41.2): + - "sqlite3/rtree (3.46.1+1)": - sqlite3/common - sqlite3_flutter_libs (0.0.1): - Flutter - - sqlite3 (~> 3.41.2) + - "sqlite3 (~> 3.46.0+1)" + - sqlite3/dbstatvtab - sqlite3/fts5 - sqlite3/perf-threadsafe - sqlite3/rtree + - url_launcher_ios (0.0.1): + - Flutter - webview_flutter_wkwebview (0.0.1): - Flutter + - FlutterMacOS DEPENDENCIES: - Flutter (from `Flutter`) - flutter_native_splash (from `.symlinks/plugins/flutter_native_splash/ios`) - google_mobile_ads (from `.symlinks/plugins/google_mobile_ads/ios`) + - integration_test (from `.symlinks/plugins/integration_test/ios`) - package_info_plus (from `.symlinks/plugins/package_info_plus/ios`) - path_provider_foundation (from `.symlinks/plugins/path_provider_foundation/darwin`) - purchases_flutter (from `.symlinks/plugins/purchases_flutter/ios`) - sqlite3_flutter_libs (from `.symlinks/plugins/sqlite3_flutter_libs/ios`) - - webview_flutter_wkwebview (from `.symlinks/plugins/webview_flutter_wkwebview/ios`) + - url_launcher_ios (from `.symlinks/plugins/url_launcher_ios/ios`) + - webview_flutter_wkwebview (from `.symlinks/plugins/webview_flutter_wkwebview/darwin`) SPEC REPOS: trunk: - Google-Mobile-Ads-SDK - - GoogleAppMeasurement - GoogleUserMessagingPlatform - - GoogleUtilities - - nanopb - - PromisesObjC - PurchasesHybridCommon - RevenueCat - sqlite3 @@ -111,6 +73,8 @@ EXTERNAL SOURCES: :path: ".symlinks/plugins/flutter_native_splash/ios" google_mobile_ads: :path: ".symlinks/plugins/google_mobile_ads/ios" + integration_test: + :path: ".symlinks/plugins/integration_test/ios" package_info_plus: :path: ".symlinks/plugins/package_info_plus/ios" path_provider_foundation: @@ -119,28 +83,28 @@ EXTERNAL SOURCES: :path: ".symlinks/plugins/purchases_flutter/ios" sqlite3_flutter_libs: :path: ".symlinks/plugins/sqlite3_flutter_libs/ios" + url_launcher_ios: + :path: ".symlinks/plugins/url_launcher_ios/ios" webview_flutter_wkwebview: - :path: ".symlinks/plugins/webview_flutter_wkwebview/ios" + :path: ".symlinks/plugins/webview_flutter_wkwebview/darwin" SPEC CHECKSUMS: - Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854 - flutter_native_splash: 52501b97d1c0a5f898d687f1646226c1f93c56ef - Google-Mobile-Ads-SDK: 32fe7836431a06a29f7734ae092b600137c8108d - google_mobile_ads: 53b1f0d74445963e5810e34ac38dfb27aabe278e - GoogleAppMeasurement: d3dabccdb336fc0ae44b633c8abaa26559893cd9 - GoogleUserMessagingPlatform: 5f8b30daf181805317b6b985bb51c1ff3beca054 - GoogleUtilities: 9aa0ad5a7bc171f8bae016300bfcfa3fb8425749 - nanopb: b552cce312b6c8484180ef47159bc0f65a1f0431 - package_info_plus: fd030dabf36271f146f1f3beacd48f564b0f17f7 - path_provider_foundation: 29f094ae23ebbca9d3d0cec13889cd9060c0e943 - PromisesObjC: 09985d6d70fbe7878040aa746d78236e6946d2ef - purchases_flutter: 3dc327cc188495bdbf5ed695cc6a774160b57b73 - PurchasesHybridCommon: 45fc4487e06787e4b071510f9230e180f49a0a5f - RevenueCat: 3997b7af3ded18a59346e76f1365cae5a64f4281 - sqlite3: fd89671d969f3e73efe503ce203e28b016b58f68 - sqlite3_flutter_libs: 04ba0d14a04335a2fbf9a331e8664f401fbccdd5 - webview_flutter_wkwebview: 2e2d318f21a5e036e2c3f26171342e95908bd60a + Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7 + flutter_native_splash: edf599c81f74d093a4daf8e17bd7a018854bc778 + Google-Mobile-Ads-SDK: 5a6d005a6cb5b5e8f4c7b69ca05cdea79c181139 + google_mobile_ads: 9379c80fdfa9988fb0e105a407890ff8deb3cf86 + GoogleUserMessagingPlatform: 6b4f48a370e77ce121d034c908cc6ee4fdafaf13 + integration_test: 252f60fa39af5e17c3aa9899d35d908a0721b573 + package_info_plus: 58f0028419748fad15bf008b270aaa8e54380b1c + path_provider_foundation: 2b6b4c569c0fb62ec74538f866245ac84301af46 + purchases_flutter: 81d2654605bb5c9f7d777f8b51e4c949ffea83cd + PurchasesHybridCommon: 04828bd308b446146db7976c35b54d62f3659a9b + RevenueCat: 4ad1d1c656f4d66bbfde7c83a4669fa1c1cb6527 + sqlite3: 0bb0e6389d824e40296f531b858a2a0b71c0d2fb + sqlite3_flutter_libs: c00457ebd31e59fa6bb830380ddba24d44fbcd3b + url_launcher_ios: 5334b05cef931de560670eeae103fd3e431ac3fe + webview_flutter_wkwebview: 0982481e3d9c78fd5c6f62a002fcd24fc791f1e4 -PODFILE CHECKSUM: ef19549a9bc3046e7bb7d2fab4d021637c0c58a3 +PODFILE CHECKSUM: 775997f741c536251164e3eacf6e34abf2eb7a17 -COCOAPODS: 1.11.3 +COCOAPODS: 1.15.2 diff --git a/ios/build/.last_build_id b/ios/build/.last_build_id new file mode 100644 index 0000000..6e4353f --- /dev/null +++ b/ios/build/.last_build_id @@ -0,0 +1 @@ +f0f7b7c74e0cb0abb7131f886e5ff844 \ No newline at end of file diff --git a/lib/main.dart b/lib/main.dart index 6bbdaf0..d9b83be 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -49,7 +49,7 @@ class MyApp extends HookConsumerWidget { initialLocation: HomeRoute.path, debugLogDiagnostics: true, routes: $appRoutes, - redirect: notifier.redirect), + redirect:(context, state) => notifier.redirect(state)), [notifier], ); return MaterialApp.router( diff --git a/lib/navigation/router_listenable.dart b/lib/navigation/router_listenable.dart index e25a33c..6a2872a 100644 --- a/lib/navigation/router_listenable.dart +++ b/lib/navigation/router_listenable.dart @@ -37,7 +37,7 @@ class RouterListenable extends _$RouterListenable implements Listenable { }); } - String? redirect(BuildContext context, GoRouterState state) { + String? redirect(GoRouterState state) { if (state.error != null) { return '/error'; } diff --git a/lib/tagros/data/source/db/app_database.dart b/lib/tagros/data/source/db/app_database.dart index e03d51a..eb0b466 100644 --- a/lib/tagros/data/source/db/app_database.dart +++ b/lib/tagros/data/source/db/app_database.dart @@ -11,7 +11,7 @@ part 'app_database.g.dart'; const bool kDebuggingDatabase = false; class Players extends Table { - IntColumn get id => integer().autoIncrement().nullable()(); + IntColumn get id => integer().autoIncrement()(); TextColumn get pseudo => text()(); } diff --git a/lib/tagros/data/source/db/games_dao.dart b/lib/tagros/data/source/db/games_dao.dart index 6a3b9a5..795ab6d 100644 --- a/lib/tagros/data/source/db/games_dao.dart +++ b/lib/tagros/data/source/db/games_dao.dart @@ -84,7 +84,7 @@ class GamesDao extends DatabaseAccessor with _$GamesDaoMixin { // This method is called whenever the list of games changes. For each // game, now we want to load all the players in it // Create a map from id to game, for performance reasons - final idToGame = {for (var game in games) game.id: game}; + final idToGame = {for (final game in games) game.id: game}; final ids = idToGame.keys; // Select all players that are included in any game that we found @@ -106,7 +106,7 @@ class GamesDao extends DatabaseAccessor with _$GamesDaoMixin { // Finally, merge the map of games with the map of players return [ - for (var id in ids) + for (final id in ids) GameWithPlayers( game: idToGame[id]!.toCompanion(true), players: idToPlayers[id] ?? []) @@ -172,7 +172,7 @@ class GamesDao extends DatabaseAccessor with _$GamesDaoMixin { final id = await _newPlayer(playersCompanion: player); playersIds.add(id); } else { - playersIds.add(single.id!); + playersIds.add(single.id); } } return playersIds; diff --git a/lib/tagros/domain/game/player.dart b/lib/tagros/domain/game/player.dart index 9358a5c..695cce1 100644 --- a/lib/tagros/domain/game/player.dart +++ b/lib/tagros/domain/game/player.dart @@ -1,3 +1,4 @@ +import 'package:drift/drift.dart' show Value; import 'package:freezed_annotation/freezed_annotation.dart'; import 'package:tagros_comptes/tagros/data/source/db/app_database.dart'; @@ -19,5 +20,8 @@ class PlayerBean with _$PlayerBean { return "$name ($id)"; } - Player get toDb => Player(pseudo: name, id: id); + PlayersCompanion get toDbInsert => PlayersCompanion.insert(pseudo: name); + + PlayersCompanion get toDbUpdate => + PlayersCompanion(id: Value(id!), pseudo: Value(name)); } diff --git a/lib/theme/data/theme_fake.dart b/lib/theme/data/theme_fake.dart index b833240..4d9de1f 100644 --- a/lib/theme/data/theme_fake.dart +++ b/lib/theme/data/theme_fake.dart @@ -10,9 +10,9 @@ import 'package:tagros_comptes/tagros/domain/game/prise.dart'; import 'package:tagros_comptes/tagros/domain/repository/tableau_repository.dart'; const _fakePlayers = [ - Player(pseudo: "Alice"), - Player(pseudo: "Bob"), - Player(pseudo: "Charline") + Player(pseudo: "Alice", id: 1), + Player(pseudo: "Bob", id: 2), + Player(pseudo: "Charline", id: 3), ]; final _fakeInfoEntries = [ InfoEntryPlayerBean( diff --git a/lib/theme/domain/theme.dart b/lib/theme/domain/theme.dart index eed8cf5..755940e 100644 --- a/lib/theme/domain/theme.dart +++ b/lib/theme/domain/theme.dart @@ -403,9 +403,9 @@ preset: true,);'''; sliderColor.isLight ? Colors.black87 : Colors.white70, inactiveTrackColor: sliderColor.lighten(0.4)), checkboxTheme: CheckboxThemeData( - checkColor: MaterialStateProperty.all( + checkColor: WidgetStateProperty.all( sliderColor.isLight ? Colors.black : Colors.white), - fillColor: MaterialStateProperty.all(sliderColor)), + fillColor: WidgetStateProperty.all(sliderColor)), floatingActionButtonTheme: FloatingActionButtonThemeData( backgroundColor: fabColor, foregroundColor: onFabColor), colorScheme: ColorScheme.fromSwatch().copyWith(secondary: accentColor), diff --git a/macos/Flutter/GeneratedPluginRegistrant.swift b/macos/Flutter/GeneratedPluginRegistrant.swift index 4a52aaf..0ceb7fc 100644 --- a/macos/Flutter/GeneratedPluginRegistrant.swift +++ b/macos/Flutter/GeneratedPluginRegistrant.swift @@ -10,11 +10,13 @@ import path_provider_foundation import purchases_flutter import sqlite3_flutter_libs import url_launcher_macos +import webview_flutter_wkwebview func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { - FLTPackageInfoPlusPlugin.register(with: registry.registrar(forPlugin: "FLTPackageInfoPlusPlugin")) + FPPPackageInfoPlusPlugin.register(with: registry.registrar(forPlugin: "FPPPackageInfoPlusPlugin")) PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin")) PurchasesFlutterPlugin.register(with: registry.registrar(forPlugin: "PurchasesFlutterPlugin")) Sqlite3FlutterLibsPlugin.register(with: registry.registrar(forPlugin: "Sqlite3FlutterLibsPlugin")) UrlLauncherPlugin.register(with: registry.registrar(forPlugin: "UrlLauncherPlugin")) + FLTWebViewFlutterPlugin.register(with: registry.registrar(forPlugin: "FLTWebViewFlutterPlugin")) } diff --git a/macos/Podfile.lock b/macos/Podfile.lock index 72543e7..0890aa4 100644 --- a/macos/Podfile.lock +++ b/macos/Podfile.lock @@ -1,46 +1,73 @@ PODS: - FlutterMacOS (1.0.0) - - path_provider_macos (0.0.1): + - package_info_plus (0.0.1): - FlutterMacOS - - sqlite3 (3.39.4): - - sqlite3/common (= 3.39.4) - - sqlite3/common (3.39.4) - - sqlite3/fts5 (3.39.4): + - path_provider_foundation (0.0.1): + - Flutter + - FlutterMacOS + - purchases_flutter (6.5.1): + - FlutterMacOS + - PurchasesHybridCommon (= 8.1.1) + - PurchasesHybridCommon (8.1.1): + - RevenueCat (= 4.31.2) + - RevenueCat (4.31.2) + - sqlite3 (3.44.0): + - sqlite3/common (= 3.44.0) + - sqlite3/common (3.44.0) + - sqlite3/fts5 (3.44.0): - sqlite3/common - - sqlite3/perf-threadsafe (3.39.4): + - sqlite3/perf-threadsafe (3.44.0): - sqlite3/common - - sqlite3/rtree (3.39.4): + - sqlite3/rtree (3.44.0): - sqlite3/common - sqlite3_flutter_libs (0.0.1): - FlutterMacOS - - sqlite3 (~> 3.39.3) + - sqlite3 (~> 3.44.0) - sqlite3/fts5 - sqlite3/perf-threadsafe - sqlite3/rtree + - url_launcher_macos (0.0.1): + - FlutterMacOS DEPENDENCIES: - FlutterMacOS (from `Flutter/ephemeral`) - - path_provider_macos (from `Flutter/ephemeral/.symlinks/plugins/path_provider_macos/macos`) + - package_info_plus (from `Flutter/ephemeral/.symlinks/plugins/package_info_plus/macos`) + - path_provider_foundation (from `Flutter/ephemeral/.symlinks/plugins/path_provider_foundation/darwin`) + - purchases_flutter (from `Flutter/ephemeral/.symlinks/plugins/purchases_flutter/macos`) - sqlite3_flutter_libs (from `Flutter/ephemeral/.symlinks/plugins/sqlite3_flutter_libs/macos`) + - url_launcher_macos (from `Flutter/ephemeral/.symlinks/plugins/url_launcher_macos/macos`) SPEC REPOS: trunk: + - PurchasesHybridCommon + - RevenueCat - sqlite3 EXTERNAL SOURCES: FlutterMacOS: :path: Flutter/ephemeral - path_provider_macos: - :path: Flutter/ephemeral/.symlinks/plugins/path_provider_macos/macos + package_info_plus: + :path: Flutter/ephemeral/.symlinks/plugins/package_info_plus/macos + path_provider_foundation: + :path: Flutter/ephemeral/.symlinks/plugins/path_provider_foundation/darwin + purchases_flutter: + :path: Flutter/ephemeral/.symlinks/plugins/purchases_flutter/macos sqlite3_flutter_libs: :path: Flutter/ephemeral/.symlinks/plugins/sqlite3_flutter_libs/macos + url_launcher_macos: + :path: Flutter/ephemeral/.symlinks/plugins/url_launcher_macos/macos SPEC CHECKSUMS: FlutterMacOS: 8f6f14fa908a6fb3fba0cd85dbd81ec4b251fb24 - path_provider_macos: 3c0c3b4b0d4a76d2bf989a913c2de869c5641a19 - sqlite3: 401936402fe5aa242c07f87fccfee5fc2b606f45 - sqlite3_flutter_libs: cfe190df811dcc0a495dc7ab09d3cda5f92740d2 + package_info_plus: 02d7a575e80f194102bef286361c6c326e4c29ce + path_provider_foundation: 29f094ae23ebbca9d3d0cec13889cd9060c0e943 + purchases_flutter: a0dd47bdfed0f67cc93cb1da51d82ce215c80bb3 + PurchasesHybridCommon: 2439f6e671fb4d60878a652e4377fa7e588368e6 + RevenueCat: 63f6f4ae6916095561b90b2e1de86a492af67493 + sqlite3: 6e2d4a4879854d0ec86b476bf3c3e30870bac273 + sqlite3_flutter_libs: a25f3a0f522fdcd8fef6a4a50a3d681dd43d8dea + url_launcher_macos: d2691c7dd33ed713bf3544850a623080ec693d95 PODFILE CHECKSUM: 4fff5fa6395b69d39f689481e502b8d7649f640b -COCOAPODS: 1.11.3 +COCOAPODS: 1.14.3 diff --git a/macos/Runner.xcodeproj/project.pbxproj b/macos/Runner.xcodeproj/project.pbxproj index b34ced7..698bf57 100644 --- a/macos/Runner.xcodeproj/project.pbxproj +++ b/macos/Runner.xcodeproj/project.pbxproj @@ -202,7 +202,7 @@ isa = PBXProject; attributes = { LastSwiftUpdateCheck = 0920; - LastUpgradeCheck = 1300; + LastUpgradeCheck = 1510; ORGANIZATIONNAME = ""; TargetAttributes = { 33CC10EC2044A3C60003C045 = { diff --git a/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme index c876a0b..91ce69d 100644 --- a/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +++ b/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -1,6 +1,6 @@ Bool { return true diff --git a/pubspec.lock b/pubspec.lock index 37c73cf..9e40c61 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -5,26 +5,31 @@ packages: dependency: transitive description: name: _fe_analyzer_shared - sha256: "405666cd3cf0ee0a48d21ec67e65406aad2c726d9fa58840d3375e7bdcd32a07" + sha256: f256b0c0ba6c7577c15e2e4e114755640a875e885099367bf6e012b19314c834 url: "https://pub.dev" source: hosted - version: "60.0.0" + version: "72.0.0" + _macros: + dependency: transitive + description: dart + source: sdk + version: "0.3.2" analyzer: dependency: transitive description: name: analyzer - sha256: "1952250bd005bacb895a01bf1b4dc00e3ba1c526cf47dca54dfe24979c65f5b3" + sha256: b652861553cd3990d8ed361f7979dc6d7053a9ac8843fa73820ab68ce5410139 url: "https://pub.dev" source: hosted - version: "5.12.0" + version: "6.7.0" analyzer_plugin: dependency: transitive description: name: analyzer_plugin - sha256: c1d5f167683de03d5ab6c3b53fc9aeefc5d59476e7810ba7bbddff50c6f4392d + sha256: "9661b30b13a685efaee9f02e5d01ed9f2b423bd889d28a304d02d704aee69161" url: "https://pub.dev" source: hosted - version: "0.11.2" + version: "0.11.3" another_flushbar: dependency: "direct main" description: @@ -33,22 +38,30 @@ packages: url: "https://pub.dev" source: hosted version: "1.12.30" + ansicolor: + dependency: transitive + description: + name: ansicolor + sha256: "50e982d500bc863e1d703448afdbf9e5a72eb48840a4f766fa361ffd6877055f" + url: "https://pub.dev" + source: hosted + version: "2.0.3" archive: dependency: transitive description: name: archive - sha256: "0c8368c9b3f0abbc193b9d6133649a614204b528982bebc7026372d61677ce3a" + sha256: cb6a278ef2dbb298455e1a713bda08524a175630ec643a242c399c932a0a1f7d url: "https://pub.dev" source: hosted - version: "3.3.7" + version: "3.6.1" args: dependency: transitive description: name: args - sha256: eef6c46b622e0494a36c5a12d10d77fb4e855501a91c1b9ef9339326e58f0596 + sha256: "7cf60b9f0cc88203c5a190b4cd62a99feea42759a7fa695010eb5de1c0b2252a" url: "https://pub.dev" source: hosted - version: "2.4.2" + version: "2.5.0" async: dependency: "direct main" description: @@ -85,34 +98,34 @@ packages: dependency: transitive description: name: build_daemon - sha256: "5f02d73eb2ba16483e693f80bee4f088563a820e47d1027d4cdfe62b5bb43e65" + sha256: "79b2aef6ac2ed00046867ed354c88778c9c0f029df8a20fe10b5436826721ef9" url: "https://pub.dev" source: hosted - version: "4.0.0" + version: "4.0.2" build_resolvers: dependency: transitive description: name: build_resolvers - sha256: "6c4dd11d05d056e76320b828a1db0fc01ccd376922526f8e9d6c796a5adbac20" + sha256: "339086358431fa15d7eca8b6a36e5d783728cf025e559b834f4609a1fcfb7b0a" url: "https://pub.dev" source: hosted - version: "2.2.1" + version: "2.4.2" build_runner: dependency: "direct dev" description: name: build_runner - sha256: "10c6bcdbf9d049a0b666702cf1cee4ddfdc38f02a19d35ae392863b47519848b" + sha256: dd09dd4e2b078992f42aac7f1a622f01882a8492fef08486b27ddde929c19f04 url: "https://pub.dev" source: hosted - version: "2.4.6" + version: "2.4.12" build_runner_core: dependency: transitive description: name: build_runner_core - sha256: "6d6ee4276b1c5f34f21fdf39425202712d2be82019983d52f351c94aafbc2c41" + sha256: f8126682b87a7282a339b871298cc12009cb67109cfa1614d6436fb0289193e0 url: "https://pub.dev" source: hosted - version: "7.2.10" + version: "7.3.2" built_collection: dependency: transitive description: @@ -125,18 +138,18 @@ packages: dependency: transitive description: name: built_value - sha256: "598a2a682e2a7a90f08ba39c0aaa9374c5112340f0a2e275f61b59389543d166" + sha256: c7913a9737ee4007efedaffc968c049fd0f3d0e49109e778edc10de9426005cb url: "https://pub.dev" source: hosted - version: "8.6.1" + version: "8.9.2" change_app_package_name: dependency: "direct dev" description: name: change_app_package_name - sha256: f9ebaf68a4b5a68c581492579bb68273c523ef325fbf9ce2f1b57fb136ad023b + sha256: "1d6ca5fbaba7264f70857941543337b2efe48f19ae2eef29b89927541b52a787" url: "https://pub.dev" source: hosted - version: "1.1.0" + version: "1.4.0" characters: dependency: transitive description: @@ -173,10 +186,10 @@ packages: dependency: transitive description: name: cli_util - sha256: b8db3080e59b2503ca9e7922c3df2072cf13992354d5e944074ffa836fba43b7 + sha256: c05b7406fdabc7a49a3929d4af76bcaccbbffcbcdcf185b082e1ae07da323d19 url: "https://pub.dev" source: hosted - version: "0.4.0" + version: "0.4.1" clock: dependency: transitive description: @@ -189,18 +202,18 @@ packages: dependency: transitive description: name: code_builder - sha256: "4ad01d6e56db961d29661561effde45e519939fdaeb46c351275b182eac70189" + sha256: f692079e25e7869c14132d39f223f8eec9830eb76131925143b2129c4bb01b37 url: "https://pub.dev" source: hosted - version: "4.5.0" + version: "4.10.0" collection: dependency: "direct main" description: name: collection - sha256: "4a07be6cb69c84d677a6c3096fcf960cc3285a8330b4603e0d463d15d9bd934c" + sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a url: "https://pub.dev" source: hosted - version: "1.17.1" + version: "1.18.0" color: dependency: transitive description: @@ -221,18 +234,18 @@ packages: dependency: transitive description: name: coverage - sha256: "2fb815080e44a09b85e0f2ca8a820b15053982b2e714b59267719e8a9ff17097" + sha256: c1fb2dce3c0085f39dc72668e85f8e0210ec7de05345821ff58530567df345a5 url: "https://pub.dev" source: hosted - version: "1.6.3" + version: "1.9.2" crypto: dependency: transitive description: name: crypto - sha256: ff625774173754681d66daaf4a448684fb04b78f902da9cb3d308c19cc5e8bab + sha256: ec30d999af904f33454ba22ed9a86162b35e52b44ac4807d1d93c288041d7d27 url: "https://pub.dev" source: hosted - version: "3.0.3" + version: "3.0.5" csslib: dependency: transitive description: @@ -245,42 +258,42 @@ packages: dependency: "direct main" description: name: cupertino_icons - sha256: e35129dc44c9118cee2a5603506d823bab99c68393879edb440e0090d07586be + sha256: ba631d1c7f7bef6b729a622b7b752645a2d076dba9976925b8f25725a30e1ee6 url: "https://pub.dev" source: hosted - version: "1.0.5" + version: "1.0.8" custom_lint: dependency: "direct dev" description: name: custom_lint - sha256: "3ce36c04d30c60cde295588c6185b3f9800e6c18f6670a7ffdb3d5eab39bb942" + sha256: "6e1ec47427ca968f22bce734d00028ae7084361999b41673291138945c5baca0" url: "https://pub.dev" source: hosted - version: "0.4.0" + version: "0.6.7" custom_lint_builder: dependency: transitive description: name: custom_lint_builder - sha256: "73d09c9848e9f6d5c3e0a1809eac841a8d7ea123d0849feefa040e1ad60b6d06" + sha256: ba2f90fff4eff71d202d097eb14b14f87087eaaef742e956208c0eb9d3a40a21 url: "https://pub.dev" source: hosted - version: "0.4.0" + version: "0.6.7" custom_lint_core: dependency: transitive description: name: custom_lint_core - sha256: "9170d9db2daf774aa2251a3bc98e4ba903c7702ab07aa438bc83bd3c9a0de57f" + sha256: "4ddbbdaa774265de44c97054dcec058a83d9081d071785ece601e348c18c267d" url: "https://pub.dev" source: hosted - version: "0.4.0" + version: "0.6.5" dart_style: dependency: transitive description: name: dart_style - sha256: "1efa911ca7086affd35f463ca2fc1799584fb6aa89883cf0af8e3664d6a02d55" + sha256: "7856d364b589d1f08986e140938578ed36ed948581fbc3bc9aef1805039ac5ab" url: "https://pub.dev" source: hosted - version: "2.3.2" + version: "2.3.7" dartx: dependency: transitive description: @@ -293,18 +306,18 @@ packages: dependency: "direct main" description: name: drift - sha256: a255df2476431d3179f5aba7a7435a3678542642fba43de98c330ae0e0393c2e + sha256: d6ff1ec6a0f3fa097dda6b776cf601f1f3d88b53b287288e09c1306f394fb1b3 url: "https://pub.dev" source: hosted - version: "2.11.0" + version: "2.20.3" drift_dev: dependency: "direct main" description: name: drift_dev - sha256: "5f63cbc64f9e2346a1fd22bf43c5df8a35369e62cc1f7519ea95410cd5ff8ce5" + sha256: "3ee987578ca2281b5ff91eadd757cd6dd36001458d6e33784f990d67ff38f756" url: "https://pub.dev" source: hosted - version: "2.11.0" + version: "2.20.3" fake_async: dependency: transitive description: @@ -317,18 +330,18 @@ packages: dependency: transitive description: name: ffi - sha256: "7bf0adc28a23d395f19f3f1eb21dd7cfd1dd9f8e1c50051c069122e6853bc878" + sha256: "16ed7b077ef01ad6170a3d0c57caa4a112a38d7a2ed5602e0aca9ca6f3d98da6" url: "https://pub.dev" source: hosted - version: "2.1.0" + version: "2.1.3" file: dependency: transitive description: name: file - sha256: "1b92bec4fc2a72f59a8e15af5f52cd441e4a7860b49499d69dfa817af20e925d" + sha256: "5fc22d7c25582e38ad9a8515372cd9a93834027aacf1801cf01164dac0ffa08c" url: "https://pub.dev" source: hosted - version: "6.1.4" + version: "7.0.0" fixnum: dependency: transitive description: @@ -346,10 +359,10 @@ packages: dependency: "direct main" description: name: flutter_colorpicker - sha256: "458a6ed8ea480eb16ff892aedb4b7092b2804affd7e046591fb03127e8d8ef8b" + sha256: "969de5f6f9e2a570ac660fb7b501551451ea2a1ab9e2097e89475f60e07816ea" url: "https://pub.dev" source: hosted - version: "1.0.3" + version: "1.1.0" flutter_driver: dependency: "direct dev" description: flutter @@ -359,34 +372,34 @@ packages: dependency: "direct dev" description: name: flutter_gen - sha256: f04fb8653aab529ee5487f37972489bf9f73d4f0cb74a3e1c4857a5076caffa8 + sha256: "7a5f9e14a151664422d37498daa0b63cda8e1068ae2c95d32d46515cb69cd227" url: "https://pub.dev" source: hosted - version: "5.3.1" + version: "5.7.0" flutter_gen_core: dependency: transitive description: name: flutter_gen_core - sha256: e8637dd6a59860f89e5e71be0a27101ec32dad1a0ed7fd879fd23b6e91d5004d + sha256: "638d518897f1aefc55a24278968027591d50223a6943b6ae9aa576fe1494d99d" url: "https://pub.dev" source: hosted - version: "5.3.1" + version: "5.7.0" flutter_hooks: dependency: "direct main" description: name: flutter_hooks - sha256: "9eab8fd7aa752c3c1c0a364f9825851d410eb935243411682f4b1b0a4c569d71" + sha256: cde36b12f7188c85286fba9b38cc5a902e7279f36dd676967106c041dc9dde70 url: "https://pub.dev" source: hosted - version: "0.20.0" + version: "0.20.5" flutter_launcher_icons: dependency: "direct dev" description: name: flutter_launcher_icons - sha256: "526faf84284b86a4cb36d20a5e45147747b7563d921373d4ee0559c54fcdbcea" + sha256: "619817c4b65b322b5104b6bb6dfe6cda62d9729bd7ad4303ecc8b4e690a67a77" url: "https://pub.dev" source: hosted - version: "0.13.1" + version: "0.14.1" flutter_localizations: dependency: "direct main" description: flutter @@ -396,26 +409,26 @@ packages: dependency: "direct dev" description: name: flutter_native_splash - sha256: ecff62b3b893f2f665de7e4ad3de89f738941fcfcaaba8ee601e749efafa4698 + sha256: aa06fec78de2190f3db4319dd60fdc8d12b2626e93ef9828633928c2dcaea840 url: "https://pub.dev" source: hosted - version: "2.3.2" + version: "2.4.1" flutter_riverpod: dependency: transitive description: name: flutter_riverpod - sha256: b83ac5827baadefd331ea1d85110f34645827ea234ccabf53a655f41901a9bf4 + sha256: "0f1974eff5bbe774bf1d870e406fc6f29e3d6f1c46bd9c58e7172ff68a785d7d" url: "https://pub.dev" source: hosted - version: "2.3.6" + version: "2.5.1" flutter_slidable: dependency: "direct main" description: name: flutter_slidable - sha256: cc4231579e3eae41ae166660df717f4bad1359c87f4a4322ad8ba1befeb3d2be + sha256: "2c5611c0b44e20d180e4342318e1bbc28b0a44ad2c442f5df16962606fd3e8e3" url: "https://pub.dev" source: hosted - version: "3.0.0" + version: "3.1.1" flutter_test: dependency: "direct dev" description: flutter @@ -430,26 +443,26 @@ packages: dependency: "direct dev" description: name: freezed - sha256: "2df89855fe181baae3b6d714dc3c4317acf4fccd495a6f36e5e00f24144c6c3b" + sha256: "44c19278dd9d89292cf46e97dc0c1e52ce03275f40a97c5a348e802a924bf40e" url: "https://pub.dev" source: hosted - version: "2.4.1" + version: "2.5.7" freezed_annotation: dependency: "direct main" description: name: freezed_annotation - sha256: c3fd9336eb55a38cc1bbd79ab17573113a8deccd0ecbbf926cca3c62803b5c2d + sha256: c2e2d632dd9b8a2b7751117abcfc2b4888ecfe181bd9fca7170d9ef02e595fe2 url: "https://pub.dev" source: hosted - version: "2.4.1" + version: "2.4.4" frontend_server_client: dependency: transitive description: name: frontend_server_client - sha256: "408e3ca148b31c20282ad6f37ebfa6f4bdc8fede5b74bc2f08d9d92b55db3612" + sha256: f64a0333a82f30b0cca061bc3d143813a486dc086b574bfb233b7c1372427694 url: "https://pub.dev" source: hosted - version: "3.2.0" + version: "4.0.0" fuchsia_remote_debug_protocol: dependency: transitive description: flutter @@ -467,50 +480,58 @@ packages: dependency: "direct main" description: name: go_router - sha256: b3cadd2cd59a4103fd5f6bc572ca75111264698784e927aa471921c3477d5475 + sha256: "5cf5fdcf853b0629deb35891c7af643be900c3dcaed7489009f9e7dbcfe55ab6" url: "https://pub.dev" source: hosted - version: "10.0.0" + version: "14.2.8" go_router_builder: dependency: "direct dev" description: name: go_router_builder - sha256: "3e7e0ca431abd9089ff82113d8c8790ba2114ff8e3690d40c4fd38394374474d" + sha256: "3425b72dea69209754ac6b71b4da34165dcd4d4a2934713029945709a246427a" url: "https://pub.dev" source: hosted - version: "2.3.0" + version: "2.7.1" google_mobile_ads: dependency: "direct main" description: name: google_mobile_ads - sha256: "24ee4e9546866cc15ebe565dabf6a6c485ce5fbec0645fde22799800532000f0" + sha256: e2d18992d30b2be77cb6976b931112fc3c4612feffb5eb7a8b036bd7a64934da url: "https://pub.dev" source: hosted - version: "3.0.0" + version: "5.1.0" graphs: dependency: transitive description: name: graphs - sha256: aedc5a15e78fc65a6e23bcd927f24c64dd995062bcd1ca6eda65a3cff92a4d19 + sha256: "741bbf84165310a68ff28fe9e727332eef1407342fca52759cb21ad8177bb8d0" url: "https://pub.dev" source: hosted - version: "2.3.1" + version: "2.3.2" + hashcodes: + dependency: transitive + description: + name: hashcodes + sha256: "80f9410a5b3c8e110c4b7604546034749259f5d6dcca63e0d3c17c9258f1a651" + url: "https://pub.dev" + source: hosted + version: "2.0.0" hooks_riverpod: dependency: "direct main" description: name: hooks_riverpod - sha256: "117edbe7e5cfc02e31a94f97e2acd4581f54bc37fcda9dce1f606f8ac851ba24" + sha256: "97266a91c994951a06ef0ff3a1c7fb261e52ec7f74e87f0614ea0b7411b859b2" url: "https://pub.dev" source: hosted - version: "2.3.7" + version: "2.5.2" hotreloader: dependency: transitive description: name: hotreloader - sha256: "728c0613556c1d153f7e7f4a367cffacc3f5a677d7f6497a1c2b35add4e6dacf" + sha256: ed56fdc1f3a8ac924e717257621d09e9ec20e308ab6352a73a50a1d7a4d9158e url: "https://pub.dev" source: hosted - version: "3.0.6" + version: "4.2.0" html: dependency: transitive description: @@ -523,10 +544,10 @@ packages: dependency: transitive description: name: http - sha256: "759d1a329847dd0f39226c688d3e06a6b8679668e350e2891a6474f8b4bb8525" + sha256: b9c29a161230ee03d3ccf545097fccd9b87a5264228c5d348202e0f0c28f9010 url: "https://pub.dev" source: hosted - version: "1.1.0" + version: "1.2.2" http_multi_server: dependency: transitive description: @@ -547,10 +568,18 @@ packages: dependency: transitive description: name: image - sha256: a72242c9a0ffb65d03de1b7113bc4e189686fc07c7147b8b41811d0dd0e0d9bf + sha256: "2237616a36c0d69aef7549ab439b833fb7f9fb9fc861af2cc9ac3eedddd69ca8" + url: "https://pub.dev" + source: hosted + version: "4.2.0" + image_size_getter: + dependency: transitive + description: + name: image_size_getter + sha256: f98c4246144e9b968899d2dfde69091e22a539bb64bc9b0bea51505fbb490e57 url: "https://pub.dev" source: hosted - version: "4.0.17" + version: "2.1.3" integration_test: dependency: "direct dev" description: flutter @@ -560,10 +589,10 @@ packages: dependency: "direct main" description: name: intl - sha256: a3715e3bc90294e971cb7dc063fbf3cd9ee0ebf8604ffeafabd9e6f16abbdbe6 + sha256: d6f56758b7d3014a48af9701c085700aac781a92a87a62b1333b46d8879661cf url: "https://pub.dev" source: hosted - version: "0.18.0" + version: "0.19.0" io: dependency: transitive description: @@ -576,26 +605,50 @@ packages: dependency: transitive description: name: js - sha256: f2c445dce49627136094980615a031419f7f3eb393237e4ecd97ac15dea343f3 + sha256: c1b2e9b5ea78c45e1a0788d29606ba27dc5f71f019f32ca5140f61ef071838cf url: "https://pub.dev" source: hosted - version: "0.6.7" + version: "0.7.1" json_annotation: dependency: transitive description: name: json_annotation - sha256: b10a7b2ff83d83c777edba3c6a0f97045ddadd56c944e1a23a3fdf43a1bf4467 + sha256: "1ce844379ca14835a50d2f019a3099f419082cfdd231cd86a142af94dd5c6bb1" + url: "https://pub.dev" + source: hosted + version: "4.9.0" + leak_tracker: + dependency: transitive + description: + name: leak_tracker + sha256: "3f87a60e8c63aecc975dda1ceedbc8f24de75f09e4856ea27daf8958f2f0ce05" + url: "https://pub.dev" + source: hosted + version: "10.0.5" + leak_tracker_flutter_testing: + dependency: transitive + description: + name: leak_tracker_flutter_testing + sha256: "932549fb305594d82d7183ecd9fa93463e9914e1b67cacc34bc40906594a1806" url: "https://pub.dev" source: hosted - version: "4.8.1" + version: "3.0.5" + leak_tracker_testing: + dependency: transitive + description: + name: leak_tracker_testing + sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3" + url: "https://pub.dev" + source: hosted + version: "3.0.1" lint: dependency: "direct main" description: name: lint - sha256: f4bd4dbaa39f4ae8836f2d1275f2f32bc68b3a8cce0a0735dd1f7a601f06682a + sha256: d758a5211fce7fd3f5e316f804daefecdc34c7e53559716125e6da7388ae8565 url: "https://pub.dev" source: hosted - version: "2.1.2" + version: "2.3.0" logging: dependency: transitive description: @@ -604,46 +657,54 @@ packages: url: "https://pub.dev" source: hosted version: "1.2.0" + macros: + dependency: transitive + description: + name: macros + sha256: "0acaed5d6b7eab89f63350bccd82119e6c602df0f391260d0e32b5e23db79536" + url: "https://pub.dev" + source: hosted + version: "0.1.2-main.4" matcher: dependency: transitive description: name: matcher - sha256: "6501fbd55da300384b768785b83e5ce66991266cec21af89ab9ae7f5ce1c4cbb" + sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb url: "https://pub.dev" source: hosted - version: "0.12.15" + version: "0.12.16+1" material_color_utilities: dependency: transitive description: name: material_color_utilities - sha256: d92141dc6fe1dad30722f9aa826c7fbc896d021d792f80678280601aff8cf724 + sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec url: "https://pub.dev" source: hosted - version: "0.2.0" + version: "0.11.1" meta: dependency: transitive description: name: meta - sha256: "3c74dbf8763d36539f114c799d8a2d87343b5067e9d796ca22b5eb8437090ee3" + sha256: bdb68674043280c3428e9ec998512fb681678676b3c54e773629ffe74419f8c7 url: "https://pub.dev" source: hosted - version: "1.9.1" + version: "1.15.0" mime: dependency: transitive description: name: mime - sha256: e4ff8e8564c03f255408decd16e7899da1733852a9110a58fe6d1b817684a63e + sha256: "801fd0b26f14a4a58ccb09d5892c3fbdeff209594300a542492cf13fba9d247a" url: "https://pub.dev" source: hosted - version: "1.0.4" + version: "1.0.6" mockito: dependency: "direct main" description: name: mockito - sha256: "7d5b53bcd556c1bc7ffbe4e4d5a19c3e112b7e925e9e172dd7c6ad0630812616" + sha256: "6841eed20a7befac0ce07df8116c8b8233ed1f4486a7647c7fc5a02ae6163917" url: "https://pub.dev" source: hosted - version: "5.4.2" + version: "5.4.4" node_preamble: dependency: transitive description: @@ -664,106 +725,106 @@ packages: dependency: "direct main" description: name: package_info_plus - sha256: "6ff267fcd9d48cb61c8df74a82680e8b82e940231bb5f68356672fde0397334a" + sha256: a75164ade98cb7d24cfd0a13c6408927c6b217fa60dee5a7ff5c116a58f28918 url: "https://pub.dev" source: hosted - version: "4.1.0" + version: "8.0.2" package_info_plus_platform_interface: dependency: transitive description: name: package_info_plus_platform_interface - sha256: "9bc8ba46813a4cc42c66ab781470711781940780fd8beddd0c3da62506d3a6c6" + sha256: ac1f4a4847f1ade8e6a87d1f39f5d7c67490738642e2542f559ec38c37489a66 url: "https://pub.dev" source: hosted - version: "2.0.1" + version: "3.0.1" path: dependency: "direct main" description: name: path - sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917" + sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af" + url: "https://pub.dev" + source: hosted + version: "1.9.0" + path_parsing: + dependency: transitive + description: + name: path_parsing + sha256: e3e67b1629e6f7e8100b367d3db6ba6af4b1f0bb80f64db18ef1fbabd2fa9ccf url: "https://pub.dev" source: hosted - version: "1.8.3" + version: "1.0.1" path_provider: dependency: "direct main" description: name: path_provider - sha256: "909b84830485dbcd0308edf6f7368bc8fd76afa26a270420f34cabea2a6467a0" + sha256: fec0d61223fba3154d87759e3cc27fe2c8dc498f6386c6d6fc80d1afdd1bf378 url: "https://pub.dev" source: hosted - version: "2.1.0" + version: "2.1.4" path_provider_android: dependency: transitive description: name: path_provider_android - sha256: "5d44fc3314d969b84816b569070d7ace0f1dea04bd94a83f74c4829615d22ad8" + sha256: "6f01f8e37ec30b07bc424b4deabac37cacb1bc7e2e515ad74486039918a37eb7" url: "https://pub.dev" source: hosted - version: "2.1.0" + version: "2.2.10" path_provider_foundation: dependency: transitive description: name: path_provider_foundation - sha256: "1b744d3d774e5a879bb76d6cd1ecee2ba2c6960c03b1020cd35212f6aa267ac5" + sha256: f234384a3fdd67f989b4d54a5d73ca2a6c422fa55ae694381ae0f4375cd1ea16 url: "https://pub.dev" source: hosted - version: "2.3.0" + version: "2.4.0" path_provider_linux: dependency: transitive description: name: path_provider_linux - sha256: ba2b77f0c52a33db09fc8caf85b12df691bf28d983e84cf87ff6d693cfa007b3 + sha256: f7a1fe3a634fe7734c8d3f2766ad746ae2a2884abe22e241a8b301bf5cac3279 url: "https://pub.dev" source: hosted - version: "2.2.0" + version: "2.2.1" path_provider_platform_interface: dependency: transitive description: name: path_provider_platform_interface - sha256: bced5679c7df11190e1ddc35f3222c858f328fff85c3942e46e7f5589bf9eb84 + sha256: "88f5779f72ba699763fa3a3b06aa4bf6de76c8e5de842cf6f29e2e06476c2334" url: "https://pub.dev" source: hosted - version: "2.1.0" + version: "2.1.2" path_provider_windows: dependency: transitive description: name: path_provider_windows - sha256: ee0e0d164516b90ae1f970bdf29f726f1aa730d7cfc449ecc74c495378b705da + sha256: bd6f00dbd873bfb70d0761682da2b3a2c2fccc2b9e84c495821639601d81afe7 url: "https://pub.dev" source: hosted - version: "2.2.0" + version: "2.3.0" petitparser: dependency: transitive description: name: petitparser - sha256: cb3798bef7fc021ac45b308f4b51208a152792445cce0448c9a4ba5879dd8750 + sha256: c15605cd28af66339f8eb6fbe0e541bfe2d1b72d5825efc6598f3e0a31b9ad27 url: "https://pub.dev" source: hosted - version: "5.4.0" + version: "6.0.2" platform: dependency: transitive description: name: platform - sha256: "4a451831508d7d6ca779f7ac6e212b4023dd5a7d08a27a63da33756410e32b76" + sha256: "9b71283fc13df574056616011fb138fd3b793ea47cc509c189a6c3fa5f8a1a65" url: "https://pub.dev" source: hosted - version: "3.1.0" + version: "3.1.5" plugin_platform_interface: dependency: transitive description: name: plugin_platform_interface - sha256: "43798d895c929056255600343db8f049921cbec94d31ec87f1dc5c16c01935dd" + sha256: "4820fbfdb9478b1ebae27888254d445073732dae3d6ea81f0b7e06d5dedc3f02" url: "https://pub.dev" source: hosted - version: "2.1.5" - pointycastle: - dependency: transitive - description: - name: pointycastle - sha256: "7c1e5f0d23c9016c5bbd8b1473d0d3fb3fc851b876046039509e18e0c7485f2c" - url: "https://pub.dev" - source: hosted - version: "3.7.3" + version: "2.1.8" pool: dependency: transitive description: @@ -776,10 +837,10 @@ packages: dependency: transitive description: name: process - sha256: "53fd8db9cec1d37b0574e12f07520d582019cb6c44abf5479a01505099a34a09" + sha256: "21e54fd2faf1b5bdd5102afd25012184a6793927648ea81eea80552ac9405b32" url: "https://pub.dev" source: hosted - version: "4.2.4" + version: "5.0.2" pub_semver: dependency: transitive description: @@ -792,18 +853,18 @@ packages: dependency: transitive description: name: pubspec_parse - sha256: c63b2876e58e194e4b0828fcb080ad0e06d051cb607a6be51a9e084f47cb9367 + sha256: c799b721d79eb6ee6fa56f00c04b472dcd44a30d258fac2174a6ec57302678f8 url: "https://pub.dev" source: hosted - version: "1.2.3" + version: "1.3.0" purchases_flutter: dependency: "direct main" description: name: purchases_flutter - sha256: ccdc00fa84cee2ab0aa1a17a34b9b08e4eaac22b37628c0690e63098bbe7d95d + sha256: "53bd4bcb604fc2084a46689dd5e5fc1dfad10d3784f88466491c38a5e5617340" url: "https://pub.dev" source: hosted - version: "5.6.0" + version: "8.1.3" recase: dependency: transitive description: @@ -816,50 +877,50 @@ packages: dependency: transitive description: name: riverpod - sha256: "80e48bebc83010d5e67a11c9514af6b44bbac1ec77b4333c8ea65dbc79e2d8ef" + sha256: f21b32ffd26a36555e501b04f4a5dca43ed59e16343f1a30c13632b2351dfa4d url: "https://pub.dev" source: hosted - version: "2.3.6" + version: "2.5.1" riverpod_analyzer_utils: dependency: transitive description: name: riverpod_analyzer_utils - sha256: "1b2632a6fc0b659c923a4dcc7cd5da42476f5b3294c70c86c971e63bdd443384" + sha256: ac28d7bc678471ec986b42d88e5a0893513382ff7542c7ac9634463b044ac72c url: "https://pub.dev" source: hosted - version: "0.3.1" + version: "0.5.4" riverpod_annotation: dependency: "direct main" description: name: riverpod_annotation - sha256: cedd6a54b6f5764ffd5c05df57b6676bfc8c01978e14ee60a2c16891038820fe + sha256: e5e796c0eba4030c704e9dae1b834a6541814963292839dcf9638d53eba84f5c url: "https://pub.dev" source: hosted - version: "2.1.1" + version: "2.3.5" riverpod_generator: dependency: "direct dev" description: name: riverpod_generator - sha256: "691180275664a5420c87d72c1ed26ef8404d32b823807540172bfd1660425376" + sha256: "63311e361ffc578d655dfc31b48dfa4ed3bc76fd06f9be845e9bf97c5c11a429" url: "https://pub.dev" source: hosted - version: "2.2.4" + version: "2.4.3" riverpod_lint: dependency: "direct dev" description: name: riverpod_lint - sha256: "17ad319914ac6863c64524e598913c0f17e30688aca8f5b7509e96d6e372d493" + sha256: a35a92f2c2a4b7a5d95671c96c5432b42c20f26bb3e985e83d0b186471b61a85 url: "https://pub.dev" source: hosted - version: "1.4.0" + version: "2.3.13" rxdart: dependency: "direct main" description: name: rxdart - sha256: "0c7c0cedd93788d996e33041ffecda924cc54389199cde4e6a34b440f50044cb" + sha256: "5c3004a4a8dbb94bd4bf5412a4def4acdaa12e12f269737a5751369e12d1a962" url: "https://pub.dev" source: hosted - version: "0.27.7" + version: "0.28.0" shelf: dependency: transitive description: @@ -880,18 +941,18 @@ packages: dependency: transitive description: name: shelf_static - sha256: a41d3f53c4adf0f57480578c1d61d90342cd617de7fc8077b1304643c2d85c1e + sha256: c87c3875f91262785dade62d135760c2c69cb217ac759485334c5857ad89f6e3 url: "https://pub.dev" source: hosted - version: "1.1.2" + version: "1.1.3" shelf_web_socket: dependency: transitive description: name: shelf_web_socket - sha256: "9ca081be41c60190ebcb4766b2486a7d50261db7bd0f5d9615f2d653637a84c1" + sha256: "073c147238594ecd0d193f3456a5fe91c4b0abbcc68bf5cd95b36c4e194ac611" url: "https://pub.dev" source: hosted - version: "1.0.4" + version: "2.0.0" sky_engine: dependency: transitive description: flutter @@ -901,10 +962,10 @@ packages: dependency: transitive description: name: source_gen - sha256: fc0da689e5302edb6177fdd964efcb7f58912f43c28c2047a808f5bfff643d16 + sha256: "14658ba5f669685cd3d63701d01b31ea748310f7ab854e471962670abcf57832" url: "https://pub.dev" source: hosted - version: "1.4.0" + version: "1.5.0" source_helper: dependency: transitive description: @@ -917,10 +978,10 @@ packages: dependency: transitive description: name: source_map_stack_trace - sha256: "84cf769ad83aa6bb61e0aa5a18e53aea683395f196a6f39c4c881fb90ed4f7ae" + sha256: c0713a43e323c3302c2abe2a1cc89aa057a387101ebd280371d6a6c9fa68516b url: "https://pub.dev" source: hosted - version: "2.1.1" + version: "2.1.2" source_maps: dependency: transitive description: @@ -933,58 +994,66 @@ packages: dependency: transitive description: name: source_span - sha256: dd904f795d4b4f3b870833847c461801f6750a9fa8e61ea5ac53f9422b31f250 + sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c" + url: "https://pub.dev" + source: hosted + version: "1.10.0" + sprintf: + dependency: transitive + description: + name: sprintf + sha256: "1fc9ffe69d4df602376b52949af107d8f5703b77cda567c4d7d86a0693120f23" url: "https://pub.dev" source: hosted - version: "1.9.1" + version: "7.0.0" sqlite3: dependency: "direct main" description: name: sqlite3 - sha256: db65233e6b99e99b2548932f55a987961bc06d82a31a0665451fa0b4fff4c3fb + sha256: "45f168ae2213201b54e09429ed0c593dc2c88c924a1488d6f9c523a255d567cb" url: "https://pub.dev" source: hosted - version: "2.1.0" + version: "2.4.6" sqlite3_flutter_libs: dependency: "direct main" description: name: sqlite3_flutter_libs - sha256: "1e20a88d5c7ae8400e009f38ddbe8b001800a6dffa37832481a86a219bc904c7" + sha256: "62bbb4073edbcdf53f40c80775f33eea01d301b7b81417e5b3fb7395416258c1" url: "https://pub.dev" source: hosted - version: "0.5.15" + version: "0.5.24" sqlparser: dependency: transitive description: name: sqlparser - sha256: "60249badd8052dec4ad8d4bf5923da7533dad0009e92e224f8abd221665bfa22" + sha256: "852cf80f9e974ac8e1b613758a8aa640215f7701352b66a7f468e95711eb570b" url: "https://pub.dev" source: hosted - version: "0.31.0" + version: "0.38.1" stack_trace: dependency: "direct main" description: name: stack_trace - sha256: c3c7d8edb15bee7f0f74debd4b9c5f3c2ea86766fe4178eb2a18eb30a0bdaed5 + sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b" url: "https://pub.dev" source: hosted - version: "1.11.0" + version: "1.11.1" state_notifier: dependency: transitive description: name: state_notifier - sha256: "8fe42610f179b843b12371e40db58c9444f8757f8b69d181c97e50787caed289" + sha256: b8677376aa54f2d7c58280d5a007f9e8774f1968d1fb1c096adcb4792fba29bb url: "https://pub.dev" source: hosted - version: "0.7.2+1" + version: "1.0.0" stream_channel: dependency: transitive description: name: stream_channel - sha256: "83615bee9045c1d322bbbd1ba209b7a749c2cbcdcb3fdd1df8eb488b3279c1c8" + sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7 url: "https://pub.dev" source: hosted - version: "2.1.1" + version: "2.1.2" stream_transform: dependency: transitive description: @@ -1021,42 +1090,42 @@ packages: dependency: "direct dev" description: name: test - sha256: "3dac9aecf2c3991d09b9cdde4f98ded7b30804a88a0d7e4e7e1678e78d6b97f4" + sha256: "7ee44229615f8f642b68120165ae4c2a75fe77ae2065b1e55ae4711f6cf0899e" url: "https://pub.dev" source: hosted - version: "1.24.1" + version: "1.25.7" test_api: dependency: transitive description: name: test_api - sha256: eb6ac1540b26de412b3403a163d919ba86f6a973fe6cc50ae3541b80092fdcfb + sha256: "5b8a98dafc4d5c4c9c72d8b31ab2b23fc13422348d2997120294d3bac86b4ddb" url: "https://pub.dev" source: hosted - version: "0.5.1" + version: "0.7.2" test_core: dependency: transitive description: name: test_core - sha256: "5138dbffb77b2289ecb12b81c11ba46036590b72a64a7a90d6ffb880f1a29e93" + sha256: "55ea5a652e38a1dfb32943a7973f3681a60f872f8c3a05a14664ad54ef9c6696" url: "https://pub.dev" source: hosted - version: "0.5.1" + version: "0.6.4" time: dependency: transitive description: name: time - sha256: "83427e11d9072e038364a5e4da559e85869b227cf699a541be0da74f14140124" + sha256: ad8e018a6c9db36cb917a031853a1aae49467a93e0d464683e029537d848c221 url: "https://pub.dev" source: hosted - version: "2.1.3" + version: "2.1.4" timeago: dependency: "direct main" description: name: timeago - sha256: "4addcda362e51f23cf7ae2357fccd053f29d59b4ddd17fb07fc3e7febb47a456" + sha256: "054cedf68706bb142839ba0ae6b135f6b68039f0b8301cbe8784ae653d5ff8de" url: "https://pub.dev" source: hosted - version: "3.5.0" + version: "3.7.0" timing: dependency: transitive description: @@ -1093,106 +1162,114 @@ packages: dependency: "direct main" description: name: universal_platform - sha256: d315be0f6641898b280ffa34e2ddb14f3d12b1a37882557869646e0cc363d0cc + sha256: "64e16458a0ea9b99260ceb5467a214c1f298d647c659af1bff6d3bf82536b1ec" url: "https://pub.dev" source: hosted - version: "1.0.0+1" + version: "1.1.0" url_launcher: dependency: "direct main" description: name: url_launcher - sha256: "781bd58a1eb16069412365c98597726cd8810ae27435f04b3b4d3a470bacd61e" + sha256: "21b704ce5fa560ea9f3b525b43601c678728ba46725bab9b01187b4831377ed3" url: "https://pub.dev" source: hosted - version: "6.1.12" + version: "6.3.0" url_launcher_android: dependency: transitive description: name: url_launcher_android - sha256: "3dd2388cc0c42912eee04434531a26a82512b9cb1827e0214430c9bcbddfe025" + sha256: e35a698ac302dd68e41f73250bd9517fe3ab5fa4f18fe4647a0872db61bacbab url: "https://pub.dev" source: hosted - version: "6.0.38" + version: "6.3.10" url_launcher_ios: dependency: transitive description: name: url_launcher_ios - sha256: "9af7ea73259886b92199f9e42c116072f05ff9bea2dcb339ab935dfc957392c2" + sha256: e43b677296fadce447e987a2f519dcf5f6d1e527dc35d01ffab4fff5b8a7063e url: "https://pub.dev" source: hosted - version: "6.1.4" + version: "6.3.1" url_launcher_linux: dependency: transitive description: name: url_launcher_linux - sha256: "207f4ddda99b95b4d4868320a352d374b0b7e05eefad95a4a26f57da413443f5" + sha256: e2b9622b4007f97f504cd64c0128309dfb978ae66adbe944125ed9e1750f06af url: "https://pub.dev" source: hosted - version: "3.0.5" + version: "3.2.0" url_launcher_macos: dependency: transitive description: name: url_launcher_macos - sha256: "1c4fdc0bfea61a70792ce97157e5cc17260f61abbe4f39354513f39ec6fd73b1" + sha256: "769549c999acdb42b8bcfa7c43d72bf79a382ca7441ab18a808e101149daf672" url: "https://pub.dev" source: hosted - version: "3.0.6" + version: "3.2.1" url_launcher_platform_interface: dependency: transitive description: name: url_launcher_platform_interface - sha256: bfdfa402f1f3298637d71ca8ecfe840b4696698213d5346e9d12d4ab647ee2ea + sha256: "552f8a1e663569be95a8190206a38187b531910283c3e982193e4f2733f01029" url: "https://pub.dev" source: hosted - version: "2.1.3" + version: "2.3.2" url_launcher_web: dependency: transitive description: name: url_launcher_web - sha256: cc26720eefe98c1b71d85f9dc7ef0cada5132617046369d9dc296b3ecaa5cbb4 + sha256: "772638d3b34c779ede05ba3d38af34657a05ac55b06279ea6edd409e323dca8e" url: "https://pub.dev" source: hosted - version: "2.0.18" + version: "2.3.3" url_launcher_windows: dependency: transitive description: name: url_launcher_windows - sha256: "7967065dd2b5fccc18c653b97958fdf839c5478c28e767c61ee879f4e7882422" + sha256: "49c10f879746271804767cb45551ec5592cdab00ee105c06dddde1a98f73b185" url: "https://pub.dev" source: hosted - version: "3.0.7" + version: "3.1.2" uuid: dependency: transitive description: name: uuid - sha256: "648e103079f7c64a36dc7d39369cabb358d377078a051d6ae2ad3aa539519313" + sha256: a5be9ef6618a7ac1e964353ef476418026db906c4facdedaa299b7a2e71690ff url: "https://pub.dev" source: hosted - version: "3.0.7" - vector_math: + version: "4.5.1" + vector_graphics_codec: dependency: transitive description: - name: vector_math - sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803" + name: vector_graphics_codec + sha256: c86987475f162fadff579e7320c7ddda04cd2fdeffbe1129227a85d9ac9e03da url: "https://pub.dev" source: hosted - version: "2.1.4" - visibility_detector: + version: "1.1.11+1" + vector_graphics_compiler: dependency: transitive description: - name: visibility_detector - sha256: "15c54a459ec2c17b4705450483f3d5a2858e733aee893dcee9d75fd04814940d" + name: vector_graphics_compiler + sha256: "12faff3f73b1741a36ca7e31b292ddeb629af819ca9efe9953b70bd63fc8cd81" + url: "https://pub.dev" + source: hosted + version: "1.1.11+1" + vector_math: + dependency: transitive + description: + name: vector_math + sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803" url: "https://pub.dev" source: hosted - version: "0.3.3" + version: "2.1.4" vm_service: dependency: transitive description: name: vm_service - sha256: f6deed8ed625c52864792459709183da231ebf66ff0cf09e69b573227c377efe + sha256: "5c5f338a667b4c644744b661f309fb8080bb94b18a7e91ef1dbd343bed00ed6d" url: "https://pub.dev" source: hosted - version: "11.3.0" + version: "14.2.5" watcher: dependency: transitive description: @@ -1201,86 +1278,102 @@ packages: url: "https://pub.dev" source: hosted version: "1.1.0" + web: + dependency: transitive + description: + name: web + sha256: cd3543bd5798f6ad290ea73d210f423502e71900302dde696f8bff84bf89a1cb + url: "https://pub.dev" + source: hosted + version: "1.1.0" + web_socket: + dependency: transitive + description: + name: web_socket + sha256: "3c12d96c0c9a4eec095246debcea7b86c0324f22df69893d538fcc6f1b8cce83" + url: "https://pub.dev" + source: hosted + version: "0.1.6" web_socket_channel: dependency: transitive description: name: web_socket_channel - sha256: d88238e5eac9a42bb43ca4e721edba3c08c6354d4a53063afaa568516217621b + sha256: "9f187088ed104edd8662ca07af4b124465893caf063ba29758f97af57e61da8f" url: "https://pub.dev" source: hosted - version: "2.4.0" + version: "3.0.1" webdriver: dependency: transitive description: name: webdriver - sha256: "3c923e918918feeb90c4c9fdf1fe39220fa4c0e8e2c0fffaded174498ef86c49" + sha256: "003d7da9519e1e5f329422b36c4dcdf18d7d2978d1ba099ea4e45ba490ed845e" url: "https://pub.dev" source: hosted - version: "3.0.2" + version: "3.0.3" webkit_inspection_protocol: dependency: transitive description: name: webkit_inspection_protocol - sha256: "67d3a8b6c79e1987d19d848b0892e582dbb0c66c57cc1fef58a177dd2aa2823d" + sha256: "87d3f2333bb240704cd3f1c6b5b7acd8a10e7f0bc28c28dcf14e782014f4a572" url: "https://pub.dev" source: hosted - version: "1.2.0" + version: "1.2.1" webview_flutter: dependency: transitive description: name: webview_flutter - sha256: "789d52bd789373cc1e100fb634af2127e86c99cf9abde09499743270c5de8d00" + sha256: ec81f57aa1611f8ebecf1d2259da4ef052281cb5ad624131c93546c79ccc7736 url: "https://pub.dev" source: hosted - version: "4.2.2" + version: "4.9.0" webview_flutter_android: dependency: transitive description: name: webview_flutter_android - sha256: bca797abba472868655b5f1a6029c1132385685ee9db4713cb0e7f33076210c6 + sha256: "6e64fcb1c19d92024da8f33503aaeeda35825d77142c01d0ea2aa32edc79fdc8" url: "https://pub.dev" source: hosted - version: "3.9.3" + version: "3.16.7" webview_flutter_platform_interface: dependency: transitive description: name: webview_flutter_platform_interface - sha256: "564ef378cafc1a0e29f1d76ce175ef517a0a6115875dff7b43fccbef2b0aeb30" + sha256: d937581d6e558908d7ae3dc1989c4f87b786891ab47bb9df7de548a151779d8d url: "https://pub.dev" source: hosted - version: "2.4.0" + version: "2.10.0" webview_flutter_wkwebview: dependency: transitive description: name: webview_flutter_wkwebview - sha256: ed749f94ac9e814d04a258a9255cf69cfa4cc6006ff59542aea7fb4590144972 + sha256: "1942a12224ab31e9508cf00c0c6347b931b023b8a4f0811e5dec3b06f94f117d" url: "https://pub.dev" source: hosted - version: "3.7.3" + version: "3.15.0" win32: dependency: transitive description: name: win32 - sha256: f2add6fa510d3ae152903412227bda57d0d5a8da61d2c39c1fb022c9429a41c0 + sha256: "68d1e89a91ed61ad9c370f9f8b6effed9ae5e0ede22a270bdfa6daf79fc2290a" url: "https://pub.dev" source: hosted - version: "5.0.6" + version: "5.5.4" xdg_directories: dependency: transitive description: name: xdg_directories - sha256: f0c26453a2d47aa4c2570c6a033246a3fc62da2fe23c7ffdd0a7495086dc0247 + sha256: faea9dee56b520b55a566385b84f2e8de55e7496104adada9962e0bd11bcff1d url: "https://pub.dev" source: hosted - version: "1.0.2" + version: "1.0.4" xml: dependency: transitive description: name: xml - sha256: "5bc72e1e45e941d825fd7468b9b4cc3b9327942649aeb6fc5cdbf135f0a86e84" + sha256: b015a8ad1c488f66851d762d3090a21c600e479dc75e68328c52774040cf9226 url: "https://pub.dev" source: hosted - version: "6.3.0" + version: "6.5.0" yaml: dependency: transitive description: @@ -1290,5 +1383,5 @@ packages: source: hosted version: "3.1.2" sdks: - dart: ">=3.0.0 <4.0.0" - flutter: ">=3.10.0" + dart: ">=3.5.0 <4.0.0" + flutter: ">=3.24.0" diff --git a/pubspec.yaml b/pubspec.yaml index ac298e0..aa71f17 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -25,58 +25,58 @@ dependencies: collection: ^1.17.0 # The following adds the Cupertino Icons font to your application. # Use with the CupertinoIcons class for iOS style icons. - cupertino_icons: ^1.0.5 - drift: ^2.10.0 # For reactive sql - drift_dev: ^2.10.0 + cupertino_icons: ^1.0.8 + drift: ^2.20.3 # For reactive sql + drift_dev: ^2.20.3 flutter: sdk: flutter - flutter_colorpicker: ^1.0.3 - flutter_hooks: ^0.20.0 + flutter_colorpicker: ^1.1.0 + flutter_hooks: ^0.20.5 flutter_localizations: sdk: flutter - flutter_slidable: ^3.0.0 + flutter_slidable: ^3.1.1 flutter_web_plugins: sdk: flutter - freezed_annotation: ^2.4.1 - go_router: ^10.0.0 - google_mobile_ads: ^3.0.0 - hooks_riverpod: ^2.3.6 - intl: ^0.18.0 - lint: ^2.1.2 + freezed_annotation: ^2.4.4 + go_router: ^14.2.8 + google_mobile_ads: ^5.1.0 + hooks_riverpod: ^2.5.2 + intl: ^0.19.0 + lint: ^2.3.0 mockito: ^5.4.2 - package_info_plus: ^4.1.0 - path: ^1.8.2 - path_provider: ^2.0.15 + package_info_plus: ^8.0.2 + path: ^1.8.3 + path_provider: ^2.1.4 # flutter_stetho: ^0.5.2 - purchases_flutter: ^5.6.0 - riverpod_annotation: ^2.1.1 - rxdart: ^0.27.7 - sqlite3: ^2.0.0 - sqlite3_flutter_libs: ^0.5.15 + purchases_flutter: ^8.1.3 + riverpod_annotation: ^2.3.5 + rxdart: ^0.28.0 + sqlite3: ^2.4.6 + sqlite3_flutter_libs: ^0.5.24 stack_trace: ^1.11.0 timeago: ^3.5.0 tuple: ^2.0.2 - universal_platform: ^1.0.0+1 - url_launcher: ^6.1.12 + universal_platform: ^1.1.0 + url_launcher: ^6.3.0 dev_dependencies: - build_runner: ^2.4.6 - change_app_package_name: ^1.1.0 - custom_lint: ^0.4.0 + build_runner: ^2.4.12 + change_app_package_name: ^1.4.0 + custom_lint: ^0.6.7 flutter_driver: sdk: flutter - flutter_gen: ^5.3.1 - flutter_launcher_icons: ^0.13.1 - flutter_native_splash: ^2.3.1 + flutter_gen: ^5.7.0 + flutter_launcher_icons: ^0.14.1 + flutter_native_splash: ^2.4.1 flutter_test: sdk: flutter - freezed: ^2.4.1 - go_router_builder: ^2.3.0 + freezed: ^2.5.7 + go_router_builder: ^2.7.1 integration_test: sdk: flutter - riverpod_generator: ^2.2.3 - riverpod_lint: ^1.3.2 - test: ^1.24.1 + riverpod_generator: ^2.4.3 + riverpod_lint: ^2.3.13 + test: ^1.25.7 scripts: build: dart run build_runner build --delete-conflicting-outputs From c3b446b97de0d21c467cb3ad8f819e9d670b8fc2 Mon Sep 17 00:00:00 2001 From: OroshiX Date: Sun, 29 Sep 2024 15:42:31 +0200 Subject: [PATCH 4/6] Remove Guide menu, cleanup --- lib/common/presentation/settings_screen.dart | 8 ++++---- lib/main.dart | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/common/presentation/settings_screen.dart b/lib/common/presentation/settings_screen.dart index 034709f..439aef3 100644 --- a/lib/common/presentation/settings_screen.dart +++ b/lib/common/presentation/settings_screen.dart @@ -22,10 +22,10 @@ class SettingsScreen extends StatelessWidget { title: Text(S.of(context).settingsCleanUnusedPlayers), onTap: () => const CleanupRoute().push(context), ), - ListTile( - title: Text(S.of(context).settingsGuide), - onTap: () => const GuideRoute().push(context), - ), + // ListTile( + // title: Text(S.of(context).settingsGuide), + // onTap: () => const GuideRoute().push(context), + // ), ListTile( title: Text(S.of(context).settingsTheme), onTap: () => const ThemeRoute().push(context), diff --git a/lib/main.dart b/lib/main.dart index d9b83be..45a532d 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -49,7 +49,7 @@ class MyApp extends HookConsumerWidget { initialLocation: HomeRoute.path, debugLogDiagnostics: true, routes: $appRoutes, - redirect:(context, state) => notifier.redirect(state)), + redirect: (context, state) => notifier.redirect(state)), [notifier], ); return MaterialApp.router( From 5dd645f5963eb6fc0c9a5a9c5e52e052cd8acba2 Mon Sep 17 00:00:00 2001 From: OroshiX Date: Fri, 27 Sep 2024 18:56:42 +0200 Subject: [PATCH 5/6] fastlane --- android/fastlane | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android/fastlane b/android/fastlane index 987c667..cd67113 160000 --- a/android/fastlane +++ b/android/fastlane @@ -1 +1 @@ -Subproject commit 987c667bf689557ec6ada9dacbc04270db2071e2 +Subproject commit cd67113b160f0bf8113b98455547530e22c9345e From 1581667bfb2b0864de024581b9c59d3b92ba6462 Mon Sep 17 00:00:00 2001 From: OroshiX Date: Sun, 29 Sep 2024 15:58:45 +0200 Subject: [PATCH 6/6] CI flutter version --- .github/workflows/builds.yml | 2 +- .github/workflows/run-tests.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/builds.yml b/.github/workflows/builds.yml index ff42a62..f50ab2f 100644 --- a/.github/workflows/builds.yml +++ b/.github/workflows/builds.yml @@ -9,7 +9,7 @@ on: workflow_dispatch: env: - flutter_version: '3.10.0' + flutter_version: '3.24.3' java_version: '11' jobs: diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index 7d763c9..026a503 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -11,7 +11,7 @@ on: workflow_dispatch: env: - flutter_version: '3.10.0' + flutter_version: '3.24.3' java_version: '11' jobs: