From 96d3baa1a750e07b466f7eb157db382713d34b97 Mon Sep 17 00:00:00 2001 From: Carapacik Date: Sun, 3 Dec 2023 16:47:30 +0300 Subject: [PATCH] Start migration --- lib/src/core/assets/generated/assets.gen.dart | 23 + lib/src/core/assets/generated/fonts.gen.dart | 18 + .../generated/intl/messages_all.dart | 9 +- .../generated/intl/messages_en.dart | 29 +- .../generated/intl/messages_ru.dart | 31 +- lib/src/core/localization/generated/l10n.dart | 16 +- .../feature/game/bloc/game_bloc.freezed.dart | 444 ++++++++++-------- .../game/widget/keyboard_by_language.dart | 4 +- .../logic/initialization_steps.dart | 1 - .../settings/bloc/settings_bloc.freezed.dart | 213 +++++---- lib/src/feature/settings/model/app_theme.dart | 5 +- .../statistic/data/statistics_datasource.dart | 8 +- pubspec.lock | 10 +- pubspec.yaml | 8 +- 14 files changed, 477 insertions(+), 342 deletions(-) create mode 100644 lib/src/core/assets/generated/fonts.gen.dart diff --git a/lib/src/core/assets/generated/assets.gen.dart b/lib/src/core/assets/generated/assets.gen.dart index 7239bedb..42b0e33e 100644 --- a/lib/src/core/assets/generated/assets.gen.dart +++ b/lib/src/core/assets/generated/assets.gen.dart @@ -22,10 +22,33 @@ class $AssetsDictionaryGen { List get values => [en, ru]; } +class $AssetsFontsGen { + const $AssetsFontsGen(); + + /// File path: assets/fonts/Nunito-Bold.ttf + String get nunitoBold => 'assets/fonts/Nunito-Bold.ttf'; + + /// File path: assets/fonts/Nunito-ExtraBold.ttf + String get nunitoExtraBold => 'assets/fonts/Nunito-ExtraBold.ttf'; + + /// File path: assets/fonts/Nunito-Medium.ttf + String get nunitoMedium => 'assets/fonts/Nunito-Medium.ttf'; + + /// File path: assets/fonts/Nunito-Regular.ttf + String get nunitoRegular => 'assets/fonts/Nunito-Regular.ttf'; + + /// File path: assets/fonts/RobotoMono-Regular.ttf + String get robotoMonoRegular => 'assets/fonts/RobotoMono-Regular.ttf'; + + /// List of all assets + List get values => [nunitoBold, nunitoExtraBold, nunitoMedium, nunitoRegular, robotoMonoRegular]; +} + class Assets { Assets._(); static const $AssetsDictionaryGen dictionary = $AssetsDictionaryGen(); + static const $AssetsFontsGen fonts = $AssetsFontsGen(); } class AssetGenImage { diff --git a/lib/src/core/assets/generated/fonts.gen.dart b/lib/src/core/assets/generated/fonts.gen.dart new file mode 100644 index 00000000..fe6a03f5 --- /dev/null +++ b/lib/src/core/assets/generated/fonts.gen.dart @@ -0,0 +1,18 @@ +/// GENERATED CODE - DO NOT MODIFY BY HAND +/// ***************************************************** +/// FlutterGen +/// ***************************************************** + +// coverage:ignore-file +// ignore_for_file: type=lint +// ignore_for_file: directives_ordering,unnecessary_import,implicit_dynamic_list_literal,deprecated_member_use + +class FontFamily { + FontFamily._(); + + /// Font family: Nunito + static const String nunito = 'Nunito'; + + /// Font family: RobotoMono + static const String robotoMono = 'RobotoMono'; +} diff --git a/lib/src/core/localization/generated/intl/messages_all.dart b/lib/src/core/localization/generated/intl/messages_all.dart index 14f33c3b..abae25a5 100644 --- a/lib/src/core/localization/generated/intl/messages_all.dart +++ b/lib/src/core/localization/generated/intl/messages_all.dart @@ -20,7 +20,6 @@ import 'messages_en.dart' as messages_en; import 'messages_ru.dart' as messages_ru; typedef Future LibraryLoader(); - Map _deferredLibraries = { 'en': () => new SynchronousFuture(null), 'ru': () => new SynchronousFuture(null), @@ -39,8 +38,9 @@ MessageLookupByLibrary? _findExact(String localeName) { /// User programs should call this before using [localeName] for messages. Future initializeMessages(String localeName) { - var availableLocale = - Intl.verifiedLocale(localeName, (locale) => _deferredLibraries[locale] != null, onFailure: (_) => null); + var availableLocale = Intl.verifiedLocale( + localeName, (locale) => _deferredLibraries[locale] != null, + onFailure: (_) => null); if (availableLocale == null) { return new SynchronousFuture(false); } @@ -60,7 +60,8 @@ bool _messagesExistFor(String locale) { } MessageLookupByLibrary? _findGeneratedMessagesFor(String locale) { - var actualLocale = Intl.verifiedLocale(locale, _messagesExistFor, onFailure: (_) => null); + var actualLocale = + Intl.verifiedLocale(locale, _messagesExistFor, onFailure: (_) => null); if (actualLocale == null) return null; return _findExact(actualLocale); } diff --git a/lib/src/core/localization/generated/intl/messages_en.dart b/lib/src/core/localization/generated/intl/messages_en.dart index aa4c6bf2..55400d87 100644 --- a/lib/src/core/localization/generated/intl/messages_en.dart +++ b/lib/src/core/localization/generated/intl/messages_en.dart @@ -20,30 +20,34 @@ typedef String MessageIfAbsent(String messageStr, List args); class MessageLookup extends MessageLookupByLibrary { String get localeName => 'en'; - static String m0(attemptNumber) => "I couldn\'t guess the word in ${attemptNumber} attempts."; + static String m0(attemptNumber) => + "I couldn\'t guess the word in ${attemptNumber} attempts."; - static String m1(attemptNumber) => "The word is solved in ${attemptNumber}/6 attempts."; + static String m1(attemptNumber) => + "The word is solved in ${attemptNumber}/6 attempts."; static String m2(number) => "Level ${number}"; final messages = _notInlinedMessages(_notInlinedMessages); - static Map _notInlinedMessages(_) => { "about": MessageLookupByLibrary.simpleMessage("About"), "appDictionary": MessageLookupByLibrary.simpleMessage("App dictionary"), "appLanguage": MessageLookupByLibrary.simpleMessage("App language"), "appTitle": MessageLookupByLibrary.simpleMessage("Wordly Plus"), "casual": MessageLookupByLibrary.simpleMessage("Default"), - "checkResult": MessageLookupByLibrary.simpleMessage("You can check your result here:"), + "checkResult": MessageLookupByLibrary.simpleMessage( + "You can check your result here:"), "checkResultLose": m0, "checkResultWin": m1, "colorMode": MessageLookupByLibrary.simpleMessage("Color mode"), "contact": MessageLookupByLibrary.simpleMessage( "If you didn\'t find a word in the dictionary\nor it has the wrong definition,\nwrite to us, we will add it\nin the next update.\n"), - "currentStreak": MessageLookupByLibrary.simpleMessage("Current\nStreak"), + "currentStreak": + MessageLookupByLibrary.simpleMessage("Current\nStreak"), "daily": MessageLookupByLibrary.simpleMessage("Daily"), "en": MessageLookupByLibrary.simpleMessage("English"), - "guessDistribution": MessageLookupByLibrary.simpleMessage("Guess distribution"), + "guessDistribution": + MessageLookupByLibrary.simpleMessage("Guess distribution"), "highContrast": MessageLookupByLibrary.simpleMessage("High contrast"), "levelNumber": m2, "levels": MessageLookupByLibrary.simpleMessage("Levels"), @@ -51,13 +55,14 @@ class MessageLookup extends MessageLookupByLibrary { "maxStreak": MessageLookupByLibrary.simpleMessage("Max\nStreak"), "nextLevel": MessageLookupByLibrary.simpleMessage("Next level"), "nextWord": MessageLookupByLibrary.simpleMessage("Next word in"), - "notPlayed": MessageLookupByLibrary.simpleMessage("You haven\'t played a single game"), + "notPlayed": MessageLookupByLibrary.simpleMessage( + "You haven\'t played a single game"), "other": MessageLookupByLibrary.simpleMessage("Other"), "played": MessageLookupByLibrary.simpleMessage("Played"), "ru": MessageLookupByLibrary.simpleMessage("Russian"), "secretWord": MessageLookupByLibrary.simpleMessage("Secret word"), - "sendMessage": - MessageLookupByLibrary.simpleMessage("subject=WordlyPlus%20-%20New%20word&body=Word%20-%0AMeaning%20-"), + "sendMessage": MessageLookupByLibrary.simpleMessage( + "subject=WordlyPlus%20-%20New%20word&body=Word%20-%0AMeaning%20-"), "settings": MessageLookupByLibrary.simpleMessage("Settings"), "share": MessageLookupByLibrary.simpleMessage("Share"), "start": MessageLookupByLibrary.simpleMessage("Start game"), @@ -71,7 +76,9 @@ class MessageLookup extends MessageLookupByLibrary { "viewStatistic": MessageLookupByLibrary.simpleMessage("View statistic"), "winMessage": MessageLookupByLibrary.simpleMessage("You win!"), "winRate": MessageLookupByLibrary.simpleMessage("Win\nrate"), - "wordNotFound": MessageLookupByLibrary.simpleMessage("Word not found in dictionary"), - "wordTooShort": MessageLookupByLibrary.simpleMessage("Word is not correct length") + "wordNotFound": MessageLookupByLibrary.simpleMessage( + "Word not found in dictionary"), + "wordTooShort": + MessageLookupByLibrary.simpleMessage("Word is not correct length") }; } diff --git a/lib/src/core/localization/generated/intl/messages_ru.dart b/lib/src/core/localization/generated/intl/messages_ru.dart index 6c11e98a..84ab305c 100644 --- a/lib/src/core/localization/generated/intl/messages_ru.dart +++ b/lib/src/core/localization/generated/intl/messages_ru.dart @@ -20,21 +20,23 @@ typedef String MessageIfAbsent(String messageStr, List args); class MessageLookup extends MessageLookupByLibrary { String get localeName => 'ru'; - static String m0(attemptNumber) => "У меня не получилось разгадать слово за ${attemptNumber} попыток."; + static String m0(attemptNumber) => + "У меня не получилось разгадать слово за ${attemptNumber} попыток."; - static String m1(attemptNumber) => "Я угадал слово за ${attemptNumber}/6 попыток."; + static String m1(attemptNumber) => + "Я угадал слово за ${attemptNumber}/6 попыток."; static String m2(number) => "Уровень ${number}"; final messages = _notInlinedMessages(_notInlinedMessages); - static Map _notInlinedMessages(_) => { "about": MessageLookupByLibrary.simpleMessage("О приложении"), "appDictionary": MessageLookupByLibrary.simpleMessage("Язык словаря"), "appLanguage": MessageLookupByLibrary.simpleMessage("Язык приложения"), "appTitle": MessageLookupByLibrary.simpleMessage("Словень Плюс"), "casual": MessageLookupByLibrary.simpleMessage("Обычный"), - "checkResult": MessageLookupByLibrary.simpleMessage("Можешь проверить свой результат тут:"), + "checkResult": MessageLookupByLibrary.simpleMessage( + "Можешь проверить свой результат тут:"), "checkResultLose": m0, "checkResultWin": m1, "colorMode": MessageLookupByLibrary.simpleMessage("Цветовой режим"), @@ -43,15 +45,19 @@ class MessageLookup extends MessageLookupByLibrary { "currentStreak": MessageLookupByLibrary.simpleMessage("Текущая\nСерия"), "daily": MessageLookupByLibrary.simpleMessage("Ежедневный"), "en": MessageLookupByLibrary.simpleMessage("Английский"), - "guessDistribution": MessageLookupByLibrary.simpleMessage("Распределение догадок"), - "highContrast": MessageLookupByLibrary.simpleMessage("Высокий контраст"), + "guessDistribution": + MessageLookupByLibrary.simpleMessage("Распределение догадок"), + "highContrast": + MessageLookupByLibrary.simpleMessage("Высокий контраст"), "levelNumber": m2, "levels": MessageLookupByLibrary.simpleMessage("Уровни"), "loseMessage": MessageLookupByLibrary.simpleMessage("Вы проиграли"), "maxStreak": MessageLookupByLibrary.simpleMessage("Макс.\nСерия"), "nextLevel": MessageLookupByLibrary.simpleMessage("Следующий уровень"), - "nextWord": MessageLookupByLibrary.simpleMessage("Следующее слово через"), - "notPlayed": MessageLookupByLibrary.simpleMessage("Вы не сыграли ни одной игры"), + "nextWord": + MessageLookupByLibrary.simpleMessage("Следующее слово через"), + "notPlayed": + MessageLookupByLibrary.simpleMessage("Вы не сыграли ни одной игры"), "other": MessageLookupByLibrary.simpleMessage("Другой"), "played": MessageLookupByLibrary.simpleMessage("Сыграно"), "ru": MessageLookupByLibrary.simpleMessage("Русский"), @@ -68,10 +74,13 @@ class MessageLookup extends MessageLookupByLibrary { "themeSystem": MessageLookupByLibrary.simpleMessage("Системная"), "tutorial": MessageLookupByLibrary.simpleMessage("Как играть"), "viewLevels": MessageLookupByLibrary.simpleMessage("Посмотреть уровни"), - "viewStatistic": MessageLookupByLibrary.simpleMessage("Посмотреть статистику"), + "viewStatistic": + MessageLookupByLibrary.simpleMessage("Посмотреть статистику"), "winMessage": MessageLookupByLibrary.simpleMessage("Вы победили!"), "winRate": MessageLookupByLibrary.simpleMessage("Показатель\nпобед"), - "wordNotFound": MessageLookupByLibrary.simpleMessage("Слово не найдено в словаре"), - "wordTooShort": MessageLookupByLibrary.simpleMessage("Слово неправильной длины") + "wordNotFound": + MessageLookupByLibrary.simpleMessage("Слово не найдено в словаре"), + "wordTooShort": + MessageLookupByLibrary.simpleMessage("Слово неправильной длины") }; } diff --git a/lib/src/core/localization/generated/l10n.dart b/lib/src/core/localization/generated/l10n.dart index 564533ba..51ae3f41 100644 --- a/lib/src/core/localization/generated/l10n.dart +++ b/lib/src/core/localization/generated/l10n.dart @@ -1,7 +1,6 @@ // GENERATED CODE - DO NOT MODIFY BY HAND import 'package:flutter/material.dart'; import 'package:intl/intl.dart'; - import 'intl/messages_all.dart'; // ************************************************************************** @@ -27,7 +26,9 @@ class GeneratedLocalization { static const AppLocalizationDelegate delegate = AppLocalizationDelegate(); static Future load(Locale locale) { - final name = (locale.countryCode?.isEmpty ?? false) ? locale.languageCode : locale.toString(); + final name = (locale.countryCode?.isEmpty ?? false) + ? locale.languageCode + : locale.toString(); final localeName = Intl.canonicalizedLocale(name); return initializeMessages(localeName).then((_) { Intl.defaultLocale = localeName; @@ -46,7 +47,8 @@ class GeneratedLocalization { } static GeneratedLocalization? maybeOf(BuildContext context) { - return Localizations.of(context, GeneratedLocalization); + return Localizations.of( + context, GeneratedLocalization); } /// `About` @@ -470,7 +472,8 @@ class GeneratedLocalization { } } -class AppLocalizationDelegate extends LocalizationsDelegate { +class AppLocalizationDelegate + extends LocalizationsDelegate { const AppLocalizationDelegate(); List get supportedLocales { @@ -482,10 +485,9 @@ class AppLocalizationDelegate extends LocalizationsDelegate _isSupported(locale); - @override - Future load(Locale locale) => GeneratedLocalization.load(locale); - + Future load(Locale locale) => + GeneratedLocalization.load(locale); @override bool shouldReload(AppLocalizationDelegate old) => false; diff --git a/lib/src/feature/game/bloc/game_bloc.freezed.dart b/lib/src/feature/game/bloc/game_bloc.freezed.dart index 3267e3c1..72d56a28 100644 --- a/lib/src/feature/game/bloc/game_bloc.freezed.dart +++ b/lib/src/feature/game/bloc/game_bloc.freezed.dart @@ -18,17 +18,18 @@ final _privateConstructorUsedError = UnsupportedError( mixin _$GameEvent { @optionalTypeArgs TResult map({ - required TResult Function(_GameEventChangeDictionary value) changeDictionary, + required TResult Function(_GameEventChangeDictionary value) + changeDictionary, required TResult Function(_GameEventChangeGameMode value) changeGameMode, required TResult Function(_GameEventResetBoard value) resetBoard, required TResult Function(_GameEventLetterPressed value) letterPressed, required TResult Function(_GameEventDeletePressed value) deletePressed, - required TResult Function(_GameEventDeleteLongPressed value) deleteLongPressed, + required TResult Function(_GameEventDeleteLongPressed value) + deleteLongPressed, required TResult Function(_GameEventEnterPressed value) enterPressed, required TResult Function(_GameEventListenKeyEvent value) listenKeyEvent, }) => throw _privateConstructorUsedError; - @optionalTypeArgs TResult? mapOrNull({ TResult? Function(_GameEventChangeDictionary value)? changeDictionary, @@ -58,16 +59,17 @@ mixin _$GameEvent { /// @nodoc abstract class $GameEventCopyWith<$Res> { - factory $GameEventCopyWith(GameEvent value, $Res Function(GameEvent) then) = _$GameEventCopyWithImpl<$Res, GameEvent>; + factory $GameEventCopyWith(GameEvent value, $Res Function(GameEvent) then) = + _$GameEventCopyWithImpl<$Res, GameEvent>; } /// @nodoc -class _$GameEventCopyWithImpl<$Res, $Val extends GameEvent> implements $GameEventCopyWith<$Res> { +class _$GameEventCopyWithImpl<$Res, $Val extends GameEvent> + implements $GameEventCopyWith<$Res> { _$GameEventCopyWithImpl(this._value, this._then); // ignore: unused_field final $Val _value; - // ignore: unused_field final $Res Function($Val) _then; } @@ -75,9 +77,9 @@ class _$GameEventCopyWithImpl<$Res, $Val extends GameEvent> implements $GameEven /// @nodoc abstract class _$$GameEventChangeDictionaryImplCopyWith<$Res> { factory _$$GameEventChangeDictionaryImplCopyWith( - _$GameEventChangeDictionaryImpl value, $Res Function(_$GameEventChangeDictionaryImpl) then) = + _$GameEventChangeDictionaryImpl value, + $Res Function(_$GameEventChangeDictionaryImpl) then) = __$$GameEventChangeDictionaryImplCopyWithImpl<$Res>; - @useResult $Res call({Locale dictionary}); } @@ -87,7 +89,8 @@ class __$$GameEventChangeDictionaryImplCopyWithImpl<$Res> extends _$GameEventCopyWithImpl<$Res, _$GameEventChangeDictionaryImpl> implements _$$GameEventChangeDictionaryImplCopyWith<$Res> { __$$GameEventChangeDictionaryImplCopyWithImpl( - _$GameEventChangeDictionaryImpl _value, $Res Function(_$GameEventChangeDictionaryImpl) _then) + _$GameEventChangeDictionaryImpl _value, + $Res Function(_$GameEventChangeDictionaryImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @@ -122,7 +125,8 @@ class _$GameEventChangeDictionaryImpl implements _GameEventChangeDictionary { return identical(this, other) || (other.runtimeType == runtimeType && other is _$GameEventChangeDictionaryImpl && - (identical(other.dictionary, dictionary) || other.dictionary == dictionary)); + (identical(other.dictionary, dictionary) || + other.dictionary == dictionary)); } @override @@ -131,18 +135,21 @@ class _$GameEventChangeDictionaryImpl implements _GameEventChangeDictionary { @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$GameEventChangeDictionaryImplCopyWith<_$GameEventChangeDictionaryImpl> get copyWith => - __$$GameEventChangeDictionaryImplCopyWithImpl<_$GameEventChangeDictionaryImpl>(this, _$identity); + _$$GameEventChangeDictionaryImplCopyWith<_$GameEventChangeDictionaryImpl> + get copyWith => __$$GameEventChangeDictionaryImplCopyWithImpl< + _$GameEventChangeDictionaryImpl>(this, _$identity); @override @optionalTypeArgs TResult map({ - required TResult Function(_GameEventChangeDictionary value) changeDictionary, + required TResult Function(_GameEventChangeDictionary value) + changeDictionary, required TResult Function(_GameEventChangeGameMode value) changeGameMode, required TResult Function(_GameEventResetBoard value) resetBoard, required TResult Function(_GameEventLetterPressed value) letterPressed, required TResult Function(_GameEventDeletePressed value) deletePressed, - required TResult Function(_GameEventDeleteLongPressed value) deleteLongPressed, + required TResult Function(_GameEventDeleteLongPressed value) + deleteLongPressed, required TResult Function(_GameEventEnterPressed value) enterPressed, required TResult Function(_GameEventListenKeyEvent value) listenKeyEvent, }) { @@ -185,21 +192,21 @@ class _$GameEventChangeDictionaryImpl implements _GameEventChangeDictionary { } abstract class _GameEventChangeDictionary implements GameEvent { - const factory _GameEventChangeDictionary(final Locale dictionary) = _$GameEventChangeDictionaryImpl; + const factory _GameEventChangeDictionary(final Locale dictionary) = + _$GameEventChangeDictionaryImpl; Locale get dictionary; - @JsonKey(ignore: true) - _$$GameEventChangeDictionaryImplCopyWith<_$GameEventChangeDictionaryImpl> get copyWith => - throw _privateConstructorUsedError; + _$$GameEventChangeDictionaryImplCopyWith<_$GameEventChangeDictionaryImpl> + get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class _$$GameEventChangeGameModeImplCopyWith<$Res> { factory _$$GameEventChangeGameModeImplCopyWith( - _$GameEventChangeGameModeImpl value, $Res Function(_$GameEventChangeGameModeImpl) then) = + _$GameEventChangeGameModeImpl value, + $Res Function(_$GameEventChangeGameModeImpl) then) = __$$GameEventChangeGameModeImplCopyWithImpl<$Res>; - @useResult $Res call({GameMode gameMode}); } @@ -209,7 +216,8 @@ class __$$GameEventChangeGameModeImplCopyWithImpl<$Res> extends _$GameEventCopyWithImpl<$Res, _$GameEventChangeGameModeImpl> implements _$$GameEventChangeGameModeImplCopyWith<$Res> { __$$GameEventChangeGameModeImplCopyWithImpl( - _$GameEventChangeGameModeImpl _value, $Res Function(_$GameEventChangeGameModeImpl) _then) + _$GameEventChangeGameModeImpl _value, + $Res Function(_$GameEventChangeGameModeImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @@ -244,7 +252,8 @@ class _$GameEventChangeGameModeImpl implements _GameEventChangeGameMode { return identical(this, other) || (other.runtimeType == runtimeType && other is _$GameEventChangeGameModeImpl && - (identical(other.gameMode, gameMode) || other.gameMode == gameMode)); + (identical(other.gameMode, gameMode) || + other.gameMode == gameMode)); } @override @@ -253,18 +262,21 @@ class _$GameEventChangeGameModeImpl implements _GameEventChangeGameMode { @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$GameEventChangeGameModeImplCopyWith<_$GameEventChangeGameModeImpl> get copyWith => - __$$GameEventChangeGameModeImplCopyWithImpl<_$GameEventChangeGameModeImpl>(this, _$identity); + _$$GameEventChangeGameModeImplCopyWith<_$GameEventChangeGameModeImpl> + get copyWith => __$$GameEventChangeGameModeImplCopyWithImpl< + _$GameEventChangeGameModeImpl>(this, _$identity); @override @optionalTypeArgs TResult map({ - required TResult Function(_GameEventChangeDictionary value) changeDictionary, + required TResult Function(_GameEventChangeDictionary value) + changeDictionary, required TResult Function(_GameEventChangeGameMode value) changeGameMode, required TResult Function(_GameEventResetBoard value) resetBoard, required TResult Function(_GameEventLetterPressed value) letterPressed, required TResult Function(_GameEventDeletePressed value) deletePressed, - required TResult Function(_GameEventDeleteLongPressed value) deleteLongPressed, + required TResult Function(_GameEventDeleteLongPressed value) + deleteLongPressed, required TResult Function(_GameEventEnterPressed value) enterPressed, required TResult Function(_GameEventListenKeyEvent value) listenKeyEvent, }) { @@ -307,30 +319,30 @@ class _$GameEventChangeGameModeImpl implements _GameEventChangeGameMode { } abstract class _GameEventChangeGameMode implements GameEvent { - const factory _GameEventChangeGameMode(final GameMode gameMode) = _$GameEventChangeGameModeImpl; + const factory _GameEventChangeGameMode(final GameMode gameMode) = + _$GameEventChangeGameModeImpl; GameMode get gameMode; - @JsonKey(ignore: true) - _$$GameEventChangeGameModeImplCopyWith<_$GameEventChangeGameModeImpl> get copyWith => - throw _privateConstructorUsedError; + _$$GameEventChangeGameModeImplCopyWith<_$GameEventChangeGameModeImpl> + get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class _$$GameEventResetBoardImplCopyWith<$Res> { - factory _$$GameEventResetBoardImplCopyWith( - _$GameEventResetBoardImpl value, $Res Function(_$GameEventResetBoardImpl) then) = + factory _$$GameEventResetBoardImplCopyWith(_$GameEventResetBoardImpl value, + $Res Function(_$GameEventResetBoardImpl) then) = __$$GameEventResetBoardImplCopyWithImpl<$Res>; - @useResult $Res call({GameMode gameMode}); } /// @nodoc -class __$$GameEventResetBoardImplCopyWithImpl<$Res> extends _$GameEventCopyWithImpl<$Res, _$GameEventResetBoardImpl> +class __$$GameEventResetBoardImplCopyWithImpl<$Res> + extends _$GameEventCopyWithImpl<$Res, _$GameEventResetBoardImpl> implements _$$GameEventResetBoardImplCopyWith<$Res> { - __$$GameEventResetBoardImplCopyWithImpl( - _$GameEventResetBoardImpl _value, $Res Function(_$GameEventResetBoardImpl) _then) + __$$GameEventResetBoardImplCopyWithImpl(_$GameEventResetBoardImpl _value, + $Res Function(_$GameEventResetBoardImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @@ -365,7 +377,8 @@ class _$GameEventResetBoardImpl implements _GameEventResetBoard { return identical(this, other) || (other.runtimeType == runtimeType && other is _$GameEventResetBoardImpl && - (identical(other.gameMode, gameMode) || other.gameMode == gameMode)); + (identical(other.gameMode, gameMode) || + other.gameMode == gameMode)); } @override @@ -375,17 +388,20 @@ class _$GameEventResetBoardImpl implements _GameEventResetBoard { @override @pragma('vm:prefer-inline') _$$GameEventResetBoardImplCopyWith<_$GameEventResetBoardImpl> get copyWith => - __$$GameEventResetBoardImplCopyWithImpl<_$GameEventResetBoardImpl>(this, _$identity); + __$$GameEventResetBoardImplCopyWithImpl<_$GameEventResetBoardImpl>( + this, _$identity); @override @optionalTypeArgs TResult map({ - required TResult Function(_GameEventChangeDictionary value) changeDictionary, + required TResult Function(_GameEventChangeDictionary value) + changeDictionary, required TResult Function(_GameEventChangeGameMode value) changeGameMode, required TResult Function(_GameEventResetBoard value) resetBoard, required TResult Function(_GameEventLetterPressed value) letterPressed, required TResult Function(_GameEventDeletePressed value) deletePressed, - required TResult Function(_GameEventDeleteLongPressed value) deleteLongPressed, + required TResult Function(_GameEventDeleteLongPressed value) + deleteLongPressed, required TResult Function(_GameEventEnterPressed value) enterPressed, required TResult Function(_GameEventListenKeyEvent value) listenKeyEvent, }) { @@ -428,20 +444,21 @@ class _$GameEventResetBoardImpl implements _GameEventResetBoard { } abstract class _GameEventResetBoard implements GameEvent { - const factory _GameEventResetBoard(final GameMode gameMode) = _$GameEventResetBoardImpl; + const factory _GameEventResetBoard(final GameMode gameMode) = + _$GameEventResetBoardImpl; GameMode get gameMode; - @JsonKey(ignore: true) - _$$GameEventResetBoardImplCopyWith<_$GameEventResetBoardImpl> get copyWith => throw _privateConstructorUsedError; + _$$GameEventResetBoardImplCopyWith<_$GameEventResetBoardImpl> get copyWith => + throw _privateConstructorUsedError; } /// @nodoc abstract class _$$GameEventLetterPressedImplCopyWith<$Res> { factory _$$GameEventLetterPressedImplCopyWith( - _$GameEventLetterPressedImpl value, $Res Function(_$GameEventLetterPressedImpl) then) = + _$GameEventLetterPressedImpl value, + $Res Function(_$GameEventLetterPressedImpl) then) = __$$GameEventLetterPressedImplCopyWithImpl<$Res>; - @useResult $Res call({String key}); } @@ -451,7 +468,8 @@ class __$$GameEventLetterPressedImplCopyWithImpl<$Res> extends _$GameEventCopyWithImpl<$Res, _$GameEventLetterPressedImpl> implements _$$GameEventLetterPressedImplCopyWith<$Res> { __$$GameEventLetterPressedImplCopyWithImpl( - _$GameEventLetterPressedImpl _value, $Res Function(_$GameEventLetterPressedImpl) _then) + _$GameEventLetterPressedImpl _value, + $Res Function(_$GameEventLetterPressedImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @@ -495,18 +513,21 @@ class _$GameEventLetterPressedImpl implements _GameEventLetterPressed { @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$GameEventLetterPressedImplCopyWith<_$GameEventLetterPressedImpl> get copyWith => - __$$GameEventLetterPressedImplCopyWithImpl<_$GameEventLetterPressedImpl>(this, _$identity); + _$$GameEventLetterPressedImplCopyWith<_$GameEventLetterPressedImpl> + get copyWith => __$$GameEventLetterPressedImplCopyWithImpl< + _$GameEventLetterPressedImpl>(this, _$identity); @override @optionalTypeArgs TResult map({ - required TResult Function(_GameEventChangeDictionary value) changeDictionary, + required TResult Function(_GameEventChangeDictionary value) + changeDictionary, required TResult Function(_GameEventChangeGameMode value) changeGameMode, required TResult Function(_GameEventResetBoard value) resetBoard, required TResult Function(_GameEventLetterPressed value) letterPressed, required TResult Function(_GameEventDeletePressed value) deletePressed, - required TResult Function(_GameEventDeleteLongPressed value) deleteLongPressed, + required TResult Function(_GameEventDeleteLongPressed value) + deleteLongPressed, required TResult Function(_GameEventEnterPressed value) enterPressed, required TResult Function(_GameEventListenKeyEvent value) listenKeyEvent, }) { @@ -549,19 +570,20 @@ class _$GameEventLetterPressedImpl implements _GameEventLetterPressed { } abstract class _GameEventLetterPressed implements GameEvent { - const factory _GameEventLetterPressed(final String key) = _$GameEventLetterPressedImpl; + const factory _GameEventLetterPressed(final String key) = + _$GameEventLetterPressedImpl; String get key; - @JsonKey(ignore: true) - _$$GameEventLetterPressedImplCopyWith<_$GameEventLetterPressedImpl> get copyWith => - throw _privateConstructorUsedError; + _$$GameEventLetterPressedImplCopyWith<_$GameEventLetterPressedImpl> + get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class _$$GameEventDeletePressedImplCopyWith<$Res> { factory _$$GameEventDeletePressedImplCopyWith( - _$GameEventDeletePressedImpl value, $Res Function(_$GameEventDeletePressedImpl) then) = + _$GameEventDeletePressedImpl value, + $Res Function(_$GameEventDeletePressedImpl) then) = __$$GameEventDeletePressedImplCopyWithImpl<$Res>; } @@ -570,7 +592,8 @@ class __$$GameEventDeletePressedImplCopyWithImpl<$Res> extends _$GameEventCopyWithImpl<$Res, _$GameEventDeletePressedImpl> implements _$$GameEventDeletePressedImplCopyWith<$Res> { __$$GameEventDeletePressedImplCopyWithImpl( - _$GameEventDeletePressedImpl _value, $Res Function(_$GameEventDeletePressedImpl) _then) + _$GameEventDeletePressedImpl _value, + $Res Function(_$GameEventDeletePressedImpl) _then) : super(_value, _then); } @@ -586,7 +609,9 @@ class _$GameEventDeletePressedImpl implements _GameEventDeletePressed { @override bool operator ==(dynamic other) { - return identical(this, other) || (other.runtimeType == runtimeType && other is _$GameEventDeletePressedImpl); + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$GameEventDeletePressedImpl); } @override @@ -595,12 +620,14 @@ class _$GameEventDeletePressedImpl implements _GameEventDeletePressed { @override @optionalTypeArgs TResult map({ - required TResult Function(_GameEventChangeDictionary value) changeDictionary, + required TResult Function(_GameEventChangeDictionary value) + changeDictionary, required TResult Function(_GameEventChangeGameMode value) changeGameMode, required TResult Function(_GameEventResetBoard value) resetBoard, required TResult Function(_GameEventLetterPressed value) letterPressed, required TResult Function(_GameEventDeletePressed value) deletePressed, - required TResult Function(_GameEventDeleteLongPressed value) deleteLongPressed, + required TResult Function(_GameEventDeleteLongPressed value) + deleteLongPressed, required TResult Function(_GameEventEnterPressed value) enterPressed, required TResult Function(_GameEventListenKeyEvent value) listenKeyEvent, }) { @@ -649,7 +676,8 @@ abstract class _GameEventDeletePressed implements GameEvent { /// @nodoc abstract class _$$GameEventDeleteLongPressedImplCopyWith<$Res> { factory _$$GameEventDeleteLongPressedImplCopyWith( - _$GameEventDeleteLongPressedImpl value, $Res Function(_$GameEventDeleteLongPressedImpl) then) = + _$GameEventDeleteLongPressedImpl value, + $Res Function(_$GameEventDeleteLongPressedImpl) then) = __$$GameEventDeleteLongPressedImplCopyWithImpl<$Res>; } @@ -658,7 +686,8 @@ class __$$GameEventDeleteLongPressedImplCopyWithImpl<$Res> extends _$GameEventCopyWithImpl<$Res, _$GameEventDeleteLongPressedImpl> implements _$$GameEventDeleteLongPressedImplCopyWith<$Res> { __$$GameEventDeleteLongPressedImplCopyWithImpl( - _$GameEventDeleteLongPressedImpl _value, $Res Function(_$GameEventDeleteLongPressedImpl) _then) + _$GameEventDeleteLongPressedImpl _value, + $Res Function(_$GameEventDeleteLongPressedImpl) _then) : super(_value, _then); } @@ -674,7 +703,9 @@ class _$GameEventDeleteLongPressedImpl implements _GameEventDeleteLongPressed { @override bool operator ==(dynamic other) { - return identical(this, other) || (other.runtimeType == runtimeType && other is _$GameEventDeleteLongPressedImpl); + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$GameEventDeleteLongPressedImpl); } @override @@ -683,12 +714,14 @@ class _$GameEventDeleteLongPressedImpl implements _GameEventDeleteLongPressed { @override @optionalTypeArgs TResult map({ - required TResult Function(_GameEventChangeDictionary value) changeDictionary, + required TResult Function(_GameEventChangeDictionary value) + changeDictionary, required TResult Function(_GameEventChangeGameMode value) changeGameMode, required TResult Function(_GameEventResetBoard value) resetBoard, required TResult Function(_GameEventLetterPressed value) letterPressed, required TResult Function(_GameEventDeletePressed value) deletePressed, - required TResult Function(_GameEventDeleteLongPressed value) deleteLongPressed, + required TResult Function(_GameEventDeleteLongPressed value) + deleteLongPressed, required TResult Function(_GameEventEnterPressed value) enterPressed, required TResult Function(_GameEventListenKeyEvent value) listenKeyEvent, }) { @@ -731,21 +764,24 @@ class _$GameEventDeleteLongPressedImpl implements _GameEventDeleteLongPressed { } abstract class _GameEventDeleteLongPressed implements GameEvent { - const factory _GameEventDeleteLongPressed() = _$GameEventDeleteLongPressedImpl; + const factory _GameEventDeleteLongPressed() = + _$GameEventDeleteLongPressedImpl; } /// @nodoc abstract class _$$GameEventEnterPressedImplCopyWith<$Res> { factory _$$GameEventEnterPressedImplCopyWith( - _$GameEventEnterPressedImpl value, $Res Function(_$GameEventEnterPressedImpl) then) = + _$GameEventEnterPressedImpl value, + $Res Function(_$GameEventEnterPressedImpl) then) = __$$GameEventEnterPressedImplCopyWithImpl<$Res>; } /// @nodoc -class __$$GameEventEnterPressedImplCopyWithImpl<$Res> extends _$GameEventCopyWithImpl<$Res, _$GameEventEnterPressedImpl> +class __$$GameEventEnterPressedImplCopyWithImpl<$Res> + extends _$GameEventCopyWithImpl<$Res, _$GameEventEnterPressedImpl> implements _$$GameEventEnterPressedImplCopyWith<$Res> { - __$$GameEventEnterPressedImplCopyWithImpl( - _$GameEventEnterPressedImpl _value, $Res Function(_$GameEventEnterPressedImpl) _then) + __$$GameEventEnterPressedImplCopyWithImpl(_$GameEventEnterPressedImpl _value, + $Res Function(_$GameEventEnterPressedImpl) _then) : super(_value, _then); } @@ -761,7 +797,9 @@ class _$GameEventEnterPressedImpl implements _GameEventEnterPressed { @override bool operator ==(dynamic other) { - return identical(this, other) || (other.runtimeType == runtimeType && other is _$GameEventEnterPressedImpl); + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$GameEventEnterPressedImpl); } @override @@ -770,12 +808,14 @@ class _$GameEventEnterPressedImpl implements _GameEventEnterPressed { @override @optionalTypeArgs TResult map({ - required TResult Function(_GameEventChangeDictionary value) changeDictionary, + required TResult Function(_GameEventChangeDictionary value) + changeDictionary, required TResult Function(_GameEventChangeGameMode value) changeGameMode, required TResult Function(_GameEventResetBoard value) resetBoard, required TResult Function(_GameEventLetterPressed value) letterPressed, required TResult Function(_GameEventDeletePressed value) deletePressed, - required TResult Function(_GameEventDeleteLongPressed value) deleteLongPressed, + required TResult Function(_GameEventDeleteLongPressed value) + deleteLongPressed, required TResult Function(_GameEventEnterPressed value) enterPressed, required TResult Function(_GameEventListenKeyEvent value) listenKeyEvent, }) { @@ -824,9 +864,9 @@ abstract class _GameEventEnterPressed implements GameEvent { /// @nodoc abstract class _$$GameEventListenKeyEventImplCopyWith<$Res> { factory _$$GameEventListenKeyEventImplCopyWith( - _$GameEventListenKeyEventImpl value, $Res Function(_$GameEventListenKeyEventImpl) then) = + _$GameEventListenKeyEventImpl value, + $Res Function(_$GameEventListenKeyEventImpl) then) = __$$GameEventListenKeyEventImplCopyWithImpl<$Res>; - @useResult $Res call({KeyEvent keyEvent}); } @@ -836,7 +876,8 @@ class __$$GameEventListenKeyEventImplCopyWithImpl<$Res> extends _$GameEventCopyWithImpl<$Res, _$GameEventListenKeyEventImpl> implements _$$GameEventListenKeyEventImplCopyWith<$Res> { __$$GameEventListenKeyEventImplCopyWithImpl( - _$GameEventListenKeyEventImpl _value, $Res Function(_$GameEventListenKeyEventImpl) _then) + _$GameEventListenKeyEventImpl _value, + $Res Function(_$GameEventListenKeyEventImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @@ -871,7 +912,8 @@ class _$GameEventListenKeyEventImpl implements _GameEventListenKeyEvent { return identical(this, other) || (other.runtimeType == runtimeType && other is _$GameEventListenKeyEventImpl && - (identical(other.keyEvent, keyEvent) || other.keyEvent == keyEvent)); + (identical(other.keyEvent, keyEvent) || + other.keyEvent == keyEvent)); } @override @@ -880,18 +922,21 @@ class _$GameEventListenKeyEventImpl implements _GameEventListenKeyEvent { @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$GameEventListenKeyEventImplCopyWith<_$GameEventListenKeyEventImpl> get copyWith => - __$$GameEventListenKeyEventImplCopyWithImpl<_$GameEventListenKeyEventImpl>(this, _$identity); + _$$GameEventListenKeyEventImplCopyWith<_$GameEventListenKeyEventImpl> + get copyWith => __$$GameEventListenKeyEventImplCopyWithImpl< + _$GameEventListenKeyEventImpl>(this, _$identity); @override @optionalTypeArgs TResult map({ - required TResult Function(_GameEventChangeDictionary value) changeDictionary, + required TResult Function(_GameEventChangeDictionary value) + changeDictionary, required TResult Function(_GameEventChangeGameMode value) changeGameMode, required TResult Function(_GameEventResetBoard value) resetBoard, required TResult Function(_GameEventLetterPressed value) letterPressed, required TResult Function(_GameEventDeletePressed value) deletePressed, - required TResult Function(_GameEventDeleteLongPressed value) deleteLongPressed, + required TResult Function(_GameEventDeleteLongPressed value) + deleteLongPressed, required TResult Function(_GameEventEnterPressed value) enterPressed, required TResult Function(_GameEventListenKeyEvent value) listenKeyEvent, }) { @@ -934,29 +979,23 @@ class _$GameEventListenKeyEventImpl implements _GameEventListenKeyEvent { } abstract class _GameEventListenKeyEvent implements GameEvent { - const factory _GameEventListenKeyEvent(final KeyEvent keyEvent) = _$GameEventListenKeyEventImpl; + const factory _GameEventListenKeyEvent(final KeyEvent keyEvent) = + _$GameEventListenKeyEventImpl; KeyEvent get keyEvent; - @JsonKey(ignore: true) - _$$GameEventListenKeyEventImplCopyWith<_$GameEventListenKeyEventImpl> get copyWith => - throw _privateConstructorUsedError; + _$$GameEventListenKeyEventImplCopyWith<_$GameEventListenKeyEventImpl> + get copyWith => throw _privateConstructorUsedError; } /// @nodoc mixin _$GameState { Locale get dictionary => throw _privateConstructorUsedError; - String get secretWord => throw _privateConstructorUsedError; - GameMode get gameMode => throw _privateConstructorUsedError; - bool get gameCompleted => throw _privateConstructorUsedError; - List get board => throw _privateConstructorUsedError; - Map get statuses => throw _privateConstructorUsedError; - int? get lvlNumber => throw _privateConstructorUsedError; @optionalTypeArgs @@ -967,7 +1006,6 @@ mixin _$GameState { required TResult Function(_GameStateError value) error, }) => throw _privateConstructorUsedError; - @optionalTypeArgs TResult? mapOrNull({ TResult? Function(_GameStateIdle value)? idle, @@ -987,13 +1025,14 @@ mixin _$GameState { throw _privateConstructorUsedError; @JsonKey(ignore: true) - $GameStateCopyWith get copyWith => throw _privateConstructorUsedError; + $GameStateCopyWith get copyWith => + throw _privateConstructorUsedError; } /// @nodoc abstract class $GameStateCopyWith<$Res> { - factory $GameStateCopyWith(GameState value, $Res Function(GameState) then) = _$GameStateCopyWithImpl<$Res, GameState>; - + factory $GameStateCopyWith(GameState value, $Res Function(GameState) then) = + _$GameStateCopyWithImpl<$Res, GameState>; @useResult $Res call( {Locale dictionary, @@ -1006,12 +1045,12 @@ abstract class $GameStateCopyWith<$Res> { } /// @nodoc -class _$GameStateCopyWithImpl<$Res, $Val extends GameState> implements $GameStateCopyWith<$Res> { +class _$GameStateCopyWithImpl<$Res, $Val extends GameState> + implements $GameStateCopyWith<$Res> { _$GameStateCopyWithImpl(this._value, this._then); // ignore: unused_field final $Val _value; - // ignore: unused_field final $Res Function($Val) _then; @@ -1060,10 +1099,11 @@ class _$GameStateCopyWithImpl<$Res, $Val extends GameState> implements $GameStat } /// @nodoc -abstract class _$$GameStateIdleImplCopyWith<$Res> implements $GameStateCopyWith<$Res> { - factory _$$GameStateIdleImplCopyWith(_$GameStateIdleImpl value, $Res Function(_$GameStateIdleImpl) then) = +abstract class _$$GameStateIdleImplCopyWith<$Res> + implements $GameStateCopyWith<$Res> { + factory _$$GameStateIdleImplCopyWith( + _$GameStateIdleImpl value, $Res Function(_$GameStateIdleImpl) then) = __$$GameStateIdleImplCopyWithImpl<$Res>; - @override @useResult $Res call( @@ -1077,9 +1117,11 @@ abstract class _$$GameStateIdleImplCopyWith<$Res> implements $GameStateCopyWith< } /// @nodoc -class __$$GameStateIdleImplCopyWithImpl<$Res> extends _$GameStateCopyWithImpl<$Res, _$GameStateIdleImpl> +class __$$GameStateIdleImplCopyWithImpl<$Res> + extends _$GameStateCopyWithImpl<$Res, _$GameStateIdleImpl> implements _$$GameStateIdleImplCopyWith<$Res> { - __$$GameStateIdleImplCopyWithImpl(_$GameStateIdleImpl _value, $Res Function(_$GameStateIdleImpl) _then) + __$$GameStateIdleImplCopyWithImpl( + _$GameStateIdleImpl _value, $Res Function(_$GameStateIdleImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @@ -1150,7 +1192,6 @@ class _$GameStateIdleImpl extends _GameStateIdle { @override final bool gameCompleted; final List _board; - @override List get board { if (_board is EqualUnmodifiableListView) return _board; @@ -1159,7 +1200,6 @@ class _$GameStateIdleImpl extends _GameStateIdle { } final Map _statuses; - @override Map get statuses { if (_statuses is EqualUnmodifiableMapView) return _statuses; @@ -1180,18 +1220,30 @@ class _$GameStateIdleImpl extends _GameStateIdle { return identical(this, other) || (other.runtimeType == runtimeType && other is _$GameStateIdleImpl && - (identical(other.dictionary, dictionary) || other.dictionary == dictionary) && - (identical(other.secretWord, secretWord) || other.secretWord == secretWord) && - (identical(other.gameMode, gameMode) || other.gameMode == gameMode) && - (identical(other.gameCompleted, gameCompleted) || other.gameCompleted == gameCompleted) && + (identical(other.dictionary, dictionary) || + other.dictionary == dictionary) && + (identical(other.secretWord, secretWord) || + other.secretWord == secretWord) && + (identical(other.gameMode, gameMode) || + other.gameMode == gameMode) && + (identical(other.gameCompleted, gameCompleted) || + other.gameCompleted == gameCompleted) && const DeepCollectionEquality().equals(other._board, _board) && const DeepCollectionEquality().equals(other._statuses, _statuses) && - (identical(other.lvlNumber, lvlNumber) || other.lvlNumber == lvlNumber)); + (identical(other.lvlNumber, lvlNumber) || + other.lvlNumber == lvlNumber)); } @override - int get hashCode => Object.hash(runtimeType, dictionary, secretWord, gameMode, gameCompleted, - const DeepCollectionEquality().hash(_board), const DeepCollectionEquality().hash(_statuses), lvlNumber); + int get hashCode => Object.hash( + runtimeType, + dictionary, + secretWord, + gameMode, + gameCompleted, + const DeepCollectionEquality().hash(_board), + const DeepCollectionEquality().hash(_statuses), + lvlNumber); @JsonKey(ignore: true) @override @@ -1246,40 +1298,34 @@ abstract class _GameStateIdle extends GameState { required final List board, required final Map statuses, required final int? lvlNumber}) = _$GameStateIdleImpl; - const _GameStateIdle._() : super._(); @override Locale get dictionary; - @override String get secretWord; - @override GameMode get gameMode; - @override bool get gameCompleted; - @override List get board; - @override Map get statuses; - @override int? get lvlNumber; - @override @JsonKey(ignore: true) - _$$GameStateIdleImplCopyWith<_$GameStateIdleImpl> get copyWith => throw _privateConstructorUsedError; + _$$GameStateIdleImplCopyWith<_$GameStateIdleImpl> get copyWith => + throw _privateConstructorUsedError; } /// @nodoc -abstract class _$$GameStateWinImplCopyWith<$Res> implements $GameStateCopyWith<$Res> { - factory _$$GameStateWinImplCopyWith(_$GameStateWinImpl value, $Res Function(_$GameStateWinImpl) then) = +abstract class _$$GameStateWinImplCopyWith<$Res> + implements $GameStateCopyWith<$Res> { + factory _$$GameStateWinImplCopyWith( + _$GameStateWinImpl value, $Res Function(_$GameStateWinImpl) then) = __$$GameStateWinImplCopyWithImpl<$Res>; - @override @useResult $Res call( @@ -1293,9 +1339,11 @@ abstract class _$$GameStateWinImplCopyWith<$Res> implements $GameStateCopyWith<$ } /// @nodoc -class __$$GameStateWinImplCopyWithImpl<$Res> extends _$GameStateCopyWithImpl<$Res, _$GameStateWinImpl> +class __$$GameStateWinImplCopyWithImpl<$Res> + extends _$GameStateCopyWithImpl<$Res, _$GameStateWinImpl> implements _$$GameStateWinImplCopyWith<$Res> { - __$$GameStateWinImplCopyWithImpl(_$GameStateWinImpl _value, $Res Function(_$GameStateWinImpl) _then) + __$$GameStateWinImplCopyWithImpl( + _$GameStateWinImpl _value, $Res Function(_$GameStateWinImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @@ -1366,7 +1414,6 @@ class _$GameStateWinImpl extends _GameStateWin { @override final bool gameCompleted; final List _board; - @override List get board { if (_board is EqualUnmodifiableListView) return _board; @@ -1375,7 +1422,6 @@ class _$GameStateWinImpl extends _GameStateWin { } final Map _statuses; - @override Map get statuses { if (_statuses is EqualUnmodifiableMapView) return _statuses; @@ -1396,18 +1442,30 @@ class _$GameStateWinImpl extends _GameStateWin { return identical(this, other) || (other.runtimeType == runtimeType && other is _$GameStateWinImpl && - (identical(other.dictionary, dictionary) || other.dictionary == dictionary) && - (identical(other.secretWord, secretWord) || other.secretWord == secretWord) && - (identical(other.gameMode, gameMode) || other.gameMode == gameMode) && - (identical(other.gameCompleted, gameCompleted) || other.gameCompleted == gameCompleted) && + (identical(other.dictionary, dictionary) || + other.dictionary == dictionary) && + (identical(other.secretWord, secretWord) || + other.secretWord == secretWord) && + (identical(other.gameMode, gameMode) || + other.gameMode == gameMode) && + (identical(other.gameCompleted, gameCompleted) || + other.gameCompleted == gameCompleted) && const DeepCollectionEquality().equals(other._board, _board) && const DeepCollectionEquality().equals(other._statuses, _statuses) && - (identical(other.lvlNumber, lvlNumber) || other.lvlNumber == lvlNumber)); + (identical(other.lvlNumber, lvlNumber) || + other.lvlNumber == lvlNumber)); } @override - int get hashCode => Object.hash(runtimeType, dictionary, secretWord, gameMode, gameCompleted, - const DeepCollectionEquality().hash(_board), const DeepCollectionEquality().hash(_statuses), lvlNumber); + int get hashCode => Object.hash( + runtimeType, + dictionary, + secretWord, + gameMode, + gameCompleted, + const DeepCollectionEquality().hash(_board), + const DeepCollectionEquality().hash(_statuses), + lvlNumber); @JsonKey(ignore: true) @override @@ -1462,40 +1520,34 @@ abstract class _GameStateWin extends GameState { required final List board, required final Map statuses, required final int? lvlNumber}) = _$GameStateWinImpl; - const _GameStateWin._() : super._(); @override Locale get dictionary; - @override String get secretWord; - @override GameMode get gameMode; - @override bool get gameCompleted; - @override List get board; - @override Map get statuses; - @override int? get lvlNumber; - @override @JsonKey(ignore: true) - _$$GameStateWinImplCopyWith<_$GameStateWinImpl> get copyWith => throw _privateConstructorUsedError; + _$$GameStateWinImplCopyWith<_$GameStateWinImpl> get copyWith => + throw _privateConstructorUsedError; } /// @nodoc -abstract class _$$GameStateLossImplCopyWith<$Res> implements $GameStateCopyWith<$Res> { - factory _$$GameStateLossImplCopyWith(_$GameStateLossImpl value, $Res Function(_$GameStateLossImpl) then) = +abstract class _$$GameStateLossImplCopyWith<$Res> + implements $GameStateCopyWith<$Res> { + factory _$$GameStateLossImplCopyWith( + _$GameStateLossImpl value, $Res Function(_$GameStateLossImpl) then) = __$$GameStateLossImplCopyWithImpl<$Res>; - @override @useResult $Res call( @@ -1509,9 +1561,11 @@ abstract class _$$GameStateLossImplCopyWith<$Res> implements $GameStateCopyWith< } /// @nodoc -class __$$GameStateLossImplCopyWithImpl<$Res> extends _$GameStateCopyWithImpl<$Res, _$GameStateLossImpl> +class __$$GameStateLossImplCopyWithImpl<$Res> + extends _$GameStateCopyWithImpl<$Res, _$GameStateLossImpl> implements _$$GameStateLossImplCopyWith<$Res> { - __$$GameStateLossImplCopyWithImpl(_$GameStateLossImpl _value, $Res Function(_$GameStateLossImpl) _then) + __$$GameStateLossImplCopyWithImpl( + _$GameStateLossImpl _value, $Res Function(_$GameStateLossImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @@ -1582,7 +1636,6 @@ class _$GameStateLossImpl extends _GameStateLoss { @override final bool gameCompleted; final List _board; - @override List get board { if (_board is EqualUnmodifiableListView) return _board; @@ -1591,7 +1644,6 @@ class _$GameStateLossImpl extends _GameStateLoss { } final Map _statuses; - @override Map get statuses { if (_statuses is EqualUnmodifiableMapView) return _statuses; @@ -1612,18 +1664,30 @@ class _$GameStateLossImpl extends _GameStateLoss { return identical(this, other) || (other.runtimeType == runtimeType && other is _$GameStateLossImpl && - (identical(other.dictionary, dictionary) || other.dictionary == dictionary) && - (identical(other.secretWord, secretWord) || other.secretWord == secretWord) && - (identical(other.gameMode, gameMode) || other.gameMode == gameMode) && - (identical(other.gameCompleted, gameCompleted) || other.gameCompleted == gameCompleted) && + (identical(other.dictionary, dictionary) || + other.dictionary == dictionary) && + (identical(other.secretWord, secretWord) || + other.secretWord == secretWord) && + (identical(other.gameMode, gameMode) || + other.gameMode == gameMode) && + (identical(other.gameCompleted, gameCompleted) || + other.gameCompleted == gameCompleted) && const DeepCollectionEquality().equals(other._board, _board) && const DeepCollectionEquality().equals(other._statuses, _statuses) && - (identical(other.lvlNumber, lvlNumber) || other.lvlNumber == lvlNumber)); + (identical(other.lvlNumber, lvlNumber) || + other.lvlNumber == lvlNumber)); } @override - int get hashCode => Object.hash(runtimeType, dictionary, secretWord, gameMode, gameCompleted, - const DeepCollectionEquality().hash(_board), const DeepCollectionEquality().hash(_statuses), lvlNumber); + int get hashCode => Object.hash( + runtimeType, + dictionary, + secretWord, + gameMode, + gameCompleted, + const DeepCollectionEquality().hash(_board), + const DeepCollectionEquality().hash(_statuses), + lvlNumber); @JsonKey(ignore: true) @override @@ -1678,40 +1742,34 @@ abstract class _GameStateLoss extends GameState { required final List board, required final Map statuses, required final int? lvlNumber}) = _$GameStateLossImpl; - const _GameStateLoss._() : super._(); @override Locale get dictionary; - @override String get secretWord; - @override GameMode get gameMode; - @override bool get gameCompleted; - @override List get board; - @override Map get statuses; - @override int? get lvlNumber; - @override @JsonKey(ignore: true) - _$$GameStateLossImplCopyWith<_$GameStateLossImpl> get copyWith => throw _privateConstructorUsedError; + _$$GameStateLossImplCopyWith<_$GameStateLossImpl> get copyWith => + throw _privateConstructorUsedError; } /// @nodoc -abstract class _$$GameStateErrorImplCopyWith<$Res> implements $GameStateCopyWith<$Res> { - factory _$$GameStateErrorImplCopyWith(_$GameStateErrorImpl value, $Res Function(_$GameStateErrorImpl) then) = +abstract class _$$GameStateErrorImplCopyWith<$Res> + implements $GameStateCopyWith<$Res> { + factory _$$GameStateErrorImplCopyWith(_$GameStateErrorImpl value, + $Res Function(_$GameStateErrorImpl) then) = __$$GameStateErrorImplCopyWithImpl<$Res>; - @override @useResult $Res call( @@ -1726,9 +1784,11 @@ abstract class _$$GameStateErrorImplCopyWith<$Res> implements $GameStateCopyWith } /// @nodoc -class __$$GameStateErrorImplCopyWithImpl<$Res> extends _$GameStateCopyWithImpl<$Res, _$GameStateErrorImpl> +class __$$GameStateErrorImplCopyWithImpl<$Res> + extends _$GameStateCopyWithImpl<$Res, _$GameStateErrorImpl> implements _$$GameStateErrorImplCopyWith<$Res> { - __$$GameStateErrorImplCopyWithImpl(_$GameStateErrorImpl _value, $Res Function(_$GameStateErrorImpl) _then) + __$$GameStateErrorImplCopyWithImpl( + _$GameStateErrorImpl _value, $Res Function(_$GameStateErrorImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @@ -1805,7 +1865,6 @@ class _$GameStateErrorImpl extends _GameStateError { @override final bool gameCompleted; final List _board; - @override List get board { if (_board is EqualUnmodifiableListView) return _board; @@ -1814,7 +1873,6 @@ class _$GameStateErrorImpl extends _GameStateError { } final Map _statuses; - @override Map get statuses { if (_statuses is EqualUnmodifiableMapView) return _statuses; @@ -1837,25 +1895,39 @@ class _$GameStateErrorImpl extends _GameStateError { return identical(this, other) || (other.runtimeType == runtimeType && other is _$GameStateErrorImpl && - (identical(other.dictionary, dictionary) || other.dictionary == dictionary) && - (identical(other.secretWord, secretWord) || other.secretWord == secretWord) && - (identical(other.gameMode, gameMode) || other.gameMode == gameMode) && - (identical(other.gameCompleted, gameCompleted) || other.gameCompleted == gameCompleted) && + (identical(other.dictionary, dictionary) || + other.dictionary == dictionary) && + (identical(other.secretWord, secretWord) || + other.secretWord == secretWord) && + (identical(other.gameMode, gameMode) || + other.gameMode == gameMode) && + (identical(other.gameCompleted, gameCompleted) || + other.gameCompleted == gameCompleted) && const DeepCollectionEquality().equals(other._board, _board) && const DeepCollectionEquality().equals(other._statuses, _statuses) && (identical(other.error, error) || other.error == error) && - (identical(other.lvlNumber, lvlNumber) || other.lvlNumber == lvlNumber)); + (identical(other.lvlNumber, lvlNumber) || + other.lvlNumber == lvlNumber)); } @override - int get hashCode => Object.hash(runtimeType, dictionary, secretWord, gameMode, gameCompleted, - const DeepCollectionEquality().hash(_board), const DeepCollectionEquality().hash(_statuses), error, lvlNumber); + int get hashCode => Object.hash( + runtimeType, + dictionary, + secretWord, + gameMode, + gameCompleted, + const DeepCollectionEquality().hash(_board), + const DeepCollectionEquality().hash(_statuses), + error, + lvlNumber); @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') _$$GameStateErrorImplCopyWith<_$GameStateErrorImpl> get copyWith => - __$$GameStateErrorImplCopyWithImpl<_$GameStateErrorImpl>(this, _$identity); + __$$GameStateErrorImplCopyWithImpl<_$GameStateErrorImpl>( + this, _$identity); @override @optionalTypeArgs @@ -1905,33 +1977,25 @@ abstract class _GameStateError extends GameState { required final Map statuses, required final WordError error, required final int? lvlNumber}) = _$GameStateErrorImpl; - const _GameStateError._() : super._(); @override Locale get dictionary; - @override String get secretWord; - @override GameMode get gameMode; - @override bool get gameCompleted; - @override List get board; - @override Map get statuses; - WordError get error; - @override int? get lvlNumber; - @override @JsonKey(ignore: true) - _$$GameStateErrorImplCopyWith<_$GameStateErrorImpl> get copyWith => throw _privateConstructorUsedError; + _$$GameStateErrorImplCopyWith<_$GameStateErrorImpl> get copyWith => + throw _privateConstructorUsedError; } diff --git a/lib/src/feature/game/widget/keyboard_by_language.dart b/lib/src/feature/game/widget/keyboard_by_language.dart index 1e57ce0a..b9d7cfd2 100644 --- a/lib/src/feature/game/widget/keyboard_by_language.dart +++ b/lib/src/feature/game/widget/keyboard_by_language.dart @@ -1,5 +1,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; +import 'package:wordly/src/core/assets/generated/assets.gen.dart'; +import 'package:wordly/src/core/assets/generated/fonts.gen.dart'; import 'package:wordly/src/feature/game/bloc/game_bloc.dart'; import 'package:wordly/src/feature/game/model/keyboard.dart'; import 'package:wordly/src/feature/game/model/letter_info.dart'; @@ -226,7 +228,7 @@ class KeyboardKey extends StatelessWidget { letter.toUpperCase(), style: TextStyle( color: status.textColor(context), - fontFamily: 'RobotoMono', + fontFamily: FontFamily.robotoMono, ), ), ), diff --git a/lib/src/feature/initialization/logic/initialization_steps.dart b/lib/src/feature/initialization/logic/initialization_steps.dart index 9e394be9..c0a6dbff 100644 --- a/lib/src/feature/initialization/logic/initialization_steps.dart +++ b/lib/src/feature/initialization/logic/initialization_steps.dart @@ -55,7 +55,6 @@ mixin InitializationSteps { final statisticsDataSource = StatisticsDataSourceImpl( sharedPreferences: sharedPreferences, ); - await statisticsDataSource.runMigration(); progress.dependencies.statisticsRepository = StatisticsRepositoryImpl( statisticsDataSource, ); diff --git a/lib/src/feature/settings/bloc/settings_bloc.freezed.dart b/lib/src/feature/settings/bloc/settings_bloc.freezed.dart index a1eadf5f..663b160c 100644 --- a/lib/src/feature/settings/bloc/settings_bloc.freezed.dart +++ b/lib/src/feature/settings/bloc/settings_bloc.freezed.dart @@ -32,7 +32,6 @@ mixin _$SettingsState { required TResult Function(_ErrorSettingsState value) error, }) => throw _privateConstructorUsedError; - @optionalTypeArgs TResult? mapOrNull({ TResult? Function(_IdleSettingsState value)? idle, @@ -50,25 +49,26 @@ mixin _$SettingsState { throw _privateConstructorUsedError; @JsonKey(ignore: true) - $SettingsStateCopyWith get copyWith => throw _privateConstructorUsedError; + $SettingsStateCopyWith get copyWith => + throw _privateConstructorUsedError; } /// @nodoc abstract class $SettingsStateCopyWith<$Res> { - factory $SettingsStateCopyWith(SettingsState value, $Res Function(SettingsState) then) = + factory $SettingsStateCopyWith( + SettingsState value, $Res Function(SettingsState) then) = _$SettingsStateCopyWithImpl<$Res, SettingsState>; - @useResult $Res call({Locale locale, Locale dictionary, AppTheme appTheme}); } /// @nodoc -class _$SettingsStateCopyWithImpl<$Res, $Val extends SettingsState> implements $SettingsStateCopyWith<$Res> { +class _$SettingsStateCopyWithImpl<$Res, $Val extends SettingsState> + implements $SettingsStateCopyWith<$Res> { _$SettingsStateCopyWithImpl(this._value, this._then); // ignore: unused_field final $Val _value; - // ignore: unused_field final $Res Function($Val) _then; @@ -97,19 +97,22 @@ class _$SettingsStateCopyWithImpl<$Res, $Val extends SettingsState> implements $ } /// @nodoc -abstract class _$$IdleSettingsStateImplCopyWith<$Res> implements $SettingsStateCopyWith<$Res> { - factory _$$IdleSettingsStateImplCopyWith(_$IdleSettingsStateImpl value, $Res Function(_$IdleSettingsStateImpl) then) = +abstract class _$$IdleSettingsStateImplCopyWith<$Res> + implements $SettingsStateCopyWith<$Res> { + factory _$$IdleSettingsStateImplCopyWith(_$IdleSettingsStateImpl value, + $Res Function(_$IdleSettingsStateImpl) then) = __$$IdleSettingsStateImplCopyWithImpl<$Res>; - @override @useResult $Res call({Locale locale, Locale dictionary, AppTheme appTheme}); } /// @nodoc -class __$$IdleSettingsStateImplCopyWithImpl<$Res> extends _$SettingsStateCopyWithImpl<$Res, _$IdleSettingsStateImpl> +class __$$IdleSettingsStateImplCopyWithImpl<$Res> + extends _$SettingsStateCopyWithImpl<$Res, _$IdleSettingsStateImpl> implements _$$IdleSettingsStateImplCopyWith<$Res> { - __$$IdleSettingsStateImplCopyWithImpl(_$IdleSettingsStateImpl _value, $Res Function(_$IdleSettingsStateImpl) _then) + __$$IdleSettingsStateImplCopyWithImpl(_$IdleSettingsStateImpl _value, + $Res Function(_$IdleSettingsStateImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @@ -139,7 +142,9 @@ class __$$IdleSettingsStateImplCopyWithImpl<$Res> extends _$SettingsStateCopyWit /// @nodoc class _$IdleSettingsStateImpl extends _IdleSettingsState { - const _$IdleSettingsStateImpl({required this.locale, required this.dictionary, required this.appTheme}) : super._(); + const _$IdleSettingsStateImpl( + {required this.locale, required this.dictionary, required this.appTheme}) + : super._(); /// The current locale. @override @@ -164,8 +169,10 @@ class _$IdleSettingsStateImpl extends _IdleSettingsState { (other.runtimeType == runtimeType && other is _$IdleSettingsStateImpl && (identical(other.locale, locale) || other.locale == locale) && - (identical(other.dictionary, dictionary) || other.dictionary == dictionary) && - (identical(other.appTheme, appTheme) || other.appTheme == appTheme)); + (identical(other.dictionary, dictionary) || + other.dictionary == dictionary) && + (identical(other.appTheme, appTheme) || + other.appTheme == appTheme)); } @override @@ -175,7 +182,8 @@ class _$IdleSettingsStateImpl extends _IdleSettingsState { @override @pragma('vm:prefer-inline') _$$IdleSettingsStateImplCopyWith<_$IdleSettingsStateImpl> get copyWith => - __$$IdleSettingsStateImplCopyWithImpl<_$IdleSettingsStateImpl>(this, _$identity); + __$$IdleSettingsStateImplCopyWithImpl<_$IdleSettingsStateImpl>( + this, _$identity); @override @optionalTypeArgs @@ -217,35 +225,33 @@ abstract class _IdleSettingsState extends SettingsState { {required final Locale locale, required final Locale dictionary, required final AppTheme appTheme}) = _$IdleSettingsStateImpl; - const _IdleSettingsState._() : super._(); @override /// The current locale. Locale get locale; - @override /// The current dictionary. Locale get dictionary; - @override /// The current theme mode. AppTheme get appTheme; - @override @JsonKey(ignore: true) - _$$IdleSettingsStateImplCopyWith<_$IdleSettingsStateImpl> get copyWith => throw _privateConstructorUsedError; + _$$IdleSettingsStateImplCopyWith<_$IdleSettingsStateImpl> get copyWith => + throw _privateConstructorUsedError; } /// @nodoc -abstract class _$$ProcessingSettingsStateImplCopyWith<$Res> implements $SettingsStateCopyWith<$Res> { +abstract class _$$ProcessingSettingsStateImplCopyWith<$Res> + implements $SettingsStateCopyWith<$Res> { factory _$$ProcessingSettingsStateImplCopyWith( - _$ProcessingSettingsStateImpl value, $Res Function(_$ProcessingSettingsStateImpl) then) = + _$ProcessingSettingsStateImpl value, + $Res Function(_$ProcessingSettingsStateImpl) then) = __$$ProcessingSettingsStateImplCopyWithImpl<$Res>; - @override @useResult $Res call({Locale locale, Locale dictionary, AppTheme appTheme}); @@ -256,7 +262,8 @@ class __$$ProcessingSettingsStateImplCopyWithImpl<$Res> extends _$SettingsStateCopyWithImpl<$Res, _$ProcessingSettingsStateImpl> implements _$$ProcessingSettingsStateImplCopyWith<$Res> { __$$ProcessingSettingsStateImplCopyWithImpl( - _$ProcessingSettingsStateImpl _value, $Res Function(_$ProcessingSettingsStateImpl) _then) + _$ProcessingSettingsStateImpl _value, + $Res Function(_$ProcessingSettingsStateImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @@ -286,7 +293,8 @@ class __$$ProcessingSettingsStateImplCopyWithImpl<$Res> /// @nodoc class _$ProcessingSettingsStateImpl extends _ProcessingSettingsState { - const _$ProcessingSettingsStateImpl({required this.locale, required this.dictionary, required this.appTheme}) + const _$ProcessingSettingsStateImpl( + {required this.locale, required this.dictionary, required this.appTheme}) : super._(); /// The current locale. @@ -312,8 +320,10 @@ class _$ProcessingSettingsStateImpl extends _ProcessingSettingsState { (other.runtimeType == runtimeType && other is _$ProcessingSettingsStateImpl && (identical(other.locale, locale) || other.locale == locale) && - (identical(other.dictionary, dictionary) || other.dictionary == dictionary) && - (identical(other.appTheme, appTheme) || other.appTheme == appTheme)); + (identical(other.dictionary, dictionary) || + other.dictionary == dictionary) && + (identical(other.appTheme, appTheme) || + other.appTheme == appTheme)); } @override @@ -322,8 +332,9 @@ class _$ProcessingSettingsStateImpl extends _ProcessingSettingsState { @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$ProcessingSettingsStateImplCopyWith<_$ProcessingSettingsStateImpl> get copyWith => - __$$ProcessingSettingsStateImplCopyWithImpl<_$ProcessingSettingsStateImpl>(this, _$identity); + _$$ProcessingSettingsStateImplCopyWith<_$ProcessingSettingsStateImpl> + get copyWith => __$$ProcessingSettingsStateImplCopyWithImpl< + _$ProcessingSettingsStateImpl>(this, _$identity); @override @optionalTypeArgs @@ -365,45 +376,44 @@ abstract class _ProcessingSettingsState extends SettingsState { {required final Locale locale, required final Locale dictionary, required final AppTheme appTheme}) = _$ProcessingSettingsStateImpl; - const _ProcessingSettingsState._() : super._(); @override /// The current locale. Locale get locale; - @override /// The current dictionary. Locale get dictionary; - @override /// The current theme mode. AppTheme get appTheme; - @override @JsonKey(ignore: true) - _$$ProcessingSettingsStateImplCopyWith<_$ProcessingSettingsStateImpl> get copyWith => - throw _privateConstructorUsedError; + _$$ProcessingSettingsStateImplCopyWith<_$ProcessingSettingsStateImpl> + get copyWith => throw _privateConstructorUsedError; } /// @nodoc -abstract class _$$ErrorSettingsStateImplCopyWith<$Res> implements $SettingsStateCopyWith<$Res> { - factory _$$ErrorSettingsStateImplCopyWith( - _$ErrorSettingsStateImpl value, $Res Function(_$ErrorSettingsStateImpl) then) = +abstract class _$$ErrorSettingsStateImplCopyWith<$Res> + implements $SettingsStateCopyWith<$Res> { + factory _$$ErrorSettingsStateImplCopyWith(_$ErrorSettingsStateImpl value, + $Res Function(_$ErrorSettingsStateImpl) then) = __$$ErrorSettingsStateImplCopyWithImpl<$Res>; - @override @useResult - $Res call({Locale locale, Locale dictionary, AppTheme appTheme, String message}); + $Res call( + {Locale locale, Locale dictionary, AppTheme appTheme, String message}); } /// @nodoc -class __$$ErrorSettingsStateImplCopyWithImpl<$Res> extends _$SettingsStateCopyWithImpl<$Res, _$ErrorSettingsStateImpl> +class __$$ErrorSettingsStateImplCopyWithImpl<$Res> + extends _$SettingsStateCopyWithImpl<$Res, _$ErrorSettingsStateImpl> implements _$$ErrorSettingsStateImplCopyWith<$Res> { - __$$ErrorSettingsStateImplCopyWithImpl(_$ErrorSettingsStateImpl _value, $Res Function(_$ErrorSettingsStateImpl) _then) + __$$ErrorSettingsStateImplCopyWithImpl(_$ErrorSettingsStateImpl _value, + $Res Function(_$ErrorSettingsStateImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @@ -439,7 +449,10 @@ class __$$ErrorSettingsStateImplCopyWithImpl<$Res> extends _$SettingsStateCopyWi class _$ErrorSettingsStateImpl extends _ErrorSettingsState { const _$ErrorSettingsStateImpl( - {required this.locale, required this.dictionary, required this.appTheme, required this.message}) + {required this.locale, + required this.dictionary, + required this.appTheme, + required this.message}) : super._(); /// The current locale. @@ -469,19 +482,23 @@ class _$ErrorSettingsStateImpl extends _ErrorSettingsState { (other.runtimeType == runtimeType && other is _$ErrorSettingsStateImpl && (identical(other.locale, locale) || other.locale == locale) && - (identical(other.dictionary, dictionary) || other.dictionary == dictionary) && - (identical(other.appTheme, appTheme) || other.appTheme == appTheme) && + (identical(other.dictionary, dictionary) || + other.dictionary == dictionary) && + (identical(other.appTheme, appTheme) || + other.appTheme == appTheme) && (identical(other.message, message) || other.message == message)); } @override - int get hashCode => Object.hash(runtimeType, locale, dictionary, appTheme, message); + int get hashCode => + Object.hash(runtimeType, locale, dictionary, appTheme, message); @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') _$$ErrorSettingsStateImplCopyWith<_$ErrorSettingsStateImpl> get copyWith => - __$$ErrorSettingsStateImplCopyWithImpl<_$ErrorSettingsStateImpl>(this, _$identity); + __$$ErrorSettingsStateImplCopyWithImpl<_$ErrorSettingsStateImpl>( + this, _$identity); @override @optionalTypeArgs @@ -524,19 +541,16 @@ abstract class _ErrorSettingsState extends SettingsState { required final Locale dictionary, required final AppTheme appTheme, required final String message}) = _$ErrorSettingsStateImpl; - const _ErrorSettingsState._() : super._(); @override /// The current locale. Locale get locale; - @override /// The current dictionary. Locale get dictionary; - @override /// The current theme mode. @@ -544,10 +558,10 @@ abstract class _ErrorSettingsState extends SettingsState { /// The error message. String get message; - @override @JsonKey(ignore: true) - _$$ErrorSettingsStateImplCopyWith<_$ErrorSettingsStateImpl> get copyWith => throw _privateConstructorUsedError; + _$$ErrorSettingsStateImplCopyWith<_$ErrorSettingsStateImpl> get copyWith => + throw _privateConstructorUsedError; } /// @nodoc @@ -555,11 +569,11 @@ mixin _$SettingsEvent { @optionalTypeArgs TResult map({ required TResult Function(_UpdateThemeSettingsEvent value) updateTheme, - required TResult Function(_UpdateDictionarySettingsEvent value) updateDictionary, + required TResult Function(_UpdateDictionarySettingsEvent value) + updateDictionary, required TResult Function(_UpdateLocaleSettingsEvent value) updateLocale, }) => throw _privateConstructorUsedError; - @optionalTypeArgs TResult? mapOrNull({ TResult? Function(_UpdateThemeSettingsEvent value)? updateTheme, @@ -579,17 +593,18 @@ mixin _$SettingsEvent { /// @nodoc abstract class $SettingsEventCopyWith<$Res> { - factory $SettingsEventCopyWith(SettingsEvent value, $Res Function(SettingsEvent) then) = + factory $SettingsEventCopyWith( + SettingsEvent value, $Res Function(SettingsEvent) then) = _$SettingsEventCopyWithImpl<$Res, SettingsEvent>; } /// @nodoc -class _$SettingsEventCopyWithImpl<$Res, $Val extends SettingsEvent> implements $SettingsEventCopyWith<$Res> { +class _$SettingsEventCopyWithImpl<$Res, $Val extends SettingsEvent> + implements $SettingsEventCopyWith<$Res> { _$SettingsEventCopyWithImpl(this._value, this._then); // ignore: unused_field final $Val _value; - // ignore: unused_field final $Res Function($Val) _then; } @@ -597,9 +612,9 @@ class _$SettingsEventCopyWithImpl<$Res, $Val extends SettingsEvent> implements $ /// @nodoc abstract class _$$UpdateThemeSettingsEventImplCopyWith<$Res> { factory _$$UpdateThemeSettingsEventImplCopyWith( - _$UpdateThemeSettingsEventImpl value, $Res Function(_$UpdateThemeSettingsEventImpl) then) = + _$UpdateThemeSettingsEventImpl value, + $Res Function(_$UpdateThemeSettingsEventImpl) then) = __$$UpdateThemeSettingsEventImplCopyWithImpl<$Res>; - @useResult $Res call({AppTheme appTheme}); } @@ -609,7 +624,8 @@ class __$$UpdateThemeSettingsEventImplCopyWithImpl<$Res> extends _$SettingsEventCopyWithImpl<$Res, _$UpdateThemeSettingsEventImpl> implements _$$UpdateThemeSettingsEventImplCopyWith<$Res> { __$$UpdateThemeSettingsEventImplCopyWithImpl( - _$UpdateThemeSettingsEventImpl _value, $Res Function(_$UpdateThemeSettingsEventImpl) _then) + _$UpdateThemeSettingsEventImpl _value, + $Res Function(_$UpdateThemeSettingsEventImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @@ -645,7 +661,8 @@ class _$UpdateThemeSettingsEventImpl implements _UpdateThemeSettingsEvent { return identical(this, other) || (other.runtimeType == runtimeType && other is _$UpdateThemeSettingsEventImpl && - (identical(other.appTheme, appTheme) || other.appTheme == appTheme)); + (identical(other.appTheme, appTheme) || + other.appTheme == appTheme)); } @override @@ -654,14 +671,16 @@ class _$UpdateThemeSettingsEventImpl implements _UpdateThemeSettingsEvent { @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$UpdateThemeSettingsEventImplCopyWith<_$UpdateThemeSettingsEventImpl> get copyWith => - __$$UpdateThemeSettingsEventImplCopyWithImpl<_$UpdateThemeSettingsEventImpl>(this, _$identity); + _$$UpdateThemeSettingsEventImplCopyWith<_$UpdateThemeSettingsEventImpl> + get copyWith => __$$UpdateThemeSettingsEventImplCopyWithImpl< + _$UpdateThemeSettingsEventImpl>(this, _$identity); @override @optionalTypeArgs TResult map({ required TResult Function(_UpdateThemeSettingsEvent value) updateTheme, - required TResult Function(_UpdateDictionarySettingsEvent value) updateDictionary, + required TResult Function(_UpdateDictionarySettingsEvent value) + updateDictionary, required TResult Function(_UpdateLocaleSettingsEvent value) updateLocale, }) { return updateTheme(this); @@ -693,32 +712,34 @@ class _$UpdateThemeSettingsEventImpl implements _UpdateThemeSettingsEvent { } abstract class _UpdateThemeSettingsEvent implements SettingsEvent { - const factory _UpdateThemeSettingsEvent({required final AppTheme appTheme}) = _$UpdateThemeSettingsEventImpl; + const factory _UpdateThemeSettingsEvent({required final AppTheme appTheme}) = + _$UpdateThemeSettingsEventImpl; /// The new theme mode. AppTheme get appTheme; - @JsonKey(ignore: true) - _$$UpdateThemeSettingsEventImplCopyWith<_$UpdateThemeSettingsEventImpl> get copyWith => - throw _privateConstructorUsedError; + _$$UpdateThemeSettingsEventImplCopyWith<_$UpdateThemeSettingsEventImpl> + get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class _$$UpdateDictionarySettingsEventImplCopyWith<$Res> { factory _$$UpdateDictionarySettingsEventImplCopyWith( - _$UpdateDictionarySettingsEventImpl value, $Res Function(_$UpdateDictionarySettingsEventImpl) then) = + _$UpdateDictionarySettingsEventImpl value, + $Res Function(_$UpdateDictionarySettingsEventImpl) then) = __$$UpdateDictionarySettingsEventImplCopyWithImpl<$Res>; - @useResult $Res call({Locale dictionary}); } /// @nodoc class __$$UpdateDictionarySettingsEventImplCopyWithImpl<$Res> - extends _$SettingsEventCopyWithImpl<$Res, _$UpdateDictionarySettingsEventImpl> + extends _$SettingsEventCopyWithImpl<$Res, + _$UpdateDictionarySettingsEventImpl> implements _$$UpdateDictionarySettingsEventImplCopyWith<$Res> { __$$UpdateDictionarySettingsEventImplCopyWithImpl( - _$UpdateDictionarySettingsEventImpl _value, $Res Function(_$UpdateDictionarySettingsEventImpl) _then) + _$UpdateDictionarySettingsEventImpl _value, + $Res Function(_$UpdateDictionarySettingsEventImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @@ -737,7 +758,8 @@ class __$$UpdateDictionarySettingsEventImplCopyWithImpl<$Res> /// @nodoc -class _$UpdateDictionarySettingsEventImpl implements _UpdateDictionarySettingsEvent { +class _$UpdateDictionarySettingsEventImpl + implements _UpdateDictionarySettingsEvent { const _$UpdateDictionarySettingsEventImpl({required this.dictionary}); /// The new locale. @@ -754,7 +776,8 @@ class _$UpdateDictionarySettingsEventImpl implements _UpdateDictionarySettingsEv return identical(this, other) || (other.runtimeType == runtimeType && other is _$UpdateDictionarySettingsEventImpl && - (identical(other.dictionary, dictionary) || other.dictionary == dictionary)); + (identical(other.dictionary, dictionary) || + other.dictionary == dictionary)); } @override @@ -763,14 +786,17 @@ class _$UpdateDictionarySettingsEventImpl implements _UpdateDictionarySettingsEv @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$UpdateDictionarySettingsEventImplCopyWith<_$UpdateDictionarySettingsEventImpl> get copyWith => - __$$UpdateDictionarySettingsEventImplCopyWithImpl<_$UpdateDictionarySettingsEventImpl>(this, _$identity); + _$$UpdateDictionarySettingsEventImplCopyWith< + _$UpdateDictionarySettingsEventImpl> + get copyWith => __$$UpdateDictionarySettingsEventImplCopyWithImpl< + _$UpdateDictionarySettingsEventImpl>(this, _$identity); @override @optionalTypeArgs TResult map({ required TResult Function(_UpdateThemeSettingsEvent value) updateTheme, - required TResult Function(_UpdateDictionarySettingsEvent value) updateDictionary, + required TResult Function(_UpdateDictionarySettingsEvent value) + updateDictionary, required TResult Function(_UpdateLocaleSettingsEvent value) updateLocale, }) { return updateDictionary(this); @@ -802,23 +828,23 @@ class _$UpdateDictionarySettingsEventImpl implements _UpdateDictionarySettingsEv } abstract class _UpdateDictionarySettingsEvent implements SettingsEvent { - const factory _UpdateDictionarySettingsEvent({required final Locale dictionary}) = - _$UpdateDictionarySettingsEventImpl; + const factory _UpdateDictionarySettingsEvent( + {required final Locale dictionary}) = _$UpdateDictionarySettingsEventImpl; /// The new locale. Locale get dictionary; - @JsonKey(ignore: true) - _$$UpdateDictionarySettingsEventImplCopyWith<_$UpdateDictionarySettingsEventImpl> get copyWith => - throw _privateConstructorUsedError; + _$$UpdateDictionarySettingsEventImplCopyWith< + _$UpdateDictionarySettingsEventImpl> + get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class _$$UpdateLocaleSettingsEventImplCopyWith<$Res> { factory _$$UpdateLocaleSettingsEventImplCopyWith( - _$UpdateLocaleSettingsEventImpl value, $Res Function(_$UpdateLocaleSettingsEventImpl) then) = + _$UpdateLocaleSettingsEventImpl value, + $Res Function(_$UpdateLocaleSettingsEventImpl) then) = __$$UpdateLocaleSettingsEventImplCopyWithImpl<$Res>; - @useResult $Res call({Locale locale}); } @@ -828,7 +854,8 @@ class __$$UpdateLocaleSettingsEventImplCopyWithImpl<$Res> extends _$SettingsEventCopyWithImpl<$Res, _$UpdateLocaleSettingsEventImpl> implements _$$UpdateLocaleSettingsEventImplCopyWith<$Res> { __$$UpdateLocaleSettingsEventImplCopyWithImpl( - _$UpdateLocaleSettingsEventImpl _value, $Res Function(_$UpdateLocaleSettingsEventImpl) _then) + _$UpdateLocaleSettingsEventImpl _value, + $Res Function(_$UpdateLocaleSettingsEventImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @@ -873,14 +900,16 @@ class _$UpdateLocaleSettingsEventImpl implements _UpdateLocaleSettingsEvent { @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$UpdateLocaleSettingsEventImplCopyWith<_$UpdateLocaleSettingsEventImpl> get copyWith => - __$$UpdateLocaleSettingsEventImplCopyWithImpl<_$UpdateLocaleSettingsEventImpl>(this, _$identity); + _$$UpdateLocaleSettingsEventImplCopyWith<_$UpdateLocaleSettingsEventImpl> + get copyWith => __$$UpdateLocaleSettingsEventImplCopyWithImpl< + _$UpdateLocaleSettingsEventImpl>(this, _$identity); @override @optionalTypeArgs TResult map({ required TResult Function(_UpdateThemeSettingsEvent value) updateTheme, - required TResult Function(_UpdateDictionarySettingsEvent value) updateDictionary, + required TResult Function(_UpdateDictionarySettingsEvent value) + updateDictionary, required TResult Function(_UpdateLocaleSettingsEvent value) updateLocale, }) { return updateLocale(this); @@ -912,12 +941,12 @@ class _$UpdateLocaleSettingsEventImpl implements _UpdateLocaleSettingsEvent { } abstract class _UpdateLocaleSettingsEvent implements SettingsEvent { - const factory _UpdateLocaleSettingsEvent({required final Locale locale}) = _$UpdateLocaleSettingsEventImpl; + const factory _UpdateLocaleSettingsEvent({required final Locale locale}) = + _$UpdateLocaleSettingsEventImpl; /// The new locale. Locale get locale; - @JsonKey(ignore: true) - _$$UpdateLocaleSettingsEventImplCopyWith<_$UpdateLocaleSettingsEventImpl> get copyWith => - throw _privateConstructorUsedError; + _$$UpdateLocaleSettingsEventImplCopyWith<_$UpdateLocaleSettingsEventImpl> + get copyWith => throw _privateConstructorUsedError; } diff --git a/lib/src/feature/settings/model/app_theme.dart b/lib/src/feature/settings/model/app_theme.dart index 26477177..2c66b4c1 100644 --- a/lib/src/feature/settings/model/app_theme.dart +++ b/lib/src/feature/settings/model/app_theme.dart @@ -1,5 +1,6 @@ import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; +import 'package:wordly/src/core/assets/generated/fonts.gen.dart'; import 'package:wordly/src/core/resources/resources.dart'; import 'package:wordly/src/core/utils/extensions/context_extension.dart'; import 'package:wordly/src/feature/settings/model/change_color_result.dart'; @@ -18,12 +19,12 @@ final class AppTheme with Diagnosticable { }) : lightTheme = ThemeData( brightness: Brightness.light, colorSchemeSeed: colorMode == ColorMode.other ? otherColors?.$1 ?? AppColors.green : AppColors.green, - fontFamily: 'Nunito', + fontFamily: FontFamily.nunito, ), darkTheme = ThemeData( brightness: Brightness.dark, colorSchemeSeed: colorMode == ColorMode.other ? otherColors?.$1 ?? AppColors.green : AppColors.green, - fontFamily: 'Nunito', + fontFamily: FontFamily.nunito, ); /// The type of theme to use. diff --git a/lib/src/feature/statistic/data/statistics_datasource.dart b/lib/src/feature/statistic/data/statistics_datasource.dart index f27a33de..18e32b07 100644 --- a/lib/src/feature/statistic/data/statistics_datasource.dart +++ b/lib/src/feature/statistic/data/statistics_datasource.dart @@ -14,9 +14,6 @@ abstract interface class StatisticsDataSource { /// Get current Statistics from cache GameStatistics? loadStatisticsFromCache(String dictionaryKey); - - /// Run migration from old api - Future runMigration(); } /// {@macro Statistics_datasource} @@ -27,7 +24,7 @@ final class StatisticsDataSourceImpl implements StatisticsDataSource { }) : _sharedPreferences = sharedPreferences; final SharedPreferences _sharedPreferences; - static const _prefix = 'statistics'; + static const _prefix = 'statistic'; @override GameStatistics? loadStatisticsFromCache(String dictionaryKey) { @@ -45,7 +42,4 @@ final class StatisticsDataSourceImpl implements StatisticsDataSource { final raw = json.encode(statistics.toJson()); await _sharedPreferences.setString('${_prefix}_$dictionaryKey', raw); } - - @override - Future runMigration() async {} } diff --git a/pubspec.lock b/pubspec.lock index cd5f2d8f..b3abce3e 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -632,14 +632,6 @@ packages: url: "https://pub.dev" source: hosted version: "1.2.3" - rxdart: - dependency: "direct main" - description: - name: rxdart - sha256: "0c7c0cedd93788d996e33041ffecda924cc54389199cde4e6a34b440f50044cb" - url: "https://pub.dev" - source: hosted - version: "0.27.7" share_plus: dependency: "direct main" description: @@ -774,7 +766,7 @@ packages: source: hosted version: "2.1.2" stream_transform: - dependency: "direct main" + dependency: transitive description: name: stream_transform sha256: "14a00e794c7c11aa145a170587321aedce29769c08d7f58b1d141da75e3b1c6f" diff --git a/pubspec.yaml b/pubspec.yaml index 18afad0f..e6c80099 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -14,18 +14,11 @@ dependencies: async: any meta: any - # Design - flutter_colorpicker: ^1.0.3 - # Localization intl: any flutter_localizations: sdk: flutter - # Stream - stream_transform: ^2.1.0 - rxdart: ^0.27.7 - # BLoC bloc: ^8.1.2 bloc_concurrency: ^0.2.2 @@ -42,6 +35,7 @@ dependencies: stack_trace: ^1.11.1 # Utils + flutter_colorpicker: ^1.0.3 flutter_native_splash: ^2.3.6 share_plus: ^7.2.1 url_launcher: ^6.2.1