Skip to content

Commit

Permalink
better design
Browse files Browse the repository at this point in the history
  • Loading branch information
hawkbee1 committed Jun 28, 2024
1 parent 114db86 commit b7845ec
Show file tree
Hide file tree
Showing 12 changed files with 87 additions and 131 deletions.
7 changes: 6 additions & 1 deletion lib/app/shared/widget/custom_app_bar.dart
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,12 @@ class CustomAppBar extends PreferredSize {
color: Theme.of(context).colorScheme.surface,
child: SafeArea(
child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 12),
padding: const EdgeInsets.fromLTRB(
10,
0,
15,
0,
),
child: Stack(
alignment: Alignment.topCenter,
children: [
Expand Down
18 changes: 18 additions & 0 deletions lib/app/shared/widget/divider_for_radio_list.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import 'package:flutter/material.dart';

class DividerForRadioList extends StatelessWidget {
const DividerForRadioList({
super.key,
});

@override
Widget build(BuildContext context) {
return Padding(
padding: const EdgeInsets.symmetric(horizontal: 8),
child: Divider(
height: 0,
color: Theme.of(context).colorScheme.onSurface.withOpacity(0.12),
),
);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ class ManageAccountsItem extends StatelessWidget {
child: Icon(
Icons.edit,
size: 20,
color: Theme.of(context).colorScheme.onPrimary,
color: Theme.of(context).colorScheme.onSurface,
),
),
const SizedBox(width: Sizes.spaceXSmall),
Expand Down Expand Up @@ -103,6 +103,7 @@ class ManageAccountsItem extends StatelessWidget {
IconStrings.copy,
width: Sizes.icon,
height: Sizes.icon,
color: Theme.of(context).colorScheme.onSurface,
),
),
const SizedBox(width: Sizes.spaceSmall),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import 'package:altme/app/app.dart';
import 'package:altme/app/shared/widget/divider_for_radio_list.dart';
import 'package:altme/dashboard/dashboard.dart';
import 'package:altme/l10n/l10n.dart';
import 'package:flutter/material.dart';
Expand Down Expand Up @@ -30,17 +31,6 @@ class ClientAuthenticationWidget extends StatelessWidget {

return Column(
children: [
if (index != 0)
Padding(
padding: const EdgeInsets.symmetric(horizontal: 8),
child: Divider(
height: 0,
color: Theme.of(context)
.colorScheme
.onSurface
.withOpacity(0.12),
),
),
ListTile(
onTap: () {
context.read<ProfileCubit>().updateProfileSetting(
Expand All @@ -55,9 +45,7 @@ class ClientAuthenticationWidget extends StatelessWidget {
),
title: Text(
clientAuthenticationType.value,
style: Theme.of(context).textTheme.bodyLarge?.copyWith(
color: Theme.of(context).colorScheme.onPrimary,
),
style: Theme.of(context).textTheme.bodyLarge,
),
trailing: Icon(
state.model.profileSetting.selfSovereignIdentityOptions
Expand All @@ -66,9 +54,10 @@ class ClientAuthenticationWidget extends StatelessWidget {
? Icons.radio_button_checked
: Icons.radio_button_unchecked,
size: Sizes.icon2x,
color: Theme.of(context).colorScheme.onPrimary,
color: Theme.of(context).colorScheme.primary,
),
),
const DividerForRadioList(),
],
);
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import 'package:altme/app/app.dart';
import 'package:altme/app/shared/widget/divider_for_radio_list.dart';
import 'package:altme/dashboard/dashboard.dart';
import 'package:altme/l10n/l10n.dart';
import 'package:flutter/material.dart';
Expand All @@ -25,17 +26,6 @@ class ClientTypeWidget extends StatelessWidget {
final clientType = ClientType.values[index];
return Column(
children: [
if (index != 0)
Padding(
padding: const EdgeInsets.symmetric(horizontal: 8),
child: Divider(
height: 0,
color: Theme.of(context)
.colorScheme
.onSurface
.withOpacity(0.12),
),
),
ListTile(
onTap: () {
context.read<ProfileCubit>().updateProfileSetting(
Expand All @@ -50,9 +40,7 @@ class ClientTypeWidget extends StatelessWidget {
),
title: Text(
clientType.getTitle,
style: Theme.of(context).textTheme.bodyLarge?.copyWith(
color: Theme.of(context).colorScheme.onPrimary,
),
style: Theme.of(context).textTheme.bodyLarge,
),
trailing: Icon(
state.model.profileSetting.selfSovereignIdentityOptions
Expand All @@ -61,9 +49,10 @@ class ClientTypeWidget extends StatelessWidget {
? Icons.radio_button_checked
: Icons.radio_button_unchecked,
size: Sizes.icon2x,
color: Theme.of(context).colorScheme.onPrimary,
color: Theme.of(context).colorScheme.primary,
),
),
const DividerForRadioList(),
],
);
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import 'package:altme/app/app.dart';
import 'package:altme/app/shared/widget/divider_for_radio_list.dart';
import 'package:altme/dashboard/dashboard.dart';
import 'package:altme/l10n/l10n.dart';
import 'package:flutter/material.dart';
Expand Down Expand Up @@ -29,17 +30,6 @@ class DidKeyTypeWidget extends StatelessWidget {
}
return Column(
children: [
if (index != 0)
Padding(
padding: const EdgeInsets.symmetric(horizontal: 8),
child: Divider(
height: 0,
color: Theme.of(context)
.colorScheme
.onSurface
.withOpacity(0.12),
),
),
ListTile(
onTap: () {
final customOidc4vcProfile = state.model.profileSetting
Expand Down Expand Up @@ -87,9 +77,10 @@ class DidKeyTypeWidget extends StatelessWidget {
? Icons.radio_button_checked
: Icons.radio_button_unchecked,
size: Sizes.icon2x,
color: Theme.of(context).colorScheme.onPrimary,
color: Theme.of(context).colorScheme.primary,
),
),
const DividerForRadioList(),
],
);
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import 'package:altme/app/app.dart';
import 'package:altme/app/shared/widget/divider_for_radio_list.dart';
import 'package:altme/dashboard/dashboard.dart';
import 'package:altme/l10n/l10n.dart';
import 'package:flutter/material.dart';
Expand All @@ -25,17 +26,6 @@ class DraftTypeWidget extends StatelessWidget {
final draftType = OIDC4VCIDraftType.values[index];
return Column(
children: [
if (index != 0)
Padding(
padding: const EdgeInsets.symmetric(horizontal: 8),
child: Divider(
height: 0,
color: Theme.of(context)
.colorScheme
.onSurface
.withOpacity(0.12),
),
),
ListTile(
onTap: () {
context.read<ProfileCubit>().updateProfileSetting(
Expand All @@ -50,9 +40,7 @@ class DraftTypeWidget extends StatelessWidget {
),
title: Text(
draftType.formattedString,
style: Theme.of(context).textTheme.bodyLarge?.copyWith(
color: Theme.of(context).colorScheme.onPrimary,
),
style: Theme.of(context).textTheme.bodyLarge,
),
trailing: Icon(
state.model.profileSetting.selfSovereignIdentityOptions
Expand All @@ -61,9 +49,10 @@ class DraftTypeWidget extends StatelessWidget {
? Icons.radio_button_checked
: Icons.radio_button_unchecked,
size: Sizes.icon2x,
color: Theme.of(context).colorScheme.onPrimary,
color: Theme.of(context).colorScheme.primary,
),
),
const DividerForRadioList()
],
);
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import 'package:altme/app/app.dart';
import 'package:altme/app/shared/widget/divider_for_radio_list.dart';
import 'package:altme/dashboard/dashboard.dart';
import 'package:altme/l10n/l10n.dart';
import 'package:flutter/material.dart';
Expand All @@ -25,17 +26,6 @@ class ProofHeaderWidget extends StatelessWidget {
final proofHeaderType = ProofHeaderType.values[index];
return Column(
children: [
if (index != 0)
Padding(
padding: const EdgeInsets.symmetric(horizontal: 8),
child: Divider(
height: 0,
color: Theme.of(context)
.colorScheme
.onSurface
.withOpacity(0.12),
),
),
ListTile(
onTap: () {
context.read<ProfileCubit>().updateProfileSetting(
Expand All @@ -50,9 +40,7 @@ class ProofHeaderWidget extends StatelessWidget {
),
title: Text(
proofHeaderType.formattedString,
style: Theme.of(context).textTheme.bodyLarge?.copyWith(
color: Theme.of(context).colorScheme.onPrimary,
),
style: Theme.of(context).textTheme.bodyLarge,
),
trailing: Icon(
state.model.profileSetting.selfSovereignIdentityOptions
Expand All @@ -61,9 +49,10 @@ class ProofHeaderWidget extends StatelessWidget {
? Icons.radio_button_checked
: Icons.radio_button_unchecked,
size: Sizes.icon2x,
color: Theme.of(context).colorScheme.onPrimary,
color: Theme.of(context).colorScheme.primary,
),
),
const DividerForRadioList(),
],
);
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import 'package:altme/app/app.dart';
import 'package:altme/app/shared/widget/divider_for_radio_list.dart';
import 'package:altme/dashboard/dashboard.dart';
import 'package:altme/l10n/l10n.dart';
import 'package:flutter/material.dart';
Expand All @@ -25,17 +26,6 @@ class ProofTypeWidget extends StatelessWidget {
final proofType = ProofType.values[index];
return Column(
children: [
if (index != 0)
Padding(
padding: const EdgeInsets.symmetric(horizontal: 8),
child: Divider(
height: 0,
color: Theme.of(context)
.colorScheme
.onSurface
.withOpacity(0.12),
),
),
ListTile(
onTap: () {
context.read<ProfileCubit>().updateProfileSetting(
Expand All @@ -50,9 +40,7 @@ class ProofTypeWidget extends StatelessWidget {
),
title: Text(
proofType.formattedString,
style: Theme.of(context).textTheme.bodyLarge?.copyWith(
color: Theme.of(context).colorScheme.onPrimary,
),
style: Theme.of(context).textTheme.bodyLarge,
),
trailing: Icon(
state.model.profileSetting.selfSovereignIdentityOptions
Expand All @@ -61,9 +49,10 @@ class ProofTypeWidget extends StatelessWidget {
? Icons.radio_button_checked
: Icons.radio_button_unchecked,
size: Sizes.icon2x,
color: Theme.of(context).colorScheme.onPrimary,
color: Theme.of(context).colorScheme.primary,
),
),
const DividerForRadioList(),
],
);
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import 'package:altme/app/app.dart';
import 'package:altme/app/shared/widget/divider_for_radio_list.dart';
import 'package:altme/dashboard/dashboard.dart';
import 'package:altme/l10n/l10n.dart';
import 'package:flutter/material.dart';
Expand All @@ -25,17 +26,6 @@ class VCFormatWidget extends StatelessWidget {
final vcFormatType = VCFormatType.values[index];
return Column(
children: [
if (index != 0)
Padding(
padding: const EdgeInsets.symmetric(horizontal: 8),
child: Divider(
height: 0,
color: Theme.of(context)
.colorScheme
.onSurface
.withOpacity(0.12),
),
),
ListTile(
onTap: () {
context.read<ProfileCubit>().updateProfileSetting(
Expand All @@ -50,9 +40,7 @@ class VCFormatWidget extends StatelessWidget {
),
title: Text(
vcFormatType.vcValue,
style: Theme.of(context).textTheme.bodyLarge?.copyWith(
color: Theme.of(context).colorScheme.onPrimary,
),
style: Theme.of(context).textTheme.bodyLarge,
),
trailing: Icon(
state.model.profileSetting.selfSovereignIdentityOptions
Expand All @@ -61,9 +49,10 @@ class VCFormatWidget extends StatelessWidget {
? Icons.radio_button_checked
: Icons.radio_button_unchecked,
size: Sizes.icon2x,
color: Theme.of(context).colorScheme.onPrimary,
color: Theme.of(context).colorScheme.primary,
),
),
const DividerForRadioList(),
],
);
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,12 @@ class LanguageSelectorWidget extends StatelessWidget {
),
),
title: Text(
languageType.getTitle(
l10n: l10n,
name: languageType.name,
),
style: Theme.of(context).textTheme.bodyLarge),
languageType.getTitle(
l10n: l10n,
name: languageType.name,
),
style: Theme.of(context).textTheme.bodyLarge,
),
trailing: Icon(
state.languageType == languageType
? Icons.radio_button_checked
Expand Down
Loading

0 comments on commit b7845ec

Please sign in to comment.