Skip to content

Commit

Permalink
Enhance token filtering logic for the TokensList views
Browse files Browse the repository at this point in the history
  • Loading branch information
frankmer committed Dec 4, 2024
1 parent b400ab3 commit 9376f43
Show file tree
Hide file tree
Showing 11 changed files with 144 additions and 113 deletions.
49 changes: 34 additions & 15 deletions lib/model/riverpod_states/token_container_state.freezed.dart
Original file line number Diff line number Diff line change
Expand Up @@ -28,19 +28,22 @@ mixin _$TokenContainerState {
/// Create a copy of TokenContainerState
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
$TokenContainerStateCopyWith<TokenContainerState> get copyWith => throw _privateConstructorUsedError;
$TokenContainerStateCopyWith<TokenContainerState> get copyWith =>
throw _privateConstructorUsedError;
}

/// @nodoc
abstract class $TokenContainerStateCopyWith<$Res> {
factory $TokenContainerStateCopyWith(TokenContainerState value, $Res Function(TokenContainerState) then) =
factory $TokenContainerStateCopyWith(
TokenContainerState value, $Res Function(TokenContainerState) then) =
_$TokenContainerStateCopyWithImpl<$Res, TokenContainerState>;
@useResult
$Res call({List<TokenContainer> containerList});
}

/// @nodoc
class _$TokenContainerStateCopyWithImpl<$Res, $Val extends TokenContainerState> implements $TokenContainerStateCopyWith<$Res> {
class _$TokenContainerStateCopyWithImpl<$Res, $Val extends TokenContainerState>
implements $TokenContainerStateCopyWith<$Res> {
_$TokenContainerStateCopyWithImpl(this._value, this._then);

// ignore: unused_field
Expand All @@ -65,18 +68,23 @@ class _$TokenContainerStateCopyWithImpl<$Res, $Val extends TokenContainerState>
}

/// @nodoc
abstract class _$$TokenContainerStateImplCopyWith<$Res> implements $TokenContainerStateCopyWith<$Res> {
factory _$$TokenContainerStateImplCopyWith(_$TokenContainerStateImpl value, $Res Function(_$TokenContainerStateImpl) then) =
abstract class _$$TokenContainerStateImplCopyWith<$Res>
implements $TokenContainerStateCopyWith<$Res> {
factory _$$TokenContainerStateImplCopyWith(_$TokenContainerStateImpl value,
$Res Function(_$TokenContainerStateImpl) then) =
__$$TokenContainerStateImplCopyWithImpl<$Res>;
@override
@useResult
$Res call({List<TokenContainer> containerList});
}

/// @nodoc
class __$$TokenContainerStateImplCopyWithImpl<$Res> extends _$TokenContainerStateCopyWithImpl<$Res, _$TokenContainerStateImpl>
class __$$TokenContainerStateImplCopyWithImpl<$Res>
extends _$TokenContainerStateCopyWithImpl<$Res, _$TokenContainerStateImpl>
implements _$$TokenContainerStateImplCopyWith<$Res> {
__$$TokenContainerStateImplCopyWithImpl(_$TokenContainerStateImpl _value, $Res Function(_$TokenContainerStateImpl) _then) : super(_value, _then);
__$$TokenContainerStateImplCopyWithImpl(_$TokenContainerStateImpl _value,
$Res Function(_$TokenContainerStateImpl) _then)
: super(_value, _then);

/// Create a copy of TokenContainerState
/// with the given fields replaced by the non-null parameter values.
Expand All @@ -97,11 +105,13 @@ class __$$TokenContainerStateImplCopyWithImpl<$Res> extends _$TokenContainerStat
/// @nodoc
@JsonSerializable()
class _$TokenContainerStateImpl extends _TokenContainerState {
const _$TokenContainerStateImpl({required final List<TokenContainer> containerList})
const _$TokenContainerStateImpl(
{required final List<TokenContainer> containerList})
: _containerList = containerList,
super._();

factory _$TokenContainerStateImpl.fromJson(Map<String, dynamic> json) => _$$TokenContainerStateImplFromJson(json);
factory _$TokenContainerStateImpl.fromJson(Map<String, dynamic> json) =>
_$$TokenContainerStateImplFromJson(json);

final List<TokenContainer> _containerList;
@override
Expand All @@ -119,20 +129,25 @@ class _$TokenContainerStateImpl extends _TokenContainerState {
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType && other is _$TokenContainerStateImpl && const DeepCollectionEquality().equals(other._containerList, _containerList));
(other.runtimeType == runtimeType &&
other is _$TokenContainerStateImpl &&
const DeepCollectionEquality()
.equals(other._containerList, _containerList));
}

@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType, const DeepCollectionEquality().hash(_containerList));
int get hashCode => Object.hash(
runtimeType, const DeepCollectionEquality().hash(_containerList));

/// Create a copy of TokenContainerState
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$TokenContainerStateImplCopyWith<_$TokenContainerStateImpl> get copyWith =>
__$$TokenContainerStateImplCopyWithImpl<_$TokenContainerStateImpl>(this, _$identity);
__$$TokenContainerStateImplCopyWithImpl<_$TokenContainerStateImpl>(
this, _$identity);

@override
Map<String, dynamic> toJson() {
Expand All @@ -143,10 +158,13 @@ class _$TokenContainerStateImpl extends _TokenContainerState {
}

abstract class _TokenContainerState extends TokenContainerState {
const factory _TokenContainerState({required final List<TokenContainer> containerList}) = _$TokenContainerStateImpl;
const factory _TokenContainerState(
{required final List<TokenContainer> containerList}) =
_$TokenContainerStateImpl;
const _TokenContainerState._() : super._();

factory _TokenContainerState.fromJson(Map<String, dynamic> json) = _$TokenContainerStateImpl.fromJson;
factory _TokenContainerState.fromJson(Map<String, dynamic> json) =
_$TokenContainerStateImpl.fromJson;

@override
List<TokenContainer> get containerList;
Expand All @@ -155,5 +173,6 @@ abstract class _TokenContainerState extends TokenContainerState {
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
_$$TokenContainerStateImplCopyWith<_$TokenContainerStateImpl> get copyWith => throw _privateConstructorUsedError;
_$$TokenContainerStateImplCopyWith<_$TokenContainerStateImpl> get copyWith =>
throw _privateConstructorUsedError;
}
12 changes: 9 additions & 3 deletions lib/model/riverpod_states/token_container_state.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 7 additions & 5 deletions lib/model/widget_image.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,10 @@ class _SearchInputFieldState extends ConsumerState<SearchInputField> {
Widget build(BuildContext context) => TextField(
controller: _controller,
focusNode: _focusNode,
decoration: const InputDecoration(
style: Theme.of(context).textTheme.titleMedium?.copyWith(color: Theme.of(context).colorScheme.onSurface),
decoration: InputDecoration(
hintText: 'Label / Serial / Issuer / Type',
hintStyle: Theme.of(context).textTheme.titleMedium?.copyWith(color: Theme.of(context).colorScheme.onSurface),
border: InputBorder.none,
focusedBorder: InputBorder.none,
enabledBorder: InputBorder.none,
Expand Down
Loading

0 comments on commit 9376f43

Please sign in to comment.