Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(EWM-327): expand asset tap area #557

Merged
merged 2 commits into from
Oct 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -63,13 +63,13 @@ class ManageSeedsAccountsCubit extends Cubit<ManageSeedsAccountsState> {
list.sort((a, b) => a.addedAt.compareTo(b.addedAt));
if (list.first.addedAt != 0) {
if (list.last.masterKey.accountList.allAccounts.isNotEmpty) {
list.last.masterKey.accountList.allAccounts.forEach((account) {
for (final account in list.last.masterKey.accountList.allAccounts) {
storageService.addValue(
account.address.address +
StorageConstants.showingManualBackupBadge,
list.last.addType == SeedAddType.create,
);
});
}
}
emit(
ManageSeedsAccountsState.data(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,51 +138,63 @@ class SelectNewAssetItem extends StatelessWidget {
Widget build(BuildContext context) {
final theme = context.themeStyleV2;

return Padding(
padding: const EdgeInsets.symmetric(vertical: DimensSizeV2.d8),
child: SeparatedRow(
children: [
TokenWalletIconWidget(
logoURI: asset.logoURI,
address: asset.address,
version: asset.version,
),
Expanded(
child: SeparatedColumn(
separatorSize: DimensSizeV2.d4,
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
asset.symbol,
style: theme.textStyles.labelSmall,
overflow: TextOverflow.ellipsis,
softWrap: false,
maxLines: 1,
),
Text(
asset.name,
style: theme.textStyles.labelXSmall.copyWith(
color: theme.colors.content3,
return GestureDetector(
behavior: HitTestBehavior.translucent,
onTap: () {
final cubit = context.read<SelectNewAssetCubit>();
if (!isSelected) {
cubit.enableAsset(asset.address);
} else {
cubit.disableAsset(asset.address);
}
},
child: Padding(
padding: const EdgeInsets.symmetric(vertical: DimensSizeV2.d8),
child: SeparatedRow(
children: [
TokenWalletIconWidget(
logoURI: asset.logoURI,
address: asset.address,
version: asset.version,
),
Expanded(
child: SeparatedColumn(
separatorSize: DimensSizeV2.d4,
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
asset.symbol,
style: theme.textStyles.labelSmall,
overflow: TextOverflow.ellipsis,
softWrap: false,
maxLines: 1,
),
overflow: TextOverflow.ellipsis,
softWrap: false,
maxLines: 1,
),
],
Text(
asset.name,
style: theme.textStyles.labelXSmall.copyWith(
color: theme.colors.content3,
),
overflow: TextOverflow.ellipsis,
softWrap: false,
maxLines: 1,
),
],
),
),
),
Switch(
value: isSelected,
onChanged: (v) {
if (v) {
context.read<SelectNewAssetCubit>().enableAsset(asset.address);
} else {
context.read<SelectNewAssetCubit>().disableAsset(asset.address);
}
},
),
],
Switch(
value: isSelected,
onChanged: (v) {
final cubit = context.read<SelectNewAssetCubit>();
if (v) {
cubit.enableAsset(asset.address);
} else {
cubit.disableAsset(asset.address);
}
},
),
],
),
),
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ class WalletAssetWidget extends StatelessWidget {

return GestureDetector(
onTap: onPressed,
behavior: HitTestBehavior.translucent,
child: SeparatedRow(
separatorSize: DimensSizeV2.d12,
children: [
Expand Down
Loading