Skip to content

Commit

Permalink
fix: account card ui, add seeds divider (#327)
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex-A4 authored Oct 9, 2023
1 parent 9778933 commit a677ad1
Show file tree
Hide file tree
Showing 3 changed files with 69 additions and 58 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ class ManageSeedsAccountsView extends StatelessWidget {
child: SingleChildScrollView(
child: ShapedContainerColumn(
margin: EdgeInsets.zero,
separator: const Padding(
padding: EdgeInsets.symmetric(vertical: DimensSize.d4),
child: CommonDivider(),
),
titleText: LocaleKeys.seedPhrases.tr(),
children: state.seeds
.map(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import 'package:app/feature/widgets/change_notifier_listener.dart';
import 'package:app/generated/generated.dart';
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:logging/logging.dart';
import 'package:nekoton_repository/nekoton_repository.dart';
import 'package:ui_components_lib/ui_components_lib.dart';

Expand Down Expand Up @@ -63,7 +62,6 @@ class _SelectNewAssetPageState extends State<SelectNewAssetPage> {
changeNotifier: focus,
builder: (context) {
final hasFocus = focus.hasFocus;
Logger('TEST').finest('HAS FOCUS: $hasFocus');

if (hasFocus) return const SizedBox.shrink();

Expand Down
121 changes: 65 additions & 56 deletions lib/feature/wallet/widgets/account_card/account_card.dart
Original file line number Diff line number Diff line change
Expand Up @@ -44,16 +44,15 @@ class AccountCard extends StatelessWidget {
separator: const CommonDivider(),
children: [
Expanded(
child: Padding(
padding: const EdgeInsets.symmetric(
horizontal: DimensSize.d16,
) +
const EdgeInsets.only(top: DimensSize.d16),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
_walletDescriptionTile(walletName, custodians),
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
_walletDescriptionTile(walletName, custodians),
Expanded(
child: Padding(
padding: const EdgeInsets.symmetric(
horizontal: DimensSize.d16,
),
child: Center(
child: balance == null
? const SizedBox.shrink()
Expand All @@ -63,8 +62,8 @@ class AccountCard extends StatelessWidget {
),
),
),
],
),
),
],
),
),
_addressTile(),
Expand All @@ -83,10 +82,10 @@ class AccountCard extends StatelessWidget {
final colors = context.themeStyle.colors;

return CommonListTile(
height: DimensSize.d72,
height: DimensSize.d64,
padding: const EdgeInsets.symmetric(
horizontal: DimensSize.d16,
vertical: DimensSize.d12,
vertical: DimensSize.d8,
),
contentColor: colors.blue,
titleChild: Text(
Expand Down Expand Up @@ -125,56 +124,66 @@ class AccountCard extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Expanded(
child: SeparatedColumn(
separatorSize: DimensSize.d4,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
account.name,
style: StyleRes.button.copyWith(color: colors.textPrimary),
),
SeparatedRow(
separatorSize: DimensSize.d4,
children: [
CommonIconWidget.svg(
svg: Assets.images.accountType.path,
color: colors.textSecondary,
),
Text(
walletName,
style: StyleRes.addRegular.copyWith(
color: colors.textSecondary,
),
),
if (custodians != null) ...[
const SizedBox(width: DimensSize.d12),
child: Padding(
padding: const EdgeInsets.symmetric(
horizontal: DimensSize.d16,
) +
const EdgeInsets.only(top: DimensSize.d16),
child: SeparatedColumn(
separatorSize: DimensSize.d4,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
account.name,
style:
StyleRes.button.copyWith(color: colors.textPrimary),
),
SeparatedRow(
separatorSize: DimensSize.d4,
children: [
CommonIconWidget.svg(
svg: Assets.images.persons.path,
svg: Assets.images.accountType.path,
color: colors.textSecondary,
),
const SizedBox(width: DimensSize.d4),
Text(
custodians,
style: StyleRes.addRegular
.copyWith(color: colors.textSecondary),
walletName,
style: StyleRes.addRegular.copyWith(
color: colors.textSecondary,
),
),
if (custodians != null) ...[
const SizedBox(width: DimensSize.d12),
CommonIconWidget.svg(
svg: Assets.images.persons.path,
color: colors.textSecondary,
),
const SizedBox(width: DimensSize.d4),
Text(
custodians,
style: StyleRes.addRegular
.copyWith(color: colors.textSecondary),
),
],
],
],
),
],
),
],
),
),
),
CommonIconButton.svg(
svg: Assets.images.settings.path,
buttonType: EverButtonType.ghost,
color: colors.textSecondary,
size: CommonIconButtonSize.small,
onPressed: () => showAccountSettingsSheet(
context: context,
address: account.address,
showHiding: false,
seeInExplorer: true,
showCopyAddress: true,
Padding(
padding: const EdgeInsets.all(DimensSize.d4),
child: CommonIconButton.svg(
svg: Assets.images.settings.path,
buttonType: EverButtonType.ghost,
color: colors.textSecondary,
size: CommonIconButtonSize.small,
onPressed: () => showAccountSettingsSheet(
context: context,
address: account.address,
showHiding: false,
seeInExplorer: true,
showCopyAddress: true,
),
),
),
],
Expand Down

0 comments on commit a677ad1

Please sign in to comment.