From 8a73cb14933be92776e48c4ac2163e3508d6566b Mon Sep 17 00:00:00 2001 From: Egor Komarov Date: Tue, 29 Oct 2024 14:01:59 +0100 Subject: [PATCH] refactor: optimize build_runner --- build.yaml | 22 ++++++++ lib/di/di.config.dart | 27 +++++----- .../enter_seed_phrase/cubit/cubit.dart | 2 +- .../cubit/enter_seed_phrase_cubit.dart | 10 ++-- .../enter_seed_phrase_cubit.freezed.dart | 32 +++++------ ...art => enter_seed_phrase_input_state.dart} | 8 +-- ...nter_seed_phrase_input_state.freezed.dart} | 54 +++++++++---------- .../cubit/enter_seed_phrase_state.dart | 2 +- .../view/enter_seed_phrase_view.dart | 7 ++- 9 files changed, 93 insertions(+), 71 deletions(-) rename lib/feature/add_seed/enter_seed_phrase/cubit/{enter_seed_phrase_input_model.dart => enter_seed_phrase_input_state.dart} (73%) rename lib/feature/add_seed/enter_seed_phrase/cubit/{enter_seed_phrase_input_model.freezed.dart => enter_seed_phrase_input_state.freezed.dart} (91%) diff --git a/build.yaml b/build.yaml index bd081c1fa..8fd97a96b 100644 --- a/build.yaml +++ b/build.yaml @@ -9,3 +9,25 @@ targets: json_serializable: options: explicit_to_json: true + generate_for: + - lib/app/service/*.dart + - lib/app/service/**/*.dart + - lib/data/**/*.dart + - lib/http/dto/*.dart + retrofit_generator: + generate_for: + - lib/http/api/*.dart + injectable_generator:injectable_builder: + generate_for: + - lib/di/*.dart + - lib/app/service/*.dart + - lib/app/service/**/*.dart + - lib/http/dio_module.dart + - lib/http/repository/*.dart + freezed: + generate_for: + - lib/app/service/dto/*.dart + - lib/data/**/*.dart + - lib/**/*_cubit.dart + - lib/**/*_bloc.dart + - lib/**/*_state.dart diff --git a/lib/di/di.config.dart b/lib/di/di.config.dart index bf8c9c398..ac6d73530 100644 --- a/lib/di/di.config.dart +++ b/lib/di/di.config.dart @@ -30,22 +30,21 @@ import '../app/service/currencies_service.dart' as _i52; import '../app/service/currency_convert_service.dart' as _i18; import '../app/service/current_accounts_service.dart' as _i51; import '../app/service/current_seed_service.dart' as _i47; -import '../app/service/identify/i_identify_icons_service.dart' as _i43; -import '../app/service/identify/identify_icons_service.dart' as _i44; +import '../app/service/identify/i_identify_icons_service.dart' as _i40; +import '../app/service/identify/identify_icons_service.dart' as _i41; import '../app/service/js_servcie.dart' as _i10; import '../app/service/localization/service/localization_service.dart' as _i16; import '../app/service/messenger/service/messenger_service.dart' as _i13; import '../app/service/navigation/service/navigation_service.dart' as _i12; import '../app/service/nekoton_related/connection_service/connection_service.dart' as _i33; -import '../app/service/nekoton_related/current_key_service.dart' as _i42; +import '../app/service/nekoton_related/current_key_service.dart' as _i44; import '../app/service/network_connection/network_connection_service.dart' as _i17; -import '../app/service/ntp_service.dart' as _i40; +import '../app/service/ntp_service.dart' as _i42; import '../app/service/permissions_service.dart' as _i37; import '../app/service/remote/dns_resolve_service.dart' as _i20; import '../app/service/remote/http_service.dart' as _i19; -import '../app/service/secure_storage_service.dart' as _i22; import '../app/service/service.dart' as _i34; import '../app/service/staking_service.dart' as _i38; import '../app/service/storage_service/account_seed_storage_service.dart' @@ -64,7 +63,8 @@ import '../app/service/storage_service/browser_tabs_storage_service.dart' import '../app/service/storage_service/connections_storage_service.dart' as _i29; import '../app/service/storage_service/general_storage_service.dart' as _i32; -import '../app/service/storage_service/nekoton_repository_service.dart' as _i41; +import '../app/service/storage_service/nekoton_repository_service.dart' as _i43; +import '../app/service/storage_service/secure_storage_service.dart' as _i22; import '../app/service/storage_service/storage_manager_service.dart' as _i50; import '../app/service/storage_service/token_wallet_storage_service/token_wallet_storage_service.dart' as _i6; @@ -156,18 +156,18 @@ extension GetItInjectableX on _i1.GetIt { gh<_i35.NekotonRepository>(), gh<_i23.Dio>(), )); - gh.singleton<_i40.NtpService>( - () => _i40.NtpService(gh<_i34.AppLifecycleService>()), + gh.lazySingleton<_i40.IIdentifyIconsService>( + () => _i41.IdentifyIconsService(gh<_i34.SecureStorageService>())); + gh.singleton<_i42.NtpService>( + () => _i42.NtpService(gh<_i34.AppLifecycleService>()), dispose: (i) => i.dispose(), ); - gh.singleton<_i41.NekotonRepositoryStorageService>(() => - _i41.NekotonRepositoryStorageService(gh<_i35.NekotonRepository>())); - gh.singleton<_i42.CurrentKeyService>(() => _i42.CurrentKeyService( + gh.singleton<_i43.NekotonRepositoryStorageService>(() => + _i43.NekotonRepositoryStorageService(gh<_i35.NekotonRepository>())); + gh.singleton<_i44.CurrentKeyService>(() => _i44.CurrentKeyService( gh<_i34.GeneralStorageService>(), gh<_i35.NekotonRepository>(), )); - gh.lazySingleton<_i43.IIdentifyIconsService>( - () => _i44.IdentifyIconsService(gh<_i22.SecureStorageService>())); gh.singleton<_i45.NekotonStorageService>( () => _i45.NekotonStorageService(gh<_i25.EncryptedStorage>())); gh.singleton<_i46.BiometryService>(() => _i46.BiometryService( @@ -197,6 +197,7 @@ extension GetItInjectableX on _i1.GetIt { gh<_i34.TokenWalletStorageService>(), gh<_i34.ConnectionsStorageService>(), gh<_i34.BalanceStorageService>(), + gh<_i34.SecureStorageService>(), )); gh.singleton<_i51.CurrentAccountsService>(() => _i51.CurrentAccountsService( gh<_i35.NekotonRepository>(), diff --git a/lib/feature/add_seed/enter_seed_phrase/cubit/cubit.dart b/lib/feature/add_seed/enter_seed_phrase/cubit/cubit.dart index e7873dd9b..b9ec124dd 100644 --- a/lib/feature/add_seed/enter_seed_phrase/cubit/cubit.dart +++ b/lib/feature/add_seed/enter_seed_phrase/cubit/cubit.dart @@ -1,3 +1,3 @@ //GENERATED BARREL FILE export 'enter_seed_phrase_cubit.dart'; -export 'enter_seed_phrase_input_model.dart'; +export 'enter_seed_phrase_input_state.dart'; diff --git a/lib/feature/add_seed/enter_seed_phrase/cubit/enter_seed_phrase_cubit.dart b/lib/feature/add_seed/enter_seed_phrase/cubit/enter_seed_phrase_cubit.dart index 168b2f06d..968c5a2ca 100644 --- a/lib/feature/add_seed/enter_seed_phrase/cubit/enter_seed_phrase_cubit.dart +++ b/lib/feature/add_seed/enter_seed_phrase/cubit/enter_seed_phrase_cubit.dart @@ -2,7 +2,7 @@ import 'package:app/app/service/messenger/message.dart'; import 'package:app/app/service/messenger/service/messenger_service.dart'; import 'package:app/app/service/network_connection/network_connection_service.dart'; import 'package:app/di/di.dart'; -import 'package:app/feature/add_seed/enter_seed_phrase/cubit/enter_seed_phrase_input_model.dart'; +import 'package:app/feature/add_seed/enter_seed_phrase/cubit/enter_seed_phrase_input_state.dart'; import 'package:app/feature/constants.dart'; import 'package:app/generated/locale_keys.g.dart'; import 'package:app/utils/mixins/connection_mixin.dart'; @@ -50,7 +50,7 @@ class EnterSeedPhraseCubit extends Cubit late int _currentValue; /// Models of input - late List _inputModels; + late List _inputModels; @override @protected @@ -82,7 +82,7 @@ class EnterSeedPhraseCubit extends Cubit _inputModels = List.generate( max, - (index) => EnterSeedPhraseInputModel.input( + (index) => EnterSeedPhraseInputState.input( controller: _controllers[index], focus: _focuses[index], index: index, @@ -394,7 +394,7 @@ class EnterSeedPhraseCubit extends Cubit inputModel is EnterSeedPhraseInput) { // if input entered, not focused and not completed yet _inputModels[index] = - _inputModels[index] = EnterSeedPhraseInputModel.input( + _inputModels[index] = EnterSeedPhraseInputState.input( controller: controller, focus: focus, index: index, @@ -404,7 +404,7 @@ class EnterSeedPhraseCubit extends Cubit } else if (controller.text.isEmpty && inputModel is EnterSeedPhraseEntered) { // if input is empty but still completed - _inputModels[index] = EnterSeedPhraseInputModel.input( + _inputModels[index] = EnterSeedPhraseInputState.input( controller: controller, focus: focus, index: index, diff --git a/lib/feature/add_seed/enter_seed_phrase/cubit/enter_seed_phrase_cubit.freezed.dart b/lib/feature/add_seed/enter_seed_phrase/cubit/enter_seed_phrase_cubit.freezed.dart index 4a88cd156..1921931e7 100644 --- a/lib/feature/add_seed/enter_seed_phrase/cubit/enter_seed_phrase_cubit.freezed.dart +++ b/lib/feature/add_seed/enter_seed_phrase/cubit/enter_seed_phrase_cubit.freezed.dart @@ -20,7 +20,7 @@ mixin _$EnterSeedPhraseState { TResult when({ required TResult Function() initial, required TResult Function(List allowedValues, int currentValue, - List inputs, bool displayPasteButton) + List inputs, bool displayPasteButton) tab, }) => throw _privateConstructorUsedError; @@ -28,7 +28,7 @@ mixin _$EnterSeedPhraseState { TResult? whenOrNull({ TResult? Function()? initial, TResult? Function(List allowedValues, int currentValue, - List inputs, bool displayPasteButton)? + List inputs, bool displayPasteButton)? tab, }) => throw _privateConstructorUsedError; @@ -36,7 +36,7 @@ mixin _$EnterSeedPhraseState { TResult maybeWhen({ TResult Function()? initial, TResult Function(List allowedValues, int currentValue, - List inputs, bool displayPasteButton)? + List inputs, bool displayPasteButton)? tab, required TResult orElse(), }) => @@ -127,7 +127,7 @@ class _$InitialImpl implements _Initial { TResult when({ required TResult Function() initial, required TResult Function(List allowedValues, int currentValue, - List inputs, bool displayPasteButton) + List inputs, bool displayPasteButton) tab, }) { return initial(); @@ -138,7 +138,7 @@ class _$InitialImpl implements _Initial { TResult? whenOrNull({ TResult? Function()? initial, TResult? Function(List allowedValues, int currentValue, - List inputs, bool displayPasteButton)? + List inputs, bool displayPasteButton)? tab, }) { return initial?.call(); @@ -149,7 +149,7 @@ class _$InitialImpl implements _Initial { TResult maybeWhen({ TResult Function()? initial, TResult Function(List allowedValues, int currentValue, - List inputs, bool displayPasteButton)? + List inputs, bool displayPasteButton)? tab, required TResult orElse(), }) { @@ -203,7 +203,7 @@ abstract class _$$TabImplCopyWith<$Res> { $Res call( {List allowedValues, int currentValue, - List inputs, + List inputs, bool displayPasteButton}); } @@ -236,7 +236,7 @@ class __$$TabImplCopyWithImpl<$Res> inputs: null == inputs ? _value._inputs : inputs // ignore: cast_nullable_to_non_nullable - as List, + as List, displayPasteButton: null == displayPasteButton ? _value.displayPasteButton : displayPasteButton // ignore: cast_nullable_to_non_nullable @@ -251,7 +251,7 @@ class _$TabImpl implements _Tab { const _$TabImpl( {required final List allowedValues, required this.currentValue, - required final List inputs, + required final List inputs, required this.displayPasteButton}) : _allowedValues = allowedValues, _inputs = inputs; @@ -266,9 +266,9 @@ class _$TabImpl implements _Tab { @override final int currentValue; - final List _inputs; + final List _inputs; @override - List get inputs { + List get inputs { if (_inputs is EqualUnmodifiableListView) return _inputs; // ignore: implicit_dynamic_type return EqualUnmodifiableListView(_inputs); @@ -317,7 +317,7 @@ class _$TabImpl implements _Tab { TResult when({ required TResult Function() initial, required TResult Function(List allowedValues, int currentValue, - List inputs, bool displayPasteButton) + List inputs, bool displayPasteButton) tab, }) { return tab(allowedValues, currentValue, inputs, displayPasteButton); @@ -328,7 +328,7 @@ class _$TabImpl implements _Tab { TResult? whenOrNull({ TResult? Function()? initial, TResult? Function(List allowedValues, int currentValue, - List inputs, bool displayPasteButton)? + List inputs, bool displayPasteButton)? tab, }) { return tab?.call(allowedValues, currentValue, inputs, displayPasteButton); @@ -339,7 +339,7 @@ class _$TabImpl implements _Tab { TResult maybeWhen({ TResult Function()? initial, TResult Function(List allowedValues, int currentValue, - List inputs, bool displayPasteButton)? + List inputs, bool displayPasteButton)? tab, required TResult orElse(), }) { @@ -385,12 +385,12 @@ abstract class _Tab implements EnterSeedPhraseState { const factory _Tab( {required final List allowedValues, required final int currentValue, - required final List inputs, + required final List inputs, required final bool displayPasteButton}) = _$TabImpl; List get allowedValues; int get currentValue; - List get inputs; + List get inputs; bool get displayPasteButton; /// Create a copy of EnterSeedPhraseState diff --git a/lib/feature/add_seed/enter_seed_phrase/cubit/enter_seed_phrase_input_model.dart b/lib/feature/add_seed/enter_seed_phrase/cubit/enter_seed_phrase_input_state.dart similarity index 73% rename from lib/feature/add_seed/enter_seed_phrase/cubit/enter_seed_phrase_input_model.dart rename to lib/feature/add_seed/enter_seed_phrase/cubit/enter_seed_phrase_input_state.dart index 890f9250e..baa375f22 100644 --- a/lib/feature/add_seed/enter_seed_phrase/cubit/enter_seed_phrase_input_model.dart +++ b/lib/feature/add_seed/enter_seed_phrase/cubit/enter_seed_phrase_input_state.dart @@ -1,22 +1,22 @@ import 'package:flutter/widgets.dart'; import 'package:freezed_annotation/freezed_annotation.dart'; -part 'enter_seed_phrase_input_model.freezed.dart'; +part 'enter_seed_phrase_input_state.freezed.dart'; /// Model of input word in seed phrase. /// This model allows display 2 different states of every input. /// input - ready to enter seed word /// entered - displayed card with entered (but not 100% correct word). @freezed -class EnterSeedPhraseInputModel with _$EnterSeedPhraseInputModel { - const factory EnterSeedPhraseInputModel.input({ +class EnterSeedPhraseInputState with _$EnterSeedPhraseInputState { + const factory EnterSeedPhraseInputState.input({ required TextEditingController controller, required FocusNode focus, required int index, required bool hasError, }) = EnterSeedPhraseInput; - const factory EnterSeedPhraseInputModel.entered({ + const factory EnterSeedPhraseInputState.entered({ required String text, required int index, required bool hasError, diff --git a/lib/feature/add_seed/enter_seed_phrase/cubit/enter_seed_phrase_input_model.freezed.dart b/lib/feature/add_seed/enter_seed_phrase/cubit/enter_seed_phrase_input_state.freezed.dart similarity index 91% rename from lib/feature/add_seed/enter_seed_phrase/cubit/enter_seed_phrase_input_model.freezed.dart rename to lib/feature/add_seed/enter_seed_phrase/cubit/enter_seed_phrase_input_state.freezed.dart index e0e6e0c41..232780b3a 100644 --- a/lib/feature/add_seed/enter_seed_phrase/cubit/enter_seed_phrase_input_model.freezed.dart +++ b/lib/feature/add_seed/enter_seed_phrase/cubit/enter_seed_phrase_input_state.freezed.dart @@ -3,7 +3,7 @@ // ignore_for_file: type=lint // ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark -part of 'enter_seed_phrase_input_model.dart'; +part of 'enter_seed_phrase_input_state.dart'; // ************************************************************************** // FreezedGenerator @@ -15,7 +15,7 @@ final _privateConstructorUsedError = UnsupportedError( 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); /// @nodoc -mixin _$EnterSeedPhraseInputModel { +mixin _$EnterSeedPhraseInputState { int get index => throw _privateConstructorUsedError; bool get hasError => throw _privateConstructorUsedError; @optionalTypeArgs @@ -63,34 +63,34 @@ mixin _$EnterSeedPhraseInputModel { }) => throw _privateConstructorUsedError; - /// Create a copy of EnterSeedPhraseInputModel + /// Create a copy of EnterSeedPhraseInputState /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $EnterSeedPhraseInputModelCopyWith get copyWith => + $EnterSeedPhraseInputStateCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc -abstract class $EnterSeedPhraseInputModelCopyWith<$Res> { - factory $EnterSeedPhraseInputModelCopyWith(EnterSeedPhraseInputModel value, - $Res Function(EnterSeedPhraseInputModel) then) = - _$EnterSeedPhraseInputModelCopyWithImpl<$Res, EnterSeedPhraseInputModel>; +abstract class $EnterSeedPhraseInputStateCopyWith<$Res> { + factory $EnterSeedPhraseInputStateCopyWith(EnterSeedPhraseInputState value, + $Res Function(EnterSeedPhraseInputState) then) = + _$EnterSeedPhraseInputStateCopyWithImpl<$Res, EnterSeedPhraseInputState>; @useResult $Res call({int index, bool hasError}); } /// @nodoc -class _$EnterSeedPhraseInputModelCopyWithImpl<$Res, - $Val extends EnterSeedPhraseInputModel> - implements $EnterSeedPhraseInputModelCopyWith<$Res> { - _$EnterSeedPhraseInputModelCopyWithImpl(this._value, this._then); +class _$EnterSeedPhraseInputStateCopyWithImpl<$Res, + $Val extends EnterSeedPhraseInputState> + implements $EnterSeedPhraseInputStateCopyWith<$Res> { + _$EnterSeedPhraseInputStateCopyWithImpl(this._value, this._then); // ignore: unused_field final $Val _value; // ignore: unused_field final $Res Function($Val) _then; - /// Create a copy of EnterSeedPhraseInputModel + /// Create a copy of EnterSeedPhraseInputState /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override @@ -113,7 +113,7 @@ class _$EnterSeedPhraseInputModelCopyWithImpl<$Res, /// @nodoc abstract class _$$EnterSeedPhraseInputImplCopyWith<$Res> - implements $EnterSeedPhraseInputModelCopyWith<$Res> { + implements $EnterSeedPhraseInputStateCopyWith<$Res> { factory _$$EnterSeedPhraseInputImplCopyWith(_$EnterSeedPhraseInputImpl value, $Res Function(_$EnterSeedPhraseInputImpl) then) = __$$EnterSeedPhraseInputImplCopyWithImpl<$Res>; @@ -128,14 +128,14 @@ abstract class _$$EnterSeedPhraseInputImplCopyWith<$Res> /// @nodoc class __$$EnterSeedPhraseInputImplCopyWithImpl<$Res> - extends _$EnterSeedPhraseInputModelCopyWithImpl<$Res, + extends _$EnterSeedPhraseInputStateCopyWithImpl<$Res, _$EnterSeedPhraseInputImpl> implements _$$EnterSeedPhraseInputImplCopyWith<$Res> { __$$EnterSeedPhraseInputImplCopyWithImpl(_$EnterSeedPhraseInputImpl _value, $Res Function(_$EnterSeedPhraseInputImpl) _then) : super(_value, _then); - /// Create a copy of EnterSeedPhraseInputModel + /// Create a copy of EnterSeedPhraseInputState /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override @@ -186,7 +186,7 @@ class _$EnterSeedPhraseInputImpl implements EnterSeedPhraseInput { @override String toString() { - return 'EnterSeedPhraseInputModel.input(controller: $controller, focus: $focus, index: $index, hasError: $hasError)'; + return 'EnterSeedPhraseInputState.input(controller: $controller, focus: $focus, index: $index, hasError: $hasError)'; } @override @@ -206,7 +206,7 @@ class _$EnterSeedPhraseInputImpl implements EnterSeedPhraseInput { int get hashCode => Object.hash(runtimeType, controller, focus, index, hasError); - /// Create a copy of EnterSeedPhraseInputModel + /// Create a copy of EnterSeedPhraseInputState /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @override @@ -285,7 +285,7 @@ class _$EnterSeedPhraseInputImpl implements EnterSeedPhraseInput { } } -abstract class EnterSeedPhraseInput implements EnterSeedPhraseInputModel { +abstract class EnterSeedPhraseInput implements EnterSeedPhraseInputState { const factory EnterSeedPhraseInput( {required final TextEditingController controller, required final FocusNode focus, @@ -299,7 +299,7 @@ abstract class EnterSeedPhraseInput implements EnterSeedPhraseInputModel { @override bool get hasError; - /// Create a copy of EnterSeedPhraseInputModel + /// Create a copy of EnterSeedPhraseInputState /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) @@ -309,7 +309,7 @@ abstract class EnterSeedPhraseInput implements EnterSeedPhraseInputModel { /// @nodoc abstract class _$$EnterSeedPhraseEnteredImplCopyWith<$Res> - implements $EnterSeedPhraseInputModelCopyWith<$Res> { + implements $EnterSeedPhraseInputStateCopyWith<$Res> { factory _$$EnterSeedPhraseEnteredImplCopyWith( _$EnterSeedPhraseEnteredImpl value, $Res Function(_$EnterSeedPhraseEnteredImpl) then) = @@ -321,7 +321,7 @@ abstract class _$$EnterSeedPhraseEnteredImplCopyWith<$Res> /// @nodoc class __$$EnterSeedPhraseEnteredImplCopyWithImpl<$Res> - extends _$EnterSeedPhraseInputModelCopyWithImpl<$Res, + extends _$EnterSeedPhraseInputStateCopyWithImpl<$Res, _$EnterSeedPhraseEnteredImpl> implements _$$EnterSeedPhraseEnteredImplCopyWith<$Res> { __$$EnterSeedPhraseEnteredImplCopyWithImpl( @@ -329,7 +329,7 @@ class __$$EnterSeedPhraseEnteredImplCopyWithImpl<$Res> $Res Function(_$EnterSeedPhraseEnteredImpl) _then) : super(_value, _then); - /// Create a copy of EnterSeedPhraseInputModel + /// Create a copy of EnterSeedPhraseInputState /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override @@ -370,7 +370,7 @@ class _$EnterSeedPhraseEnteredImpl implements EnterSeedPhraseEntered { @override String toString() { - return 'EnterSeedPhraseInputModel.entered(text: $text, index: $index, hasError: $hasError)'; + return 'EnterSeedPhraseInputState.entered(text: $text, index: $index, hasError: $hasError)'; } @override @@ -387,7 +387,7 @@ class _$EnterSeedPhraseEnteredImpl implements EnterSeedPhraseEntered { @override int get hashCode => Object.hash(runtimeType, text, index, hasError); - /// Create a copy of EnterSeedPhraseInputModel + /// Create a copy of EnterSeedPhraseInputState /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @override @@ -465,7 +465,7 @@ class _$EnterSeedPhraseEnteredImpl implements EnterSeedPhraseEntered { } } -abstract class EnterSeedPhraseEntered implements EnterSeedPhraseInputModel { +abstract class EnterSeedPhraseEntered implements EnterSeedPhraseInputState { const factory EnterSeedPhraseEntered( {required final String text, required final int index, @@ -477,7 +477,7 @@ abstract class EnterSeedPhraseEntered implements EnterSeedPhraseInputModel { @override bool get hasError; - /// Create a copy of EnterSeedPhraseInputModel + /// Create a copy of EnterSeedPhraseInputState /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) diff --git a/lib/feature/add_seed/enter_seed_phrase/cubit/enter_seed_phrase_state.dart b/lib/feature/add_seed/enter_seed_phrase/cubit/enter_seed_phrase_state.dart index 8bfd883a5..27223c2e8 100644 --- a/lib/feature/add_seed/enter_seed_phrase/cubit/enter_seed_phrase_state.dart +++ b/lib/feature/add_seed/enter_seed_phrase/cubit/enter_seed_phrase_state.dart @@ -13,7 +13,7 @@ class EnterSeedPhraseState with _$EnterSeedPhraseState { const factory EnterSeedPhraseState.tab({ required List allowedValues, required int currentValue, - required List inputs, + required List inputs, required bool displayPasteButton, }) = _Tab; } diff --git a/lib/feature/add_seed/enter_seed_phrase/view/enter_seed_phrase_view.dart b/lib/feature/add_seed/enter_seed_phrase/view/enter_seed_phrase_view.dart index 4850399ba..222537673 100644 --- a/lib/feature/add_seed/enter_seed_phrase/view/enter_seed_phrase_view.dart +++ b/lib/feature/add_seed/enter_seed_phrase/view/enter_seed_phrase_view.dart @@ -1,5 +1,4 @@ -import 'package:app/feature/add_seed/enter_seed_phrase/cubit/enter_seed_phrase_cubit.dart'; -import 'package:app/feature/add_seed/enter_seed_phrase/cubit/enter_seed_phrase_input_model.dart'; +import 'package:app/feature/add_seed/enter_seed_phrase/cubit/cubit.dart'; import 'package:app/generated/generated.dart'; import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; @@ -121,7 +120,7 @@ class EnterSeedPhraseView extends StatelessWidget { // ignore: long-method Widget _inputBuild( ThemeStyleV2 themeStyleV2, - EnterSeedPhraseInputModel input, + EnterSeedPhraseInputState input, int currentValue, ) { final displayIndex = input.index + 1; @@ -252,7 +251,7 @@ class EnterSeedPhraseView extends StatelessWidget { Widget _inputs( ThemeStyleV2 themeStyleV2, - List inputs, + List inputs, int currentValue, ) { return ContainerRow(