Skip to content
This repository has been archived by the owner on Dec 12, 2024. It is now read-only.

Commit

Permalink
chore: update themes (#302)
Browse files Browse the repository at this point in the history
  • Loading branch information
ethan-tbd authored Oct 2, 2024
1 parent 23a8ade commit 8137fba
Show file tree
Hide file tree
Showing 10 changed files with 50 additions and 53 deletions.
2 changes: 1 addition & 1 deletion lib/features/account/account_balance_card.dart
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class AccountBalanceCard extends HookConsumerWidget {
),
child: Container(
decoration: BoxDecoration(
color: Theme.of(context).colorScheme.surface,
color: Theme.of(context).colorScheme.surfaceContainer,
borderRadius: BorderRadius.circular(Grid.radius),
),
padding: const EdgeInsets.all(Grid.xs),
Expand Down
14 changes: 7 additions & 7 deletions lib/features/account/account_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,10 @@ class AccountPage extends HookConsumerWidget {
decoration: BoxDecoration(
shape: BoxShape.circle,
border: Border.all(
color: Theme.of(context).colorScheme.surface,
color: Theme.of(context).colorScheme.surfaceContainer,
width: Grid.quarter,
),
color: Theme.of(context).colorScheme.background,
color: Theme.of(context).colorScheme.surfaceContainer,
),
child: const Center(child: Icon(Icons.person, size: Grid.xl)),
),
Expand Down Expand Up @@ -147,7 +147,7 @@ class AccountPage extends HookConsumerWidget {
width: Grid.md,
height: Grid.md,
decoration: BoxDecoration(
color: Theme.of(context).colorScheme.surface,
color: Theme.of(context).colorScheme.surfaceContainer,
borderRadius: BorderRadius.circular(Grid.xxs),
),
child: const Center(child: Icon(Icons.account_balance)),
Expand All @@ -170,7 +170,7 @@ class AccountPage extends HookConsumerWidget {
width: Grid.md,
height: Grid.md,
decoration: BoxDecoration(
color: Theme.of(context).colorScheme.surface,
color: Theme.of(context).colorScheme.surfaceContainer,
borderRadius: BorderRadius.circular(Grid.xxs),
),
child: const Center(
Expand Down Expand Up @@ -230,7 +230,7 @@ class AccountPage extends HookConsumerWidget {
width: Grid.md,
height: Grid.md,
decoration: BoxDecoration(
color: Theme.of(context).colorScheme.surface,
color: Theme.of(context).colorScheme.surfaceContainer,
borderRadius: BorderRadius.circular(Grid.xxs),
),
child: const Center(child: Icon(Icons.gpp_good)),
Expand All @@ -253,7 +253,7 @@ class AccountPage extends HookConsumerWidget {
width: Grid.md,
height: Grid.md,
decoration: BoxDecoration(
color: Theme.of(context).colorScheme.surface,
color: Theme.of(context).colorScheme.surfaceContainer,
borderRadius: BorderRadius.circular(Grid.xxs),
),
child: Center(
Expand Down Expand Up @@ -310,7 +310,7 @@ class AccountPage extends HookConsumerWidget {
await ref.read(featureFlagsProvider.notifier).toggleFlag(flag);
},
activeColor: Theme.of(context).colorScheme.tertiary,
trackOutlineColor: MaterialStateProperty.resolveWith<Color?>(
trackOutlineColor: WidgetStateColor.resolveWith(
(_) => Colors.transparent,
),
);
Expand Down
8 changes: 5 additions & 3 deletions lib/features/home/home_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ class HomePage extends HookConsumerWidget {
useEffect(
() {
Future.delayed(
Duration.zero, () async => _getExchanges(context, ref, exchanges),);
Duration.zero,
() async => _getExchanges(context, ref, exchanges),
);
return null;
},
[],
Expand Down Expand Up @@ -147,7 +149,7 @@ class HomePage extends HookConsumerWidget {
const SizedBox(height: Grid.xs),
FilledButton(
style: ButtonStyle(
backgroundColor: MaterialStateProperty.all(
backgroundColor: WidgetStateProperty.all(
Theme.of(context).colorScheme.secondaryContainer,
),
),
Expand Down Expand Up @@ -186,7 +188,7 @@ class HomePage extends HookConsumerWidget {
const SizedBox(height: Grid.xxs),
FilledButton(
style: ButtonStyle(
backgroundColor: MaterialStateProperty.all(
backgroundColor: WidgetStateProperty.all(
Theme.of(context).colorScheme.secondaryContainer,
),
),
Expand Down
2 changes: 1 addition & 1 deletion lib/features/payment/payment_fee_details.dart
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class PaymentFeeDetails extends HookWidget {

return Container(
decoration: BoxDecoration(
color: Theme.of(context).colorScheme.surface,
color: Theme.of(context).colorScheme.surfaceContainer,
borderRadius: BorderRadius.circular(15),
),
padding:
Expand Down
10 changes: 4 additions & 6 deletions lib/features/qr/qr_code_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,8 @@ class QrCodePage extends HookConsumerWidget {
height: qrSize,
decoration: BoxDecoration(
border: Border.all(
color: Theme.of(context)
.colorScheme
.onBackground
.withOpacity(0.2),
color:
Theme.of(context).colorScheme.secondary.withOpacity(0.2),
),
borderRadius: BorderRadius.circular(Grid.radius),
),
Expand Down Expand Up @@ -137,10 +135,10 @@ class QrCodePage extends HookConsumerWidget {
size: size,
eyeStyle: QrEyeStyle(
eyeShape: QrEyeShape.square,
color: Theme.of(context).colorScheme.onBackground,
color: Theme.of(context).colorScheme.secondary,
),
dataModuleStyle: QrDataModuleStyle(
color: Theme.of(context).colorScheme.onBackground,
color: Theme.of(context).colorScheme.secondary,
dataModuleShape: QrDataModuleShape.square,
),
);
Expand Down
9 changes: 4 additions & 5 deletions lib/features/qr/qr_tabs.dart
Original file line number Diff line number Diff line change
Expand Up @@ -37,21 +37,20 @@ class QrTabs extends HookWidget {
bottom: Grid.xxl,
child: Container(
decoration: BoxDecoration(
color: Theme.of(context).colorScheme.surface,
color: Theme.of(context).colorScheme.surfaceContainer,
borderRadius: BorderRadius.circular(Grid.radius),
),
child: TabBar(
controller: tabController,
indicator: BoxDecoration(
borderRadius: BorderRadius.circular(Grid.radius),
color: Theme.of(context).colorScheme.background,
color: Theme.of(context).colorScheme.surfaceContainer,
),
indicatorSize: TabBarIndicatorSize.tab,
indicatorPadding: const EdgeInsets.all(Grid.quarter),
dividerColor: Colors.transparent,
labelColor: Theme.of(context).colorScheme.onBackground,
unselectedLabelColor:
Theme.of(context).colorScheme.onBackground,
labelColor: Theme.of(context).colorScheme.secondary,
unselectedLabelColor: Theme.of(context).colorScheme.secondary,
tabs: [
Tab(text: Loc.of(context).scan),
Tab(text: Loc.of(context).myDid),
Expand Down
10 changes: 4 additions & 6 deletions lib/shared/theme/color_scheme.dart
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,8 @@ const lightColorScheme = ColorScheme(
onTertiary: Color(0xFFFBFBFB),
error: Color(0xFF931919),
onError: Color(0xFFFBFBFB),
background: Color(0xFFECECEC),
onBackground: Color(0xFF161616),
surface: Color(0xFFFBFBFB),
surfaceContainer: Color(0xFFFBFBFB),
surface: Color(0xFFECECEC),
onSurface: Color(0xFF4F4F4F),
);

Expand All @@ -26,8 +25,7 @@ const darkColorScheme = ColorScheme(
onTertiary: Color(0xFF161616),
error: Color(0xFFE57373),
onError: Color(0xFF161616),
background: Color(0xFF161616),
onBackground: Color(0xFFBDBDBD),
surface: Color(0xFF262626),
surfaceContainer: Color(0xFF262626),
surface: Color(0xFF161616),
onSurface: Color(0xFF9C9C9C),
);
20 changes: 10 additions & 10 deletions lib/shared/theme/theme.dart
Original file line number Diff line number Diff line change
Expand Up @@ -9,26 +9,26 @@ ThemeData lightTheme(BuildContext context) => ThemeData(
textTheme: textTheme(ThemeData().textTheme),
appBarTheme: AppBarTheme(
scrolledUnderElevation: 0,
backgroundColor: lightColorScheme.background,
backgroundColor: lightColorScheme.surface,
),
segmentedButtonTheme: SegmentedButtonThemeData(
style: ButtonStyle(
backgroundColor: MaterialStateProperty.resolveWith<Color>(
backgroundColor: WidgetStateProperty.resolveWith<Color>(
(states) {
return states.contains(MaterialState.selected)
return states.contains(WidgetState.selected)
? lightColorScheme.secondary
: lightColorScheme.onSecondary;
},
),
side: MaterialStateProperty.resolveWith<BorderSide>(
side: WidgetStateProperty.resolveWith<BorderSide>(
(_) {
return BorderSide(
color: lightColorScheme.secondary,
width: Grid.quarter,
);
},
),
shape: MaterialStateProperty.all(
shape: WidgetStateProperty.all(
RoundedRectangleBorder(
borderRadius: BorderRadius.circular(Grid.xs),
),
Expand Down Expand Up @@ -60,26 +60,26 @@ ThemeData darkTheme(BuildContext context) => ThemeData(
textTheme: textTheme(ThemeData.dark().textTheme),
appBarTheme: AppBarTheme(
scrolledUnderElevation: 0,
backgroundColor: darkColorScheme.background,
backgroundColor: darkColorScheme.surface,
),
segmentedButtonTheme: SegmentedButtonThemeData(
style: ButtonStyle(
backgroundColor: MaterialStateProperty.resolveWith<Color>(
backgroundColor: WidgetStateProperty.resolveWith<Color>(
(states) {
return states.contains(MaterialState.selected)
return states.contains(WidgetState.selected)
? darkColorScheme.secondary
: darkColorScheme.onSecondary;
},
),
side: MaterialStateProperty.resolveWith<BorderSide>(
side: WidgetStateProperty.resolveWith<BorderSide>(
(_) {
return BorderSide(
color: darkColorScheme.secondary,
width: Grid.quarter,
);
},
),
shape: MaterialStateProperty.all(
shape: WidgetStateProperty.all(
RoundedRectangleBorder(
borderRadius: BorderRadius.circular(Grid.xs),
),
Expand Down
2 changes: 1 addition & 1 deletion lib/shared/tile_container.dart
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class TileContainer extends HookWidget {
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(
color: Theme.of(context).colorScheme.surface,
color: Theme.of(context).colorScheme.surfaceContainer,
),
),
),
Expand Down
26 changes: 13 additions & 13 deletions pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,10 @@ packages:
dependency: "direct main"
description:
name: collection
sha256: a1ace0a119f20aabc852d165077c036cd864315bd99b7eaa10a60100341941bf
sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a
url: "https://pub.dev"
source: hosted
version: "1.19.0"
version: "1.18.0"
convert:
dependency: transitive
description:
Expand Down Expand Up @@ -442,18 +442,18 @@ packages:
dependency: transitive
description:
name: leak_tracker
sha256: "7bb2830ebd849694d1ec25bf1f44582d6ac531a57a365a803a6034ff751d2d06"
sha256: "3f87a60e8c63aecc975dda1ceedbc8f24de75f09e4856ea27daf8958f2f0ce05"
url: "https://pub.dev"
source: hosted
version: "10.0.7"
version: "10.0.5"
leak_tracker_flutter_testing:
dependency: transitive
description:
name: leak_tracker_flutter_testing
sha256: "9491a714cca3667b60b5c420da8217e6de0d1ba7a5ec322fab01758f6998f379"
sha256: "932549fb305594d82d7183ecd9fa93463e9914e1b67cacc34bc40906594a1806"
url: "https://pub.dev"
source: hosted
version: "3.0.8"
version: "3.0.5"
leak_tracker_testing:
dependency: transitive
description:
Expand Down Expand Up @@ -746,7 +746,7 @@ packages:
dependency: transitive
description: flutter
source: sdk
version: "0.0.0"
version: "0.0.99"
source_span:
dependency: transitive
description:
Expand Down Expand Up @@ -791,10 +791,10 @@ packages:
dependency: transitive
description:
name: string_scanner
sha256: "688af5ed3402a4bde5b3a6c15fd768dbf2621a614950b17f04626c431ab3c4c3"
sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde"
url: "https://pub.dev"
source: hosted
version: "1.3.0"
version: "1.2.0"
tbdex:
dependency: "direct main"
description:
Expand All @@ -816,10 +816,10 @@ packages:
dependency: transitive
description:
name: test_api
sha256: "664d3a9a64782fcdeb83ce9c6b39e78fd2971d4e37827b9b06c3aa1edc5e760c"
sha256: "5b8a98dafc4d5c4c9c72d8b31ab2b23fc13422348d2997120294d3bac86b4ddb"
url: "https://pub.dev"
source: hosted
version: "0.7.3"
version: "0.7.2"
typed_data:
dependency: transitive
description:
Expand Down Expand Up @@ -928,10 +928,10 @@ packages:
dependency: transitive
description:
name: vm_service
sha256: f6be3ed8bd01289b34d679c2b62226f63c0e69f9fd2e50a6b3c1c729a961041b
sha256: "5c5f338a667b4c644744b661f309fb8080bb94b18a7e91ef1dbd343bed00ed6d"
url: "https://pub.dev"
source: hosted
version: "14.3.0"
version: "14.2.5"
web:
dependency: transitive
description:
Expand Down

0 comments on commit 8137fba

Please sign in to comment.