diff --git a/assets/terms/mobile_cgu_en.md b/assets/terms/mobile_cgu_en.md index fee726027..336725517 100644 --- a/assets/terms/mobile_cgu_en.md +++ b/assets/terms/mobile_cgu_en.md @@ -79,7 +79,7 @@ When creating a wallet, we strongly recommend taking precautionary measures to p -* Creating a strong and unique PIN Code, distinct from pin code used for other purposes (e.g., different from your phone PIN Code or pin code used on websites or online services), and utilizing biometric authentication if available. +* Creating a strong and unique PIN Code, distinct from PIN Code used for other purposes (e.g., different from your phone PIN Code or PIN Code used on websites or online services), and utilizing biometric authentication if available. * Avoiding the storage of private keys and the Recovery Phrase in plain text online or in insecure physical locations. * Restricting access to your devices and wallet. * Taking necessary precautions against malware on your devices and networks. @@ -259,7 +259,7 @@ User Obligations: * Users commit to refraining from engaging in illegal or harmful use of the service and promptly reporting errors. -* Users are also required to select a pin code in line with policy guidelines. +* Users are also required to select a PIN Code in line with policy guidelines. * Users must securely store their electronic identification means and refrain from sharing them with third parties. Prohibited actions: diff --git a/google_fonts/Poppins-Black.ttf b/google_fonts/Poppins-Black.ttf new file mode 100644 index 000000000..71c0f995e Binary files /dev/null and b/google_fonts/Poppins-Black.ttf differ diff --git a/google_fonts/Poppins-BlackItalic.ttf b/google_fonts/Poppins-BlackItalic.ttf new file mode 100644 index 000000000..7aeb58bd1 Binary files /dev/null and b/google_fonts/Poppins-BlackItalic.ttf differ diff --git a/google_fonts/Poppins-Bold.ttf b/google_fonts/Poppins-Bold.ttf new file mode 100644 index 000000000..00559eeb2 Binary files /dev/null and b/google_fonts/Poppins-Bold.ttf differ diff --git a/google_fonts/Poppins-BoldItalic.ttf b/google_fonts/Poppins-BoldItalic.ttf new file mode 100644 index 000000000..e61e8e88b Binary files /dev/null and b/google_fonts/Poppins-BoldItalic.ttf differ diff --git a/google_fonts/Poppins-ExtraBold.ttf b/google_fonts/Poppins-ExtraBold.ttf new file mode 100644 index 000000000..df7093608 Binary files /dev/null and b/google_fonts/Poppins-ExtraBold.ttf differ diff --git a/google_fonts/Poppins-ExtraBoldItalic.ttf b/google_fonts/Poppins-ExtraBoldItalic.ttf new file mode 100644 index 000000000..14d2b375d Binary files /dev/null and b/google_fonts/Poppins-ExtraBoldItalic.ttf differ diff --git a/google_fonts/Poppins-ExtraLight.ttf b/google_fonts/Poppins-ExtraLight.ttf new file mode 100644 index 000000000..e76ec69a6 Binary files /dev/null and b/google_fonts/Poppins-ExtraLight.ttf differ diff --git a/google_fonts/Poppins-ExtraLightItalic.ttf b/google_fonts/Poppins-ExtraLightItalic.ttf new file mode 100644 index 000000000..89513d946 Binary files /dev/null and b/google_fonts/Poppins-ExtraLightItalic.ttf differ diff --git a/google_fonts/Poppins-Italic.ttf b/google_fonts/Poppins-Italic.ttf new file mode 100644 index 000000000..12b7b3c40 Binary files /dev/null and b/google_fonts/Poppins-Italic.ttf differ diff --git a/google_fonts/Poppins-Light.ttf b/google_fonts/Poppins-Light.ttf new file mode 100644 index 000000000..bc36bcc24 Binary files /dev/null and b/google_fonts/Poppins-Light.ttf differ diff --git a/google_fonts/Poppins-LightItalic.ttf b/google_fonts/Poppins-LightItalic.ttf new file mode 100644 index 000000000..9e70be6a9 Binary files /dev/null and b/google_fonts/Poppins-LightItalic.ttf differ diff --git a/google_fonts/Poppins-Medium.ttf b/google_fonts/Poppins-Medium.ttf new file mode 100644 index 000000000..6bcdcc27f Binary files /dev/null and b/google_fonts/Poppins-Medium.ttf differ diff --git a/google_fonts/Poppins-MediumItalic.ttf b/google_fonts/Poppins-MediumItalic.ttf new file mode 100644 index 000000000..be67410fd Binary files /dev/null and b/google_fonts/Poppins-MediumItalic.ttf differ diff --git a/google_fonts/Poppins-Regular.ttf b/google_fonts/Poppins-Regular.ttf new file mode 100644 index 000000000..9f0c71b70 Binary files /dev/null and b/google_fonts/Poppins-Regular.ttf differ diff --git a/google_fonts/Poppins-SemiBold.ttf b/google_fonts/Poppins-SemiBold.ttf new file mode 100644 index 000000000..74c726e32 Binary files /dev/null and b/google_fonts/Poppins-SemiBold.ttf differ diff --git a/google_fonts/Poppins-SemiBoldItalic.ttf b/google_fonts/Poppins-SemiBoldItalic.ttf new file mode 100644 index 000000000..3e6c94223 Binary files /dev/null and b/google_fonts/Poppins-SemiBoldItalic.ttf differ diff --git a/google_fonts/Poppins-Thin.ttf b/google_fonts/Poppins-Thin.ttf new file mode 100644 index 000000000..03e736613 Binary files /dev/null and b/google_fonts/Poppins-Thin.ttf differ diff --git a/google_fonts/Poppins-ThinItalic.ttf b/google_fonts/Poppins-ThinItalic.ttf new file mode 100644 index 000000000..e26db5dd3 Binary files /dev/null and b/google_fonts/Poppins-ThinItalic.ttf differ diff --git a/lib/app/shared/widget/add_account/add_account_button.dart b/lib/app/shared/widget/add_account/add_account_button.dart index 51add3812..4600a5af7 100644 --- a/lib/app/shared/widget/add_account/add_account_button.dart +++ b/lib/app/shared/widget/add_account/add_account_button.dart @@ -31,14 +31,14 @@ class AddAccountButton extends StatelessWidget { ), Text( l10n.cryptoAddAccount, - style: Theme.of(context).textTheme.headlineSmall, + style: Theme.of(context).textTheme.titleMedium, ), ], ), const SizedBox(height: 3), Text( l10n.createOrImportNewAccount, - style: Theme.of(context).textTheme.titleSmall, + style: Theme.of(context).textTheme.bodyMedium, ), ], ), diff --git a/lib/app/shared/widget/base/background_card.dart b/lib/app/shared/widget/base/background_card.dart index 0b192a734..4d5047c65 100644 --- a/lib/app/shared/widget/base/background_card.dart +++ b/lib/app/shared/widget/base/background_card.dart @@ -26,7 +26,7 @@ class BackgroundCard extends StatelessWidget { height: height, width: width, decoration: BoxDecoration( - color: color ?? Theme.of(context).colorScheme.secondaryContainer, + color: color ?? Theme.of(context).colorScheme.surfaceContainer, borderRadius: const BorderRadius.all(Radius.circular(15)), ), child: child, diff --git a/lib/app/shared/widget/button/button.dart b/lib/app/shared/widget/button/button.dart index 347ab0386..9884cd400 100644 --- a/lib/app/shared/widget/button/button.dart +++ b/lib/app/shared/widget/button/button.dart @@ -1,3 +1,2 @@ export 'my_elevated_button.dart'; -export 'my_gradient_button.dart'; export 'my_outlined_button.dart'; diff --git a/lib/app/shared/widget/button/my_elevated_button.dart b/lib/app/shared/widget/button/my_elevated_button.dart index 17305517c..8dbc39796 100644 --- a/lib/app/shared/widget/button/my_elevated_button.dart +++ b/lib/app/shared/widget/button/my_elevated_button.dart @@ -53,14 +53,21 @@ class MyElevatedButton extends StatelessWidget { onPressed: onPressed, ), onPressed: onPressed, - child: ElevatedButtonText( - text: text, - fontSize: fontSize, - textColor: textColor, + child: Text( + text.toUpperCase(), + style: Theme.of(context).textTheme.titleLarge!.copyWith( + fontWeight: FontWeight.bold, + ), ), ) : ElevatedButton.icon( - icon: icon, + icon: ColorFiltered( + colorFilter: ColorFilter.mode( + textColor ?? Theme.of(context).textTheme.titleLarge!.color!, + BlendMode.srcIn, + ), + child: icon, + ), style: elevatedStyleFrom( borderRadius: borderRadius, context: context, @@ -70,10 +77,11 @@ class MyElevatedButton extends StatelessWidget { onPressed: onPressed, ), onPressed: onPressed, - label: ElevatedButtonText( - text: text, - fontSize: fontSize, - textColor: textColor, + label: Text( + text.toUpperCase(), + style: Theme.of(context).textTheme.titleLarge!.copyWith( + fontWeight: FontWeight.bold, + ), ), ), ); @@ -95,8 +103,8 @@ ButtonStyle elevatedStyleFrom({ ), backgroundColor: WidgetStateProperty.all( onPressed == null - ? Theme.of(context).colorScheme.onSurface.withOpacity(0.12) - : backgroundColor ?? Theme.of(context).colorScheme.primary, + ? Theme.of(context).colorScheme.outline + : backgroundColor ?? Theme.of(context).colorScheme.secondaryContainer, ), shape: WidgetStateProperty.all( RoundedRectangleBorder( @@ -106,6 +114,7 @@ ButtonStyle elevatedStyleFrom({ ); } +// @TODO: remove if buttons OK class ElevatedButtonText extends StatelessWidget { const ElevatedButtonText({ super.key, diff --git a/lib/app/shared/widget/button/my_gradient_button.dart b/lib/app/shared/widget/button/my_gradient_button.dart deleted file mode 100644 index 5c16b95aa..000000000 --- a/lib/app/shared/widget/button/my_gradient_button.dart +++ /dev/null @@ -1,146 +0,0 @@ -import 'package:altme/app/app.dart'; -import 'package:flutter/material.dart'; - -class MyGradientButton extends StatelessWidget { - const MyGradientButton({ - super.key, - required this.text, - this.icon, - this.borderRadius = 8, - this.verticalSpacing = 20, - this.elevation = 2, - this.fontSize = 18, - this.gradient, - this.onPressed, - this.upperCase = true, - }); - - const MyGradientButton.icon({ - super.key, - required this.text, - required this.icon, - this.borderRadius = 20, - this.verticalSpacing = 20, - this.elevation = 2, - this.fontSize = 18, - this.gradient, - this.onPressed, - this.upperCase = true, - }); - - final String text; - final double elevation; - final double borderRadius; - final double verticalSpacing; - final double fontSize; - final Gradient? gradient; - final GestureTapCallback? onPressed; - final Widget? icon; - final bool upperCase; - - @override - Widget build(BuildContext context) { - final gradientValue = gradient ?? - LinearGradient( - begin: Alignment.topCenter, - end: Alignment.bottomCenter, - colors: [ - Theme.of(context).colorScheme.tertiary, - Theme.of(context).colorScheme.primary, - ], - ); - return SizedBox( - width: MediaQuery.of(context).size.width, - child: DecoratedBox( - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(borderRadius), - gradient: onPressed == null ? null : gradientValue, - color: onPressed == null - ? Theme.of(context).colorScheme.onSurface.withOpacity(0.12) - : null, - ), - child: icon == null - ? ElevatedButton( - style: gradientStyleFrom( - elevation: elevation, - verticalSpacing: verticalSpacing, - borderRadius: borderRadius, - context: context, - ), - onPressed: onPressed, - child: GradientButtonText( - text: text.toUpperCase(), - onPressed: onPressed, - fontSize: fontSize, - upperCase: upperCase, - ), - ) - : ElevatedButton.icon( - icon: icon, - style: gradientStyleFrom( - elevation: elevation, - verticalSpacing: verticalSpacing, - borderRadius: borderRadius, - context: context, - ), - onPressed: onPressed, - label: GradientButtonText( - text: text.toUpperCase(), - onPressed: onPressed, - fontSize: fontSize, - upperCase: upperCase, - ), - ), - ), - ); - } -} - -ButtonStyle gradientStyleFrom({ - required double borderRadius, - required double verticalSpacing, - required double elevation, - required BuildContext context, -}) { - return ElevatedButton.styleFrom( - elevation: elevation, - padding: EdgeInsets.symmetric(vertical: verticalSpacing), - backgroundColor: Colors.transparent, - shadowColor: Colors.transparent, - shape: RoundedRectangleBorder( - borderRadius: BorderRadius.circular(borderRadius), - ), - ); -} - -class GradientButtonText extends StatelessWidget { - const GradientButtonText({ - super.key, - required this.text, - required this.onPressed, - this.fontSize = 18, - required this.upperCase, - }); - - final String text; - final GestureTapCallback? onPressed; - final double fontSize; - final bool upperCase; - - @override - Widget build(BuildContext context) { - return TransparentInkWell( - onTap: onPressed, - child: Text( - upperCase ? text.toUpperCase() : text, - style: TextStyle( - color: onPressed != null - ? Theme.of(context).colorScheme.onPrimary - : Theme.of(context).colorScheme.onSurface.withOpacity(0.38), - fontSize: fontSize, - fontWeight: FontWeight.w700, - ), - ), - ); - } -} diff --git a/lib/app/shared/widget/button/my_outlined_button.dart b/lib/app/shared/widget/button/my_outlined_button.dart index b032903cb..2bdccc54c 100644 --- a/lib/app/shared/widget/button/my_outlined_button.dart +++ b/lib/app/shared/widget/button/my_outlined_button.dart @@ -56,15 +56,28 @@ class MyOutlinedButton extends StatelessWidget { onPressed: onPressed, ), onPressed: onPressed, - child: OutlinedButtonText( - text: text, - fontSize: fontSize, - textColor: textColor, - onPressed: onPressed, + child: Text( + text.toUpperCase(), + style: Theme.of(context).textTheme.titleLarge!.copyWith( + fontWeight: FontWeight.bold, + color: onPressed == null + ? Theme.of(context) + .colorScheme + .onSurface + .withOpacity(0.12) + : textColor ?? + Theme.of(context).colorScheme.secondaryContainer, + ), ), ) : OutlinedButton.icon( - icon: icon, + icon: ColorFiltered( + colorFilter: ColorFilter.mode( + textColor ?? Theme.of(context).colorScheme.secondaryContainer, + BlendMode.srcIn, + ), + child: icon, + ), style: outlinedStyleFrom( borderRadius: borderRadius, context: context, @@ -75,11 +88,18 @@ class MyOutlinedButton extends StatelessWidget { onPressed: onPressed, ), onPressed: onPressed, - label: OutlinedButtonText( - text: text, - fontSize: fontSize, - textColor: textColor, - onPressed: onPressed, + label: Text( + text.toUpperCase(), + style: Theme.of(context).textTheme.titleLarge!.copyWith( + fontWeight: FontWeight.bold, + color: onPressed == null + ? Theme.of(context) + .colorScheme + .onSurface + .withOpacity(0.12) + : textColor ?? + Theme.of(context).colorScheme.secondaryContainer, + ), ), ), ); @@ -102,7 +122,7 @@ ButtonStyle outlinedStyleFrom({ side: BorderSide( color: onPressed == null ? Theme.of(context).colorScheme.onSurface.withOpacity(0.12) - : borderColor ?? Theme.of(context).colorScheme.primary, + : borderColor ?? Theme.of(context).colorScheme.secondaryContainer, width: 2, ), shape: RoundedRectangleBorder( @@ -132,7 +152,7 @@ class OutlinedButtonText extends StatelessWidget { style: TextStyle( color: onPressed == null ? Theme.of(context).colorScheme.onSurface.withOpacity(0.12) - : textColor ?? Theme.of(context).colorScheme.primary, + : textColor ?? Theme.of(context).colorScheme.secondaryContainer, fontSize: fontSize, fontWeight: FontWeight.w700, ), diff --git a/lib/app/shared/widget/checkbox_item.dart b/lib/app/shared/widget/checkbox_item.dart index 52f263264..1fd51cee4 100644 --- a/lib/app/shared/widget/checkbox_item.dart +++ b/lib/app/shared/widget/checkbox_item.dart @@ -36,7 +36,7 @@ class CheckboxItem extends StatelessWidget { ), Text( text, - style: textStyle ?? Theme.of(context).textTheme.labelLarge, + style: textStyle ?? Theme.of(context).textTheme.bodyLarge, ), ], ), diff --git a/lib/app/shared/widget/custom_app_bar.dart b/lib/app/shared/widget/custom_app_bar.dart index 07384fda1..d2abd3f1b 100644 --- a/lib/app/shared/widget/custom_app_bar.dart +++ b/lib/app/shared/widget/custom_app_bar.dart @@ -50,9 +50,7 @@ class CustomAppBar extends PreferredSize { title ?? '', maxLines: 2, textAlign: TextAlign.center, - style: Theme.of(context).textTheme.headlineMedium!.copyWith( - fontWeight: FontWeight.bold, - ), + style: Theme.of(context).textTheme.headlineSmall, ), ), ], diff --git a/lib/app/shared/widget/custom_listtile_card.dart b/lib/app/shared/widget/custom_listtile_card.dart index f6fa29cb3..3c3abb2ef 100644 --- a/lib/app/shared/widget/custom_listtile_card.dart +++ b/lib/app/shared/widget/custom_listtile_card.dart @@ -28,13 +28,15 @@ class CustomListTileCard extends StatelessWidget { ), ), contentPadding: const EdgeInsets.all(Sizes.spaceNormal), - tileColor: Theme.of(context).colorScheme.surface, + tileColor: Theme.of(context).colorScheme.secondaryContainer, title: Row( children: [ Expanded( - child: MyText( + child: Text( title, - style: Theme.of(context).textTheme.titleMedium, + style: Theme.of(context).textTheme.titleMedium!.copyWith( + fontWeight: FontWeight.bold, + ), ), ), const SizedBox(width: 10), @@ -50,7 +52,7 @@ class CustomListTileCard extends StatelessWidget { ), subtitle: Text( subTitle, - style: Theme.of(context).textTheme.labelMedium, + style: Theme.of(context).textTheme.bodyMedium, ), minVerticalPadding: 0, trailing: Image.asset( diff --git a/lib/app/shared/widget/dialog/confirm_dialog.dart b/lib/app/shared/widget/dialog/confirm_dialog.dart index 0028b2b51..248a9ee50 100644 --- a/lib/app/shared/widget/dialog/confirm_dialog.dart +++ b/lib/app/shared/widget/dialog/confirm_dialog.dart @@ -30,7 +30,8 @@ class ConfirmDialog extends StatelessWidget { @override Widget build(BuildContext context) { final color = dialogColor ?? Theme.of(context).colorScheme.primary; - final background = bgColor ?? Theme.of(context).colorScheme.surfaceDim; + final background = + bgColor ?? Theme.of(context).colorScheme.surfaceContainerHighest; final textColor = this.textColor ?? Theme.of(context).colorScheme.onSurface; final l10n = context.l10n; @@ -85,8 +86,6 @@ class ConfirmDialog extends StatelessWidget { .colorScheme .onSurface .withOpacity(0.2), - backgroundColor: background, - textColor: textColor, borderRadius: Sizes.smallRadius, elevation: 0, onPressed: () { @@ -100,7 +99,6 @@ class ConfirmDialog extends StatelessWidget { child: MyElevatedButton( text: yes ?? l10n.yes, verticalSpacing: 14, - backgroundColor: color, borderRadius: Sizes.smallRadius, fontSize: 15, elevation: 0, diff --git a/lib/app/shared/widget/dialog/error_dialog.dart b/lib/app/shared/widget/dialog/error_dialog.dart index 0c239a396..72bd57175 100644 --- a/lib/app/shared/widget/dialog/error_dialog.dart +++ b/lib/app/shared/widget/dialog/error_dialog.dart @@ -23,10 +23,9 @@ class ErrorDialog extends StatelessWidget { @override Widget build(BuildContext context) { - final color = dialogColor ?? Theme.of(context).colorScheme.primary; - final background = - bgColor ?? Theme.of(context).colorScheme.primaryContainer; - final textColor = this.textColor ?? Theme.of(context).colorScheme.onSurface; + final color = dialogColor ?? Theme.of(context).colorScheme.primaryContainer; + final background = bgColor ?? Theme.of(context).colorScheme.onSurface; + final textColor = this.textColor ?? Theme.of(context).colorScheme.surface; final l10n = context.l10n; return AlertDialog( @@ -82,6 +81,7 @@ class ErrorDialog extends StatelessWidget { verticalSpacing: 14, backgroundColor: color, borderRadius: Sizes.smallRadius, + textColor: background, fontSize: 15, elevation: 0, onPressed: () { diff --git a/lib/app/shared/widget/numeric_keyboard.dart b/lib/app/shared/widget/numeric_keyboard.dart index 28b9fe396..2c108af8d 100644 --- a/lib/app/shared/widget/numeric_keyboard.dart +++ b/lib/app/shared/widget/numeric_keyboard.dart @@ -12,7 +12,7 @@ class KeyboardUIConfig { this.spacing = 4, this.digitShape = BoxShape.circle, this.keyboardRowMargin = const EdgeInsets.only(top: 15, left: 4, right: 4), - this.digitInnerMargin = const EdgeInsets.all(24), + this.digitInnerMargin = const EdgeInsets.all(20), this.keyboardSize, this.digitTextStyle, }); @@ -159,10 +159,10 @@ class KeyboardButton extends StatelessWidget { color: Colors.transparent, child: InkWell( highlightColor: allowAction - ? Theme.of(context).colorScheme.primary + ? Theme.of(context).colorScheme.primaryContainer : Theme.of(context).colorScheme.surface, splashColor: allowAction - ? Theme.of(context).colorScheme.primary + ? Theme.of(context).colorScheme.primaryContainer : Theme.of(context).colorScheme.surface, onLongPress: () { if (!allowAction) return; @@ -286,10 +286,13 @@ class AlignedGrid extends StatelessWidget { @override Widget build(BuildContext context) { + const heightAdjustment = 30; final itemWidth = (keyboardSize.width - (spacing * (columns - 1))) / columns; final rows = children.length / columns; - final itemHeight = (keyboardSize.height - (runSpacing * (rows - 1))) / rows; + final itemHeight = + (keyboardSize.height - (runSpacing * (rows - 1)) - heightAdjustment) / + rows; final itemSize = min(itemHeight, itemWidth); return Wrap( runSpacing: runSpacing, diff --git a/lib/app/shared/widget/wallet_logo.dart b/lib/app/shared/widget/wallet_logo.dart index 23b2c9001..fbed53e89 100644 --- a/lib/app/shared/widget/wallet_logo.dart +++ b/lib/app/shared/widget/wallet_logo.dart @@ -47,7 +47,7 @@ class WalletLogo extends StatelessWidget { colorFilter: ColorFilter.mode( profileModel.profileType == ProfileType.enterprise ? Colors.transparent - : Theme.of(context).colorScheme.primary, + : Theme.of(context).colorScheme.primaryContainer, BlendMode.srcIn, ), child: SizedBox( diff --git a/lib/dashboard/add_account/create_account/view/congratulations_account_creation_page.dart b/lib/dashboard/add_account/create_account/view/congratulations_account_creation_page.dart index a31ac53ef..e7ed97d9c 100644 --- a/lib/dashboard/add_account/create_account/view/congratulations_account_creation_page.dart +++ b/lib/dashboard/add_account/create_account/view/congratulations_account_creation_page.dart @@ -121,14 +121,9 @@ class _CongratulationsAccountCreationViewState const SizedBox( height: Sizes.spaceNormal, ), - Text( - message, - textAlign: TextAlign.center, - style: Theme.of(context).textTheme.headlineSmall?.copyWith( - fontWeight: FontWeight.normal, - color: Theme.of(context).colorScheme.onTertiary, - ), - ), + Text(message, + textAlign: TextAlign.center, + style: Theme.of(context).textTheme.headlineSmall), const SizedBox( height: Sizes.space3XLarge, ), diff --git a/lib/dashboard/ai_age_verification/verify_age/view/ai_age_result_page.dart b/lib/dashboard/ai_age_verification/verify_age/view/ai_age_result_page.dart index 3050a3b27..046e23eba 100644 --- a/lib/dashboard/ai_age_verification/verify_age/view/ai_age_result_page.dart +++ b/lib/dashboard/ai_age_verification/verify_age/view/ai_age_result_page.dart @@ -147,7 +147,7 @@ class SuccessWidget extends StatelessWidget { ), ), const Spacer(), - MyGradientButton( + MyElevatedButton( text: l10n.ok, verticalSpacing: 18, onPressed: () { diff --git a/lib/dashboard/ai_age_verification/verify_age/view/camera_page.dart b/lib/dashboard/ai_age_verification/verify_age/view/camera_page.dart index a68c147df..636d7a9c3 100644 --- a/lib/dashboard/ai_age_verification/verify_age/view/camera_page.dart +++ b/lib/dashboard/ai_age_verification/verify_age/view/camera_page.dart @@ -143,7 +143,7 @@ class _CameraViewState extends State { padding: const EdgeInsets.all(Sizes.spaceNormal), child: BlocBuilder( builder: (context, state) { - return MyGradientButton( + return MyElevatedButton( borderRadius: Sizes.smallRadius, verticalSpacing: 16, text: l10n.takePicture, diff --git a/lib/dashboard/connection/confirm_connection/view/confirm_connection_page.dart b/lib/dashboard/connection/confirm_connection/view/confirm_connection_page.dart index d63d7e0e7..1de905e12 100644 --- a/lib/dashboard/connection/confirm_connection/view/confirm_connection_page.dart +++ b/lib/dashboard/connection/confirm_connection/view/confirm_connection_page.dart @@ -161,7 +161,7 @@ class ConfirmConnectionView extends StatelessWidget { return Container(); } - return MyGradientButton( + return MyElevatedButton( verticalSpacing: 15, borderRadius: Sizes.normalRadius, text: l10n.connect, diff --git a/lib/dashboard/connection/operation/view/operation_page.dart b/lib/dashboard/connection/operation/view/operation_page.dart index 1624bba88..a7a9dc890 100644 --- a/lib/dashboard/connection/operation/view/operation_page.dart +++ b/lib/dashboard/connection/operation/view/operation_page.dart @@ -231,7 +231,7 @@ class _OperationViewState extends State { child: Column( mainAxisSize: MainAxisSize.min, children: [ - MyGradientButton( + MyElevatedButton( verticalSpacing: 15, borderRadius: Sizes.normalRadius, text: l10n.send, diff --git a/lib/dashboard/connection/sign_payload/view/sign_payload_page.dart b/lib/dashboard/connection/sign_payload/view/sign_payload_page.dart index 5b523cae0..055da7851 100644 --- a/lib/dashboard/connection/sign_payload/view/sign_payload_page.dart +++ b/lib/dashboard/connection/sign_payload/view/sign_payload_page.dart @@ -209,7 +209,7 @@ class _SignPayloadViewState extends State { child: Column( mainAxisSize: MainAxisSize.min, children: [ - MyGradientButton( + MyElevatedButton( verticalSpacing: 15, borderRadius: Sizes.normalRadius, text: l10n.sign, diff --git a/lib/dashboard/crypto_account_switcher/crypto_bottom_sheet/view/crypto_bottom_sheet_view.dart b/lib/dashboard/crypto_account_switcher/crypto_bottom_sheet/view/crypto_bottom_sheet_view.dart index 2eeb75a88..e1b13b484 100644 --- a/lib/dashboard/crypto_account_switcher/crypto_bottom_sheet/view/crypto_bottom_sheet_view.dart +++ b/lib/dashboard/crypto_account_switcher/crypto_bottom_sheet/view/crypto_bottom_sheet_view.dart @@ -125,7 +125,7 @@ class _CryptoBottomSheetPageState extends State { const SizedBox(width: Sizes.spaceXSmall), Text( l10n.selectAccount, - style: Theme.of(context).textTheme.headlineMedium, + style: Theme.of(context).textTheme.titleMedium, ), ], ), diff --git a/lib/dashboard/crypto_account_switcher/crypto_bottom_sheet/widgets/crypto_accont_item.dart b/lib/dashboard/crypto_account_switcher/crypto_bottom_sheet/widgets/crypto_accont_item.dart index d038567f3..1b774c0ce 100644 --- a/lib/dashboard/crypto_account_switcher/crypto_bottom_sheet/widgets/crypto_accont_item.dart +++ b/lib/dashboard/crypto_account_switcher/crypto_bottom_sheet/widgets/crypto_accont_item.dart @@ -50,15 +50,13 @@ class CryptoAccountItem extends StatelessWidget { ), const SizedBox(width: Sizes.spaceXSmall), Flexible( - child: MyText( + child: Text( cryptoAccountData.name.trim().isEmpty ? l10n.unknown : cryptoAccountData.name, - maxLength: 30, maxLines: 1, - minFontSize: 14, overflow: TextOverflow.ellipsis, - style: Theme.of(context).textTheme.headlineSmall, + style: Theme.of(context).textTheme.titleMedium, ), ), const SizedBox(width: Sizes.spaceXSmall), @@ -79,9 +77,9 @@ class CryptoAccountItem extends StatelessWidget { child: Row( children: [ Expanded( - child: MyText( + child: Text( walletAddressExtracted, - style: Theme.of(context).textTheme.bodyMedium, + style: Theme.of(context).textTheme.bodySmall, ), ), const SizedBox(width: Sizes.spaceSmall), diff --git a/lib/dashboard/crypto_account_switcher/widgets/crypto_account_switcher_button.dart b/lib/dashboard/crypto_account_switcher/widgets/crypto_account_switcher_button.dart index ad1dd32bd..bd43d1be4 100644 --- a/lib/dashboard/crypto_account_switcher/widgets/crypto_account_switcher_button.dart +++ b/lib/dashboard/crypto_account_switcher/widgets/crypto_account_switcher_button.dart @@ -61,9 +61,15 @@ class CryptoAccountSwitcherButton extends StatelessWidget { ), ), const SizedBox(width: 5), - Image.asset( - IconStrings.arrowSquareDown, - width: Sizes.icon, + ColorFiltered( + colorFilter: ColorFilter.mode( + Theme.of(context).colorScheme.onSurface, + BlendMode.srcIn, + ), + child: Image.asset( + IconStrings.arrowSquareDown, + width: Sizes.icon, + ), ), ], ), diff --git a/lib/dashboard/discover/view/discover_details_page.dart b/lib/dashboard/discover/view/discover_details_page.dart index 2604e7463..61d42ff60 100644 --- a/lib/dashboard/discover/view/discover_details_page.dart +++ b/lib/dashboard/discover/view/discover_details_page.dart @@ -90,7 +90,7 @@ class DiscoverDetailsView extends StatelessWidget { padding: const EdgeInsets.all( Sizes.spaceSmall, ), - child: MyGradientButton( + child: MyElevatedButton( onPressed: onCallBack, text: buttonText, ), diff --git a/lib/dashboard/discover/widgets/discover_credential_category_item.dart b/lib/dashboard/discover/widgets/discover_credential_category_item.dart index 12647a354..eabe72254 100644 --- a/lib/dashboard/discover/widgets/discover_credential_category_item.dart +++ b/lib/dashboard/discover/widgets/discover_credential_category_item.dart @@ -39,16 +39,18 @@ class DiscoverCredentialCategoryItem extends StatelessWidget { padding: const EdgeInsets.symmetric(horizontal: 4, vertical: 0), child: Text( credentialCategoryConfig.discoverTitle, - style: Theme.of(context).textTheme.headlineSmall, + style: Theme.of(context).textTheme.titleMedium!.copyWith( + fontWeight: FontWeight.bold, + ), ), - ), + ), Padding( padding: const EdgeInsets.symmetric(horizontal: 4, vertical: 0), child: Text( credentialCategoryConfig.discoverSubTitle, maxLines: 3, - style: Theme.of(context).textTheme.titleMedium!.copyWith( - color: Theme.of(context).colorScheme.secondary, + style: Theme.of(context).textTheme.bodyMedium!.copyWith( + fontWeight: FontWeight.w100, ), ), ), diff --git a/lib/dashboard/discover/widgets/discover_dynamic_detail.dart b/lib/dashboard/discover/widgets/discover_dynamic_detail.dart index 8a3bb5ea7..13e6d04ad 100644 --- a/lib/dashboard/discover/widgets/discover_dynamic_detail.dart +++ b/lib/dashboard/discover/widgets/discover_dynamic_detail.dart @@ -22,7 +22,9 @@ class DiscoverDynamicDetial extends StatelessWidget { Widget build(BuildContext context) { final textTheme = Theme.of(context).textTheme; - final titleTheme = textTheme.titleLarge!; + final titleTheme = textTheme.bodyMedium!.copyWith( + fontWeight: FontWeight.bold, + ); final valueTheme = textTheme.bodyMedium!; return Padding( diff --git a/lib/dashboard/drawer/import_talao_community_card/view/import_talao_community_card_page.dart b/lib/dashboard/drawer/import_talao_community_card/view/import_talao_community_card_page.dart index a58655d9a..6f3f2799d 100644 --- a/lib/dashboard/drawer/import_talao_community_card/view/import_talao_community_card_page.dart +++ b/lib/dashboard/drawer/import_talao_community_card/view/import_talao_community_card_page.dart @@ -158,7 +158,7 @@ class _ImportTalaoCommunityCardViewState navigation: SafeArea( child: Padding( padding: const EdgeInsets.all(Sizes.spaceSmall), - child: MyGradientButton( + child: MyElevatedButton( onPressed: !state.isPrivateKeyValid ? null : () async {}, text: l10n.import, ), diff --git a/lib/dashboard/drawer/reset_wallet/view/reset_wallet_menu.dart b/lib/dashboard/drawer/reset_wallet/view/reset_wallet_menu.dart index dace17438..7738590e6 100644 --- a/lib/dashboard/drawer/reset_wallet/view/reset_wallet_menu.dart +++ b/lib/dashboard/drawer/reset_wallet/view/reset_wallet_menu.dart @@ -70,7 +70,6 @@ class ResetWalletView extends StatelessWidget { CheckboxItem( value: state.isRecoveryPhraseWritten, text: l10n.resetWalletCheckBox1, - textStyle: Theme.of(context).textTheme.titleLarge, onChange: (_) { context .read() @@ -83,7 +82,6 @@ class ResetWalletView extends StatelessWidget { CheckboxItem( value: state.isBackupCredentialSaved, text: l10n.resetWalletCheckBox2, - textStyle: Theme.of(context).textTheme.titleLarge, onChange: (_) { context .read() diff --git a/lib/dashboard/drawer/src/widgets/drawer_category_item.dart b/lib/dashboard/drawer/src/widgets/drawer_category_item.dart index 7a05a8d6a..b2394b7da 100644 --- a/lib/dashboard/drawer/src/widgets/drawer_category_item.dart +++ b/lib/dashboard/drawer/src/widgets/drawer_category_item.dart @@ -39,13 +39,16 @@ class DrawerCategoryItem extends StatelessWidget { children: [ Text( title, - style: Theme.of(context).textTheme.titleLarge, + style: Theme.of(context) + .textTheme + .titleMedium! + .copyWith(fontWeight: FontWeight.bold), ), if (subTitle != null) ...[ const SizedBox(height: Sizes.space2XSmall), Text( subTitle!, - style: Theme.of(context).textTheme.titleMedium, + style: Theme.of(context).textTheme.bodyMedium, ), ], ], diff --git a/lib/dashboard/drawer/ssi/backup/backup_credential/view/backup_credential_page.dart b/lib/dashboard/drawer/ssi/backup/backup_credential/view/backup_credential_page.dart index fb100333c..762e49d88 100644 --- a/lib/dashboard/drawer/ssi/backup/backup_credential/view/backup_credential_page.dart +++ b/lib/dashboard/drawer/ssi/backup/backup_credential/view/backup_credential_page.dart @@ -116,7 +116,7 @@ class BackupCredentialView extends StatelessWidget { ), navigation: Padding( padding: const EdgeInsets.all(Sizes.spaceSmall), - child: MyGradientButton( + child: MyElevatedButton( onPressed: () async { await context .read() diff --git a/lib/dashboard/drawer/ssi/backup/backup_mnemonic/view/backup_mnemonic_page.dart b/lib/dashboard/drawer/ssi/backup/backup_mnemonic/view/backup_mnemonic_page.dart index 5669c29a8..601079ff4 100644 --- a/lib/dashboard/drawer/ssi/backup/backup_mnemonic/view/backup_mnemonic_page.dart +++ b/lib/dashboard/drawer/ssi/backup/backup_mnemonic/view/backup_mnemonic_page.dart @@ -97,7 +97,7 @@ class BackupMnemonicView extends StatelessWidget { ), navigation: Padding( padding: const EdgeInsets.all(Sizes.spaceSmall), - child: MyGradientButton( + child: MyElevatedButton( onPressed: isValidCallback.call, text: l10n.next, ), diff --git a/lib/dashboard/drawer/ssi/backup/backup_polygon_identity/view/backup_polygon_identity_page.dart b/lib/dashboard/drawer/ssi/backup/backup_polygon_identity/view/backup_polygon_identity_page.dart index 5eac0222d..92a9d2217 100644 --- a/lib/dashboard/drawer/ssi/backup/backup_polygon_identity/view/backup_polygon_identity_page.dart +++ b/lib/dashboard/drawer/ssi/backup/backup_polygon_identity/view/backup_polygon_identity_page.dart @@ -118,7 +118,7 @@ class BackupPolygonIdIdentityView extends StatelessWidget { ), navigation: Padding( padding: const EdgeInsets.all(Sizes.spaceSmall), - child: MyGradientButton( + child: MyElevatedButton( onPressed: () async { await context .read() diff --git a/lib/dashboard/drawer/ssi/restore/restore_credential/view/restore_credential_page.dart b/lib/dashboard/drawer/ssi/restore/restore_credential/view/restore_credential_page.dart index 57c306ff1..5d63d03f4 100644 --- a/lib/dashboard/drawer/ssi/restore/restore_credential/view/restore_credential_page.dart +++ b/lib/dashboard/drawer/ssi/restore/restore_credential/view/restore_credential_page.dart @@ -142,7 +142,7 @@ class _RestoreCredentialViewState extends State { padding: const EdgeInsets.all(Sizes.spaceSmall), child: BlocBuilder( builder: (context, state) { - return MyGradientButton( + return MyElevatedButton( onPressed: state.backupFilePath == null ? null : () => context.read().recoverWallet( diff --git a/lib/dashboard/drawer/ssi/restore/restore_credential/view/restore_polygonid_credential_page.dart b/lib/dashboard/drawer/ssi/restore/restore_credential/view/restore_polygonid_credential_page.dart index 449c2e9da..e3d687bb7 100644 --- a/lib/dashboard/drawer/ssi/restore/restore_credential/view/restore_polygonid_credential_page.dart +++ b/lib/dashboard/drawer/ssi/restore/restore_credential/view/restore_polygonid_credential_page.dart @@ -143,7 +143,7 @@ class _RestorePolygonIdCredentialViewState padding: const EdgeInsets.all(Sizes.spaceSmall), child: BlocBuilder( builder: (context, state) { - return MyGradientButton( + return MyElevatedButton( onPressed: state.backupFilePath == null ? null : () => context.read().recoverWallet( diff --git a/lib/dashboard/drawer/ssi/restore/restore_credential_mnemonics/view/restore_credential_mnemonic_page.dart b/lib/dashboard/drawer/ssi/restore/restore_credential_mnemonics/view/restore_credential_mnemonic_page.dart index 6569e3a6e..0225c97d8 100644 --- a/lib/dashboard/drawer/ssi/restore/restore_credential_mnemonics/view/restore_credential_mnemonic_page.dart +++ b/lib/dashboard/drawer/ssi/restore/restore_credential_mnemonics/view/restore_credential_mnemonic_page.dart @@ -139,7 +139,7 @@ class _RestoreCredentialMnemonicViewState child: BlocBuilder( builder: (context, state) { - return MyGradientButton( + return MyElevatedButton( onPressed: !state.isMnemonicValid ? null : () async { diff --git a/lib/dashboard/drawer/wallet_security/recovery_key/view/key_verified_page.dart b/lib/dashboard/drawer/wallet_security/recovery_key/view/key_verified_page.dart index a105eff5b..839ac7b5d 100644 --- a/lib/dashboard/drawer/wallet_security/recovery_key/view/key_verified_page.dart +++ b/lib/dashboard/drawer/wallet_security/recovery_key/view/key_verified_page.dart @@ -66,7 +66,7 @@ class KeyVerifiedView extends StatelessWidget { horizontal: Sizes.spaceSmall, vertical: Sizes.space2XSmall, ), - child: MyGradientButton( + child: MyElevatedButton( text: l10n.letsGo, verticalSpacing: 18, onPressed: () { diff --git a/lib/dashboard/drawer/wallet_security/recovery_key/view/recovery_key_page.dart b/lib/dashboard/drawer/wallet_security/recovery_key/view/recovery_key_page.dart index 58a1e03e6..8469c574f 100644 --- a/lib/dashboard/drawer/wallet_security/recovery_key/view/recovery_key_page.dart +++ b/lib/dashboard/drawer/wallet_security/recovery_key/view/recovery_key_page.dart @@ -139,7 +139,7 @@ class _RecoveryKeyViewState extends State horizontal: Sizes.spaceSmall, vertical: Sizes.spaceSmall, ), - child: MyGradientButton( + child: MyElevatedButton( text: l10n.verifyNow, verticalSpacing: 18, onPressed: () async { diff --git a/lib/dashboard/home/home/widgets/qr_icon.dart b/lib/dashboard/home/home/widgets/qr_icon.dart index ff1c7589f..a9ddc1adb 100644 --- a/lib/dashboard/home/home/widgets/qr_icon.dart +++ b/lib/dashboard/home/home/widgets/qr_icon.dart @@ -67,7 +67,7 @@ class QRIcon extends StatelessWidget { height: 60, width: 60, decoration: BoxDecoration( - color: Theme.of(context).colorScheme.primary, + color: Theme.of(context).colorScheme.primaryFixedDim, borderRadius: BorderRadius.circular(50), ), ), @@ -76,7 +76,7 @@ class QRIcon extends StatelessWidget { width: 40, child: ImageIcon( const AssetImage(IconStrings.scan), - color: Theme.of(context).colorScheme.onPrimary, + color: Theme.of(context).colorScheme.onPrimaryFixedVariant, ), ), ], diff --git a/lib/dashboard/home/tab_bar/credentials/detail/view/credentials_details_page.dart b/lib/dashboard/home/tab_bar/credentials/detail/view/credentials_details_page.dart index 8777b6a4d..aaaabc18e 100644 --- a/lib/dashboard/home/tab_bar/credentials/detail/view/credentials_details_page.dart +++ b/lib/dashboard/home/tab_bar/credentials/detail/view/credentials_details_page.dart @@ -283,7 +283,7 @@ class _CredentialsDetailsViewState extends State { height: 0, color: Theme.of(context) .colorScheme - .surfaceContainer, + .surfaceContainerHigh, ), ], ), diff --git a/lib/dashboard/home/tab_bar/credentials/list/widgets/credential_detail_tab_bar.dart b/lib/dashboard/home/tab_bar/credentials/list/widgets/credential_detail_tab_bar.dart index ea565e492..22c1a5d97 100644 --- a/lib/dashboard/home/tab_bar/credentials/list/widgets/credential_detail_tab_bar.dart +++ b/lib/dashboard/home/tab_bar/credentials/list/widgets/credential_detail_tab_bar.dart @@ -39,8 +39,7 @@ class CredentialDetailTabbar extends StatelessWidget { ), decoration: isSelected ? BoxDecoration( - color: - Theme.of(context).colorScheme.surface.withOpacity(0.07), + color: Theme.of(context).colorScheme.surfaceContainerHigh, borderRadius: const BorderRadius.only( topLeft: Radius.circular(Sizes.smallRadius), topRight: Radius.circular(Sizes.smallRadius), @@ -53,7 +52,7 @@ class CredentialDetailTabbar extends StatelessWidget { style: isSelected ? textTheme.bodyMedium!.copyWith(fontWeight: FontWeight.bold) : textTheme.bodyMedium! - .copyWith(color: colorScheme.secondaryContainer), + .copyWith(color: colorScheme.onSurface), ), ), ), diff --git a/lib/dashboard/home/tab_bar/credentials/list/widgets/home_credential_category_item.dart b/lib/dashboard/home/tab_bar/credentials/list/widgets/home_credential_category_item.dart index a05c909f4..6fc517883 100644 --- a/lib/dashboard/home/tab_bar/credentials/list/widgets/home_credential_category_item.dart +++ b/lib/dashboard/home/tab_bar/credentials/list/widgets/home_credential_category_item.dart @@ -41,7 +41,9 @@ class HomeCredentialCategoryItem extends StatelessWidget { padding: const EdgeInsets.symmetric(horizontal: 4, vertical: 0), child: Text( credentialCategoryConfig.homeTitle, - style: Theme.of(context).textTheme.headlineSmall, + style: Theme.of(context).textTheme.titleMedium!.copyWith( + fontWeight: FontWeight.bold, + ), ), ), Padding( @@ -49,8 +51,8 @@ class HomeCredentialCategoryItem extends StatelessWidget { child: Text( credentialCategoryConfig.homeSubTitle, maxLines: 3, - style: Theme.of(context).textTheme.titleMedium!.copyWith( - color: Theme.of(context).colorScheme.secondaryContainer, + style: Theme.of(context).textTheme.bodyMedium!.copyWith( + fontWeight: FontWeight.w100, ), ), ), diff --git a/lib/dashboard/home/tab_bar/credentials/oid4c4vc_pick/oid4c4vc_credential_pick/view/oid4c4vc_credential_pick_page.dart b/lib/dashboard/home/tab_bar/credentials/oid4c4vc_pick/oid4c4vc_credential_pick/view/oid4c4vc_credential_pick_page.dart index bc0145e0e..033ae203e 100644 --- a/lib/dashboard/home/tab_bar/credentials/oid4c4vc_pick/oid4c4vc_credential_pick/view/oid4c4vc_credential_pick_page.dart +++ b/lib/dashboard/home/tab_bar/credentials/oid4c4vc_pick/oid4c4vc_credential_pick/view/oid4c4vc_credential_pick_page.dart @@ -167,7 +167,7 @@ class Oidc4vcCredentialPickView extends StatelessWidget { ? Icons.check_box : Icons.check_box_outline_blank, size: 25, - color: Theme.of(context).colorScheme.onPrimary, + color: Theme.of(context).colorScheme.onSurface, ), ), ), @@ -181,7 +181,7 @@ class Oidc4vcCredentialPickView extends StatelessWidget { navigation: SafeArea( child: Container( padding: const EdgeInsets.all(16), - child: MyGradientButton( + child: MyElevatedButton( onPressed: state.isEmpty ? null : () async { diff --git a/lib/dashboard/home/tab_bar/credentials/polygon_id/polygon_id_credential_offer/view/polygon_id_credential_offer_view.dart b/lib/dashboard/home/tab_bar/credentials/polygon_id/polygon_id_credential_offer/view/polygon_id_credential_offer_view.dart index 8ead3e943..c67074da1 100644 --- a/lib/dashboard/home/tab_bar/credentials/polygon_id/polygon_id_credential_offer/view/polygon_id_credential_offer_view.dart +++ b/lib/dashboard/home/tab_bar/credentials/polygon_id/polygon_id_credential_offer/view/polygon_id_credential_offer_view.dart @@ -139,7 +139,7 @@ class PolygonIdCredentialOfferPage extends StatelessWidget { child: Column( mainAxisSize: MainAxisSize.min, children: [ - MyGradientButton( + MyElevatedButton( text: l10n.accept, onPressed: () async { await securityCheck( diff --git a/lib/dashboard/home/tab_bar/credentials/polygon_id/polygon_id_verification/view/polygon_id_verification_view.dart b/lib/dashboard/home/tab_bar/credentials/polygon_id/polygon_id_verification/view/polygon_id_verification_view.dart index 009b2f1aa..7a5653fa3 100644 --- a/lib/dashboard/home/tab_bar/credentials/polygon_id/polygon_id_verification/view/polygon_id_verification_view.dart +++ b/lib/dashboard/home/tab_bar/credentials/polygon_id/polygon_id_verification/view/polygon_id_verification_view.dart @@ -271,7 +271,7 @@ class _PolygonIdVerificationViewState extends State { child: Column( mainAxisSize: MainAxisSize.min, children: [ - MyGradientButton( + MyElevatedButton( text: l10n.approve, onPressed: state.canGenerateProof ? () async { diff --git a/lib/dashboard/home/tab_bar/credentials/present/pick/credential_manifest/view/credential_manifest_credential_offer_pick_page.dart b/lib/dashboard/home/tab_bar/credentials/present/pick/credential_manifest/view/credential_manifest_credential_offer_pick_page.dart index 3e7c41547..5f3f349cd 100644 --- a/lib/dashboard/home/tab_bar/credentials/present/pick/credential_manifest/view/credential_manifest_credential_offer_pick_page.dart +++ b/lib/dashboard/home/tab_bar/credentials/present/pick/credential_manifest/view/credential_manifest_credential_offer_pick_page.dart @@ -196,7 +196,7 @@ class CredentialManifestOfferPickView extends StatelessWidget { child: Container( padding: const EdgeInsets.all(16), child: isVcSdJWT - ? MyGradientButton( + ? MyElevatedButton( onPressed: !credentialManifestState .isButtonEnabled ? null @@ -246,7 +246,7 @@ class CredentialManifestOfferPickView extends StatelessWidget { .inputDescriptors.length; if (isOptional) { - return MyGradientButton( + return MyElevatedButton( onPressed: () => present( context: context, credentialManifestState: @@ -264,7 +264,7 @@ class CredentialManifestOfferPickView extends StatelessWidget { : l10n.credentialPickPresent, ); } else { - return MyGradientButton( + return MyElevatedButton( onPressed: !credentialManifestState .isButtonEnabled ? null diff --git a/lib/dashboard/home/tab_bar/credentials/present/pick/credential_manifest/widgets/required_credential_not_found.dart b/lib/dashboard/home/tab_bar/credentials/present/pick/credential_manifest/widgets/required_credential_not_found.dart index e9fb8fef3..5d12fe2f7 100644 --- a/lib/dashboard/home/tab_bar/credentials/present/pick/credential_manifest/widgets/required_credential_not_found.dart +++ b/lib/dashboard/home/tab_bar/credentials/present/pick/credential_manifest/widgets/required_credential_not_found.dart @@ -63,7 +63,7 @@ class RequiredCredentialNotFound extends StatelessWidget { ), navigation: Padding( padding: const EdgeInsets.all(Sizes.spaceXSmall), - child: MyGradientButton( + child: MyElevatedButton( text: l10n.backToHome, onPressed: () { Navigator.popUntil( diff --git a/lib/dashboard/home/tab_bar/credentials/present/pick/query_by_example/view/query_by_example_credentials_pick_page.dart b/lib/dashboard/home/tab_bar/credentials/present/pick/query_by_example/view/query_by_example_credentials_pick_page.dart index 6bc2111af..cfb13b79f 100644 --- a/lib/dashboard/home/tab_bar/credentials/present/pick/query_by_example/view/query_by_example_credentials_pick_page.dart +++ b/lib/dashboard/home/tab_bar/credentials/present/pick/query_by_example/view/query_by_example_credentials_pick_page.dart @@ -136,7 +136,7 @@ class QueryByExampleCredentialPickView extends StatelessWidget { message: l10n.credentialPickPresent, child: Builder( builder: (context) { - return MyGradientButton( + return MyElevatedButton( onPressed: queryState.selected == null ? null : () async { diff --git a/lib/dashboard/home/tab_bar/credentials/present/pick/selective_disclosure/view/selective_disclosure_pick_page.dart b/lib/dashboard/home/tab_bar/credentials/present/pick/selective_disclosure/view/selective_disclosure_pick_page.dart index 1a781e08e..c45b789e0 100644 --- a/lib/dashboard/home/tab_bar/credentials/present/pick/selective_disclosure/view/selective_disclosure_pick_page.dart +++ b/lib/dashboard/home/tab_bar/credentials/present/pick/selective_disclosure/view/selective_disclosure_pick_page.dart @@ -165,7 +165,7 @@ class _SelectiveDisclosurePickViewState child: BlocBuilder( builder: (context, state) { - return MyGradientButton( + return MyElevatedButton( onPressed: () => present( context: context, selectedSDIndexInJWT: state.selectedSDIndexInJWT, diff --git a/lib/dashboard/home/tab_bar/credentials/present/query_by_example_present/view/query_by_example_present_page.dart b/lib/dashboard/home/tab_bar/credentials/present/query_by_example_present/view/query_by_example_present_page.dart index 5d1b902a5..1bbadeae5 100644 --- a/lib/dashboard/home/tab_bar/credentials/present/query_by_example_present/view/query_by_example_present_page.dart +++ b/lib/dashboard/home/tab_bar/credentials/present/query_by_example_present/view/query_by_example_present_page.dart @@ -67,7 +67,7 @@ class _QueryByExamplePresentPageState extends State { // CredentialModel( // id: '', image: '', data: {'issuer': ''}))), const SizedBox(height: 24), - MyGradientButton( + MyElevatedButton( onPressed: () { Navigator.of(context).pushReplacement( QueryByExampleCredentialPickPage.route( diff --git a/lib/dashboard/home/tab_bar/credentials/receive/view/credentials_receive_page.dart b/lib/dashboard/home/tab_bar/credentials/receive/view/credentials_receive_page.dart index 93ca292c4..86dc3018f 100644 --- a/lib/dashboard/home/tab_bar/credentials/receive/view/credentials_receive_page.dart +++ b/lib/dashboard/home/tab_bar/credentials/receive/view/credentials_receive_page.dart @@ -126,7 +126,7 @@ class _CredentialsReceivePageState extends State { child: Column( mainAxisSize: MainAxisSize.min, children: [ - MyGradientButton( + MyElevatedButton( text: l10n.credentialAddThisCard, onPressed: () { if (credentialModel diff --git a/lib/dashboard/home/tab_bar/credentials/widgets/credential_widget/add_credential_button.dart b/lib/dashboard/home/tab_bar/credentials/widgets/credential_widget/add_credential_button.dart index 9cd6c4cd3..9930b53a5 100644 --- a/lib/dashboard/home/tab_bar/credentials/widgets/credential_widget/add_credential_button.dart +++ b/lib/dashboard/home/tab_bar/credentials/widgets/credential_widget/add_credential_button.dart @@ -37,7 +37,9 @@ class AddCredentialButton extends StatelessWidget { ), Text( l10n.addCards, - style: Theme.of(context).textTheme.headlineSmall, + style: Theme.of(context).textTheme.titleLarge!.copyWith( + color: Theme.of(context).colorScheme.onSurface, + ), ), ], ), diff --git a/lib/dashboard/home/tab_bar/credentials/widgets/display_description_widget_with_title.dart b/lib/dashboard/home/tab_bar/credentials/widgets/display_description_widget_with_title.dart index ae2b15b28..d5fca30c4 100644 --- a/lib/dashboard/home/tab_bar/credentials/widgets/display_description_widget_with_title.dart +++ b/lib/dashboard/home/tab_bar/credentials/widgets/display_description_widget_with_title.dart @@ -25,9 +25,7 @@ class DisplayDescriptionWidgetWithTitle extends StatelessWidget { final textTheme = Theme.of(context).textTheme; final titleTheme = titleColor == null - ? textTheme.bodyMedium!.copyWith( - color: Theme.of(context).colorScheme.secondaryContainer, - ) + ? textTheme.bodyMedium! : textTheme.bodyMedium!.copyWith(color: titleColor); final valueTheme = valueColor == null ? Theme.of(context).textTheme.bodyMedium diff --git a/lib/dashboard/home/tab_bar/credentials/widgets/list_item.dart b/lib/dashboard/home/tab_bar/credentials/widgets/list_item.dart index 21eaa4a6b..8f1dd40af 100644 --- a/lib/dashboard/home/tab_bar/credentials/widgets/list_item.dart +++ b/lib/dashboard/home/tab_bar/credentials/widgets/list_item.dart @@ -143,7 +143,7 @@ class DisplaySelectionElement extends StatelessWidget { child: Icon( selected! ? Icons.check_box : Icons.check_box_outline_blank, size: 25, - color: Theme.of(context).colorScheme.onPrimary, + color: Theme.of(context).colorScheme.onSurface, ), ), ), diff --git a/lib/dashboard/home/tab_bar/nft/view/nft_details_page.dart b/lib/dashboard/home/tab_bar/nft/view/nft_details_page.dart index 836b03211..1a9e6939f 100644 --- a/lib/dashboard/home/tab_bar/nft/view/nft_details_page.dart +++ b/lib/dashboard/home/tab_bar/nft/view/nft_details_page.dart @@ -402,7 +402,7 @@ class SendButton extends StatelessWidget { return SafeArea( child: Padding( padding: const EdgeInsets.all(Sizes.spaceSmall), - child: MyGradientButton( + child: MyElevatedButton( text: l10n.send, onPressed: () { Navigator.of(context).push( @@ -437,7 +437,7 @@ class BurnButton extends StatelessWidget { return SafeArea( child: Padding( padding: const EdgeInsets.all(Sizes.spaceSmall), - child: MyGradientButton( + child: MyElevatedButton( text: l10n.burn, onPressed: () async { final confirmed = await showDialog( diff --git a/lib/dashboard/home/tab_bar/tab_controller/widgets/tab_bar.dart b/lib/dashboard/home/tab_bar/tab_controller/widgets/tab_bar.dart index 6ff2f7e73..94630a8a8 100644 --- a/lib/dashboard/home/tab_bar/tab_controller/widgets/tab_bar.dart +++ b/lib/dashboard/home/tab_bar/tab_controller/widgets/tab_bar.dart @@ -29,20 +29,9 @@ class MyTab extends StatelessWidget { ), decoration: BoxDecoration( borderRadius: BorderRadius.circular(Sizes.normalRadius), - gradient: isSelected - ? LinearGradient( - colors: [ - Theme.of(context).colorScheme.primary, - Theme.of(context).colorScheme.tertiary, - ], - begin: Alignment.bottomLeft, - end: Alignment.topRight, - stops: const [0.3, 1.0], - ) - : null, color: isSelected - ? null - : Theme.of(context).colorScheme.onPrimaryContainer, + ? Theme.of(context).colorScheme.primaryFixedDim + : Theme.of(context).colorScheme.primaryContainer, ), child: Row( mainAxisAlignment: MainAxisAlignment.center, @@ -51,7 +40,7 @@ class MyTab extends StatelessWidget { if (isSelected) ColorFiltered( colorFilter: ColorFilter.mode( - Theme.of(context).colorScheme.primary, + Theme.of(context).colorScheme.primaryFixedDim, BlendMode.color, ), child: Image.asset(icon, height: Sizes.icon), @@ -64,8 +53,10 @@ class MyTab extends StatelessWidget { Text( text, maxLines: 1, - style: Theme.of(context).textTheme.headlineSmall!.copyWith( - color: isSelected ? null : Colors.grey[400], + style: Theme.of(context).textTheme.titleLarge!.copyWith( + color: isSelected + ? Theme.of(context).colorScheme.onPrimaryFixedVariant + : Theme.of(context).colorScheme.onPrimaryContainer, ), overflow: TextOverflow.fade, ), diff --git a/lib/dashboard/home/tab_bar/tokens/send_receive_home/view/send_receive_home_page.dart b/lib/dashboard/home/tab_bar/tokens/send_receive_home/view/send_receive_home_page.dart index 24d6eca1c..6a1fc10d8 100644 --- a/lib/dashboard/home/tab_bar/tokens/send_receive_home/view/send_receive_home_page.dart +++ b/lib/dashboard/home/tab_bar/tokens/send_receive_home/view/send_receive_home_page.dart @@ -188,8 +188,7 @@ class _SendReceiveHomePageView extends StatelessWidget { mainAxisSize: MainAxisSize.max, children: [ Flexible( - child: MyGradientButton( - upperCase: false, + child: MyElevatedButton( text: l10n.send, verticalSpacing: 0, fontSize: 16, @@ -211,8 +210,7 @@ class _SendReceiveHomePageView extends StatelessWidget { width: Sizes.spaceNormal, ), Flexible( - child: MyGradientButton( - upperCase: false, + child: MyElevatedButton( text: l10n.receive, verticalSpacing: 0, fontSize: 16, diff --git a/lib/dashboard/missing_creentials/view/missing_credentials_page.dart b/lib/dashboard/missing_creentials/view/missing_credentials_page.dart index c9a7f1c0c..4057a334a 100644 --- a/lib/dashboard/missing_creentials/view/missing_credentials_page.dart +++ b/lib/dashboard/missing_creentials/view/missing_credentials_page.dart @@ -115,7 +115,7 @@ class MissingCredentialsView extends StatelessWidget { ), ), const SizedBox(height: 10), - MyGradientButton( + MyElevatedButton( onPressed: () async { for (final credentials in state.dummyCredentials) { await Navigator.push( diff --git a/lib/dashboard/src/widgets/bottom_bar_item.dart b/lib/dashboard/src/widgets/bottom_bar_item.dart index 3c82738fa..80b5ac21f 100644 --- a/lib/dashboard/src/widgets/bottom_bar_item.dart +++ b/lib/dashboard/src/widgets/bottom_bar_item.dart @@ -38,9 +38,7 @@ class BottomBarItem extends StatelessWidget { margin: const EdgeInsets.only(bottom: 5), child: ImageIcon( AssetImage(icon), - color: isSelected - ? Theme.of(context).colorScheme.primary - : Theme.of(context).colorScheme.onPrimaryContainer, + color: bottomBarItemColor(context), size: 20, ), ), @@ -52,9 +50,7 @@ class BottomBarItem extends StatelessWidget { style: Theme.of(context).textTheme.bodySmall!.copyWith( fontWeight: isSelected ? FontWeight.bold : FontWeight.normal, - color: isSelected - ? Theme.of(context).colorScheme.primary - : Theme.of(context).colorScheme.onPrimaryContainer, + color: bottomBarItemColor(context), ), ), ], @@ -62,4 +58,19 @@ class BottomBarItem extends StatelessWidget { ), ); } + + Color bottomBarItemColor(BuildContext context) { + final Color one = Theme.of(context).colorScheme.onPrimaryFixedVariant; + final Color two = Theme.of(context).colorScheme.primaryFixedDim; + late Color selectedColor; + late Color unselectedColor; + if (Theme.of(context).brightness == Brightness.light) { + selectedColor = one; + unselectedColor = two; + } else { + selectedColor = two; + unselectedColor = one; + } + return isSelected ? selectedColor : unselectedColor; + } } diff --git a/lib/import_wallet/view/import_from_wallet_page.dart b/lib/import_wallet/view/import_from_wallet_page.dart index fc16f47cb..87f249705 100644 --- a/lib/import_wallet/view/import_from_wallet_page.dart +++ b/lib/import_wallet/view/import_from_wallet_page.dart @@ -235,7 +235,7 @@ class _ImportFromOtherWalletViewState extends State { navigation: SafeArea( child: Padding( padding: const EdgeInsets.all(Sizes.spaceSmall), - child: MyGradientButton( + child: MyElevatedButton( text: l10n.import, onPressed: !state.isMnemonicOrKeyValid ? null diff --git a/lib/import_wallet/view/import_wallet_page.dart b/lib/import_wallet/view/import_wallet_page.dart index f67deda18..93480fbee 100644 --- a/lib/import_wallet/view/import_wallet_page.dart +++ b/lib/import_wallet/view/import_wallet_page.dart @@ -254,7 +254,7 @@ class _ImportWalletViewState extends State { ? SafeArea( child: Padding( padding: const EdgeInsets.all(Sizes.spaceSmall), - child: MyGradientButton( + child: MyElevatedButton( text: l10n.import, onPressed: !state.isMnemonicOrKeyValid ? null diff --git a/lib/l10n/arb/app_en.arb b/lib/l10n/arb/app_en.arb index b1ae1f5ac..c329ee331 100644 --- a/lib/l10n/arb/app_en.arb +++ b/lib/l10n/arb/app_en.arb @@ -299,16 +299,16 @@ "save": "Save", "delete": "Delete", "enterNewPinCode": "Create a PIN Code\nto protect your wallet", - "confirmYourPinCode": "Confirm your pin code", + "confirmYourPinCode": "Confirm your PIN Code", "walletAltme": "Wallet Altme", "createTitle": "Create or import a wallet", "createSubtitle": "Would you like to create a new wallet or import an existing one?", - "enterYourPinCode": "Enter your pin code", + "enterYourPinCode": "Enter your PIN Code", "changePinCode": "Change PIN Code", "tryAgain": "Try again", "credentialSelectionListEmptyError": "You do not have the requested credential to pursue.", "trustedIssuer": "This issuer is approved by EBSI.", - "yourPinCodeChangedSuccessfully": "Your pin code changed successfully", + "yourPinCodeChangedSuccessfully": "Your PIN Code changed successfully", "advantagesCards": "Advantages cards", "advantagesDiscoverCards": "Unlock exclusive rewards", "identityCards": "Identity cards", @@ -329,7 +329,7 @@ "drawerTalaoCommunityCardTextBoxMessage": "Once you have entered your private key, tap Import.\nPlease, make sure to enter the ethereum private key which contains your Talao Token.", "drawerTalaoCommunityCardSubtitle2": "Our Wallet is self-custodial. We never have access to your private keys or funds.", "drawerTalaoCommunityCardKeyError": "Please enter a valid private key", - "loginWithBiometricsMessage": "Quickly unlock your wallet without having to enter password or pin cod", + "loginWithBiometricsMessage": "Quickly unlock your wallet without having to enter password or PIN Code", "manage": "Manage", "wallet": "Wallet", "manageAccounts": "Manage blockchain accounts", @@ -934,7 +934,7 @@ "lowSecurity": "Low Security", "highSecurity": "High Security", "theRequestIsRejected": "The request is rejected.", - "userPinIsIncorrect": "User pin is incorrect", + "userPinIsIncorrect": "User PIN is incorrect", "security_level": "Security Level", "oidc4vc_settings": "OIDC4VC Settings", "userPinTitle": "User PIN Digits pre-authorized_code Flow", diff --git a/lib/onboarding/gen_phrase/view/onboarding_gen_phrase.dart b/lib/onboarding/gen_phrase/view/onboarding_gen_phrase.dart index 3506c4d38..34d1fe41c 100644 --- a/lib/onboarding/gen_phrase/view/onboarding_gen_phrase.dart +++ b/lib/onboarding/gen_phrase/view/onboarding_gen_phrase.dart @@ -137,10 +137,7 @@ class _OnBoardingGenPhraseViewState extends State { Text( l10n.onboardingAltmeMessage, textAlign: TextAlign.center, - style: - Theme.of(context).textTheme.headlineSmall!.copyWith( - color: Theme.of(context).colorScheme.tertiary, - ), + style: Theme.of(context).textTheme.headlineSmall, ), ], ), @@ -157,11 +154,9 @@ class _OnBoardingGenPhraseViewState extends State { child: Column( mainAxisSize: MainAxisSize.min, children: [ - MyElevatedButton( + MyOutlinedButton( text: l10n.verifyLater, verticalSpacing: 18, - backgroundColor: - Theme.of(context).colorScheme.primaryContainer, onPressed: () async { await context .read() @@ -172,7 +167,7 @@ class _OnBoardingGenPhraseViewState extends State { }, ), const SizedBox(height: 10), - MyGradientButton( + MyElevatedButton( text: l10n.verifyNow, verticalSpacing: 18, onPressed: () { diff --git a/lib/onboarding/starter/view/starter_page.dart b/lib/onboarding/starter/view/starter_page.dart index b60ec9c04..74843bfc4 100644 --- a/lib/onboarding/starter/view/starter_page.dart +++ b/lib/onboarding/starter/view/starter_page.dart @@ -71,7 +71,7 @@ class StarterView extends StatelessWidget { const Spacer(flex: 1), SubTitle(profileModel: state.model), const Spacer(flex: 4), - MyGradientButton( + MyElevatedButton( text: l10n.createAccount, verticalSpacing: 15, onPressed: () async { @@ -94,10 +94,6 @@ class StarterView extends StatelessWidget { const Spacer(flex: 1), MyOutlinedButton( text: l10n.importAccount, - textColor: Theme.of(context).colorScheme.secondary, - borderColor: - Theme.of(context).colorScheme.secondary, - backgroundColor: Colors.transparent, onPressed: () async { await profileCubit.setWalletType( walletType: WalletType.personal, diff --git a/lib/onboarding/tos/view/onboarding_tos_page.dart b/lib/onboarding/tos/view/onboarding_tos_page.dart index 0069f6493..4e6b3ef2a 100644 --- a/lib/onboarding/tos/view/onboarding_tos_page.dart +++ b/lib/onboarding/tos/view/onboarding_tos_page.dart @@ -111,7 +111,7 @@ class _OnBoardingTosViewState extends State { ), ), const SizedBox(height: 15), - MyGradientButton( + MyElevatedButton( text: l10n.start, onPressed: (state.agreeTerms && state.readTerms) ? () async => onAcceptancePressed(context) diff --git a/lib/onboarding/verify_phrase/view/onboarding_verify_phrase.dart b/lib/onboarding/verify_phrase/view/onboarding_verify_phrase.dart index 5841d50ef..44dbc3fcf 100644 --- a/lib/onboarding/verify_phrase/view/onboarding_verify_phrase.dart +++ b/lib/onboarding/verify_phrase/view/onboarding_verify_phrase.dart @@ -245,7 +245,7 @@ class _OnBoardingVerifyPhraseViewState horizontal: Sizes.spaceSmall, vertical: Sizes.spaceSmall, ), - child: MyGradientButton( + child: MyElevatedButton( text: l10n.onBoardingGenPhraseButton, verticalSpacing: 18, onPressed: state.isVerified diff --git a/lib/onboarding/wallet_ready/view/wallet_ready_page.dart b/lib/onboarding/wallet_ready/view/wallet_ready_page.dart index a95a72725..5f80f6768 100644 --- a/lib/onboarding/wallet_ready/view/wallet_ready_page.dart +++ b/lib/onboarding/wallet_ready/view/wallet_ready_page.dart @@ -107,13 +107,10 @@ class _WalletReadyViewState extends State { Text( l10n.walletReadySubtitle, textAlign: TextAlign.center, - style: Theme.of(context) - .textTheme - .headlineSmall - ?.copyWith( - fontWeight: FontWeight.normal, - color: Theme.of(context).colorScheme.onTertiary, - ), + style: + Theme.of(context).textTheme.headlineSmall?.copyWith( + fontWeight: FontWeight.normal, + ), ), const SizedBox( height: Sizes.space3XLarge, @@ -202,7 +199,7 @@ class _WalletReadyViewState extends State { horizontal: Sizes.spaceSmall, vertical: Sizes.space2XSmall, ), - child: MyGradientButton( + child: MyElevatedButton( text: l10n.start, verticalSpacing: 18, onPressed: state.isAgreeWithTerms diff --git a/lib/onboarding/widgets/protect_widget.dart b/lib/onboarding/widgets/protect_widget.dart index a8c0f0a1a..4b18179ea 100644 --- a/lib/onboarding/widgets/protect_widget.dart +++ b/lib/onboarding/widgets/protect_widget.dart @@ -31,7 +31,7 @@ class ProtectWidget extends StatelessWidget { decoration: BoxDecoration( color: isSelected ? Theme.of(context).colorScheme.primary - : Theme.of(context).colorScheme.surfaceBright, + : Theme.of(context).colorScheme.secondaryContainer, borderRadius: const BorderRadius.all( Radius.circular( Sizes.normalRadius, @@ -46,8 +46,16 @@ class ProtectWidget extends StatelessWidget { children: [ Padding( padding: const EdgeInsets.only(top: 5), - child: Image.asset( - image, + child: ColorFiltered( + colorFilter: ColorFilter.mode( + isSelected + ? Theme.of(context).colorScheme.onPrimary + : Theme.of(context).colorScheme.onSurface, + BlendMode.srcIn, + ), + child: Image.asset( + image, + ), ), ), const SizedBox(width: 15), @@ -57,11 +65,19 @@ class ProtectWidget extends StatelessWidget { children: [ Text( title, - style: Theme.of(context).textTheme.titleLarge, + style: isSelected + ? Theme.of(context).textTheme.titleLarge!.copyWith( + color: Theme.of(context).colorScheme.onPrimary, + ) + : Theme.of(context).textTheme.titleLarge, ), Text( subtitle, - style: Theme.of(context).textTheme.titleMedium, + style: isSelected + ? Theme.of(context).textTheme.titleMedium!.copyWith( + color: Theme.of(context).colorScheme.onPrimary, + ) + : Theme.of(context).textTheme.titleMedium, ), ], ), diff --git a/lib/pin_code/cubit/pin_code_view_cubit.dart b/lib/pin_code/cubit/pin_code_view_cubit.dart index db1d3cc9c..2e9466808 100644 --- a/lib/pin_code/cubit/pin_code_view_cubit.dart +++ b/lib/pin_code/cubit/pin_code_view_cubit.dart @@ -20,10 +20,7 @@ class PinCodeViewCubit extends Cubit { final loginAttemptsRemaining = totalPermitedLoginAttempt - state.loginAttemptCount - 1; const allowAction = true; - // if (loginAttemptCount >= totalPermitedLoginAttempt) { - // allowAction = false; - // _startLockTimer(); - // } + emit( state.copyWith( loginAttemptCount: loginAttemptCount, @@ -33,30 +30,11 @@ class PinCodeViewCubit extends Cubit { ); } - Timer? _timer; - - void _startLockTimer() { - _timer = Timer.periodic(const Duration(minutes: 10), (timer) { - _resetloginAttemptCount(); - _timer?.cancel(); - }); - } - - void _resetloginAttemptCount() { + void setEnteredPasscode( + String enteredPasscode, PinCodeErrors newPinCodeError) { emit( state.copyWith( - loginAttemptCount: 0, - allowAction: true, - loginAttemptsRemaining: totalPermitedLoginAttempt, - ), - ); - } - - void setEnteredPasscode(String enteredPasscode) { - emit( - state.copyWith( - enteredPasscode: enteredPasscode, - ), + enteredPasscode: enteredPasscode, pinCodeError: newPinCodeError), ); } @@ -65,6 +43,7 @@ class PinCodeViewCubit extends Cubit { if (enteredPasscode.isNotEmpty) { setEnteredPasscode( enteredPasscode.substring(0, enteredPasscode.length - 1), + PinCodeErrors.none, ); } else { if (cancelCallback != null) { @@ -93,11 +72,9 @@ class PinCodeViewCubit extends Cubit { digit: passCode, passwordDigits: passwordDigits, )) { - emit( - state.copyWith( - isPincodeSeries: true, - enteredPasscode: passCode, - ), + setEnteredPasscode( + '', + PinCodeErrors.errorSerie, ); return; } @@ -105,11 +82,9 @@ class PinCodeViewCubit extends Cubit { digit: passCode, passwordDigits: passwordDigits, )) { - emit( - state.copyWith( - isPincodeSequence: true, - enteredPasscode: passCode, - ), + setEnteredPasscode( + '', + PinCodeErrors.errorSequence, ); return; } @@ -119,39 +94,33 @@ class PinCodeViewCubit extends Cubit { (await getSecureStorage.get(SecureStorageKeys.pinCode)) == passCode; if (!isValid) { - setEnteredPasscode(passCode); + emit( + state.copyWith( + enteredPasscode: '', + pinCodeError: PinCodeErrors.errorPinCode, + ), + ); + loginAttempt(); return; } } emit( state.copyWith( - isPinCodeValid: true, + pinCodeError: PinCodeErrors.none, enteredPasscode: passCode, ), ); - -// on new pincode - // void _onPasscodeEntered(String enteredPasscode) { - // Navigator.pushReplacement( - // context, - // ConfirmPinCodePage.route( - // storedPassword: enteredPasscode, - // isValidCallback: widget.isValidCallback, - // isFromOnboarding: widget.isFromOnboarding, - // ), - // ); - // } } else { - setEnteredPasscode(passCode); + setEnteredPasscode( + passCode, + PinCodeErrors.none, + ); } } else { - emit( - state.copyWith( - enteredPasscode: text, - isPincodeSequence: false, - isPincodeSeries: false, - ), + setEnteredPasscode( + text, + PinCodeErrors.none, ); } } @@ -173,7 +142,7 @@ class PinCodeViewCubit extends Cubit { if (digit.length == passwordDigits) { bool isValidDesc = false; bool isValidAsc = false; - // test if pin code is a serie asc or desc + // test if PIN code is a serie asc or desc for (int i = 1; i < digit.length; i++) { if (i > 0) { if (int.parse(digit[i]) != (int.parse(digit[i - 1]) + 1)) { diff --git a/lib/pin_code/cubit/pin_code_view_state.dart b/lib/pin_code/cubit/pin_code_view_state.dart index 7ffd1e053..c3e8e4e46 100644 --- a/lib/pin_code/cubit/pin_code_view_state.dart +++ b/lib/pin_code/cubit/pin_code_view_state.dart @@ -1,32 +1,34 @@ part of 'pin_code_view_cubit.dart'; +enum PinCodeErrors { + none, + errorConfirmation, + errorSequence, + errorSerie, + errorPinCode, +} + class PinCodeViewState extends Equatable { const PinCodeViewState({ this.enteredPasscode = '', this.loginAttemptCount = 0, this.loginAttemptsRemaining = 3, this.allowAction = true, - this.isPincodeSequence = false, - this.isPincodeSeries = false, - this.isPinCodeValid = false, + this.pinCodeError = PinCodeErrors.none, }); final String enteredPasscode; final int loginAttemptCount; final int loginAttemptsRemaining; + final PinCodeErrors pinCodeError; final bool allowAction; - final bool isPincodeSeries; - final bool isPincodeSequence; - final bool isPinCodeValid; PinCodeViewState copyWith({ String? enteredPasscode, int? loginAttemptCount, int? loginAttemptsRemaining, + PinCodeErrors? pinCodeError, bool? allowAction, - bool? isPincodeSequence, - bool? isPincodeSeries, - bool? isPinCodeValid, }) { return PinCodeViewState( enteredPasscode: enteredPasscode ?? this.enteredPasscode, @@ -34,9 +36,7 @@ class PinCodeViewState extends Equatable { loginAttemptsRemaining: loginAttemptsRemaining ?? this.loginAttemptsRemaining, allowAction: allowAction ?? this.allowAction, - isPincodeSequence: isPincodeSequence ?? this.isPincodeSequence, - isPincodeSeries: isPincodeSeries ?? this.isPincodeSeries, - isPinCodeValid: isPinCodeValid ?? this.isPinCodeValid, + pinCodeError: pinCodeError ?? this.pinCodeError, ); } @@ -46,8 +46,6 @@ class PinCodeViewState extends Equatable { loginAttemptCount, allowAction, loginAttemptsRemaining, - isPincodeSequence, - isPincodeSeries, - isPinCodeValid, + pinCodeError, ]; } diff --git a/lib/pin_code/view/pin_code_page.dart b/lib/pin_code/view/pin_code_page.dart index a9bc9f239..f49f5ddfe 100644 --- a/lib/pin_code/view/pin_code_page.dart +++ b/lib/pin_code/view/pin_code_page.dart @@ -133,16 +133,8 @@ class _PinCodeViewState extends State { } } }, - // shouldTriggerVerification: _verificationNotifier.stream, onLoginAttempt: (loginAttempt, loginAttemptsRemaining) { - if (loginAttemptsRemaining > 0) { - showModalBottomSheet( - context: context, - builder: (_) => WrongPinCodePopUp( - loginAttemptsRemaining: loginAttemptsRemaining, - ), - ); - } else { + if (loginAttemptsRemaining == 0) { Navigator.of(context).push(DeleteMyWalletPage.route()); } }, diff --git a/lib/pin_code/widgets/circle_ui_config.dart b/lib/pin_code/widgets/circle_ui_config.dart index 9306f2e75..34c0d2ea3 100644 --- a/lib/pin_code/widgets/circle_ui_config.dart +++ b/lib/pin_code/widgets/circle_ui_config.dart @@ -31,10 +31,10 @@ class Circle extends StatelessWidget { @override Widget build(BuildContext context) { - final fillColor = - circleUIConfig.fillColor ?? Theme.of(context).colorScheme.primary; + final fillColor = circleUIConfig.fillColor ?? + Theme.of(context).colorScheme.primaryContainer; final borderColor = - circleUIConfig.borderColor ?? Theme.of(context).colorScheme.onPrimary; + circleUIConfig.borderColor ?? Theme.of(context).colorScheme.onSurface; return Container( margin: EdgeInsets.only(bottom: extraSize), width: circleUIConfig.circleSize, diff --git a/lib/pin_code/widgets/pin_code_title.dart b/lib/pin_code/widgets/pin_code_title.dart index 4865686de..f54087a4c 100644 --- a/lib/pin_code/widgets/pin_code_title.dart +++ b/lib/pin_code/widgets/pin_code_title.dart @@ -20,7 +20,7 @@ class PinCodeTitle extends StatelessWidget { title, textAlign: TextAlign.center, style: allowAction - ? Theme.of(context).textTheme.titleLarge + ? Theme.of(context).textTheme.headlineSmall : Theme.of(context) .textTheme .titleLarge! @@ -31,10 +31,10 @@ class PinCodeTitle extends StatelessWidget { Text( subTitle!, style: allowAction - ? Theme.of(context).textTheme.bodyMedium + ? Theme.of(context).textTheme.bodyLarge : Theme.of(context) .textTheme - .bodyMedium! + .bodyLarge! .copyWith(color: Theme.of(context).colorScheme.error), textAlign: TextAlign.center, ), diff --git a/lib/pin_code/widgets/pin_code_widget.dart b/lib/pin_code/widgets/pin_code_widget.dart index e338e265d..54229044e 100644 --- a/lib/pin_code/widgets/pin_code_widget.dart +++ b/lib/pin_code/widgets/pin_code_widget.dart @@ -34,7 +34,7 @@ class PinCodeWidget extends StatefulWidget { final String? subTitle; final int passwordDigits; final bool isNewCode; - // When a specific pin is requested to get a credential + // When a specific PIN is requested to get a credential final bool isUserPin; // Cancel button and delete button will be switched based on the screen state @@ -56,14 +56,21 @@ class PinCodeWidget extends StatefulWidget { class _PinCodeWidgetState extends State with SingleTickerProviderStateMixin { - late bool isPincodeDifferent; + bool isConfirmationPage = false; final log = getLogger('PinCodeWidget'); @override void initState() { super.initState(); - isPincodeDifferent = false; + Future.delayed(Duration.zero, () { + final l10n = context.l10n; + if (widget.title == l10n.confirmYourPinCode) { + setState(() { + isConfirmationPage = true; + }); + } + }); } @override @@ -71,20 +78,9 @@ class _PinCodeWidgetState extends State final l10n = context.l10n; return BlocConsumer( listenWhen: (previous, current) { - if (current.enteredPasscode.length < widget.passwordDigits) { - setState(() { - isPincodeDifferent = false; - }); - } if (current.enteredPasscode.length == widget.passwordDigits) { - if (current.isPinCodeValid || widget.isUserPin) { + if (current.pinCodeError == PinCodeErrors.none || widget.isUserPin) { _validationCallback(); - } else { - if (widget.title == l10n.confirmYourPinCode) { - setState(() { - isPincodeDifferent = true; - }); - } } } return previous.loginAttemptCount != current.loginAttemptCount; @@ -92,14 +88,9 @@ class _PinCodeWidgetState extends State listener: (context, state) { widget.onLoginAttempt ?.call(state.loginAttemptCount, state.loginAttemptsRemaining); - // if (state.enteredPasscode.length == widget.passwordDigits && - // widget.isUserPin) { - // _validationCallback(); - // } }, builder: (context, state) { final enteredPasscode = state.enteredPasscode; - final titleStyle = Theme.of(context).textTheme.labelMedium; return OrientationBuilder( builder: (context, orientation) { @@ -135,9 +126,8 @@ class _PinCodeWidgetState extends State : l10n.pincodeAttemptMessage, allowAction: state.allowAction, ), - const SizedBox(height: Sizes.spaceXSmall), Container( - margin: const EdgeInsets.only(top: 16), + margin: const EdgeInsets.only(top: 8), height: 40, child: Row( mainAxisAlignment: MainAxisAlignment.center, @@ -149,10 +139,8 @@ class _PinCodeWidgetState extends State allowAction: state.allowAction, filled: index < enteredPasscode.length, - circleUIConfig: (state - .isPincodeSequence || - state.isPincodeSeries || - isPincodeDifferent) + circleUIConfig: (state.pinCodeError != + PinCodeErrors.none) ? CircleUIConfig( fillColor: Theme.of(context) .colorScheme @@ -164,39 +152,8 @@ class _PinCodeWidgetState extends State ), ), ), - SizedBox( - height: Sizes.spaceSmall, - child: isPincodeDifferent - ? Text( - l10n.pincodeDifferent, - style: titleStyle?.copyWith( - color: Theme.of(context) - .colorScheme - .error, - ), - textAlign: TextAlign.center, - ) - : state.isPincodeSeries - ? Text( - l10n.pincodeSerie, - style: titleStyle?.copyWith( - color: Theme.of(context) - .colorScheme - .error, - ), - textAlign: TextAlign.center, - ) - : state.isPincodeSequence - ? Text( - l10n.pincodeSequence, - style: titleStyle?.copyWith( - color: Theme.of(context) - .colorScheme - .error, - ), - textAlign: TextAlign.center, - ) - : const SizedBox.shrink(), + PinCodeErrorMessage( + isConfirmationPage: isConfirmationPage, ), NumKeyboard( keyboardUIConfig: widget.keyboardUIConfig, @@ -321,6 +278,67 @@ class _PinCodeWidgetState extends State } } +class PinCodeErrorMessage extends StatelessWidget { + const PinCodeErrorMessage({ + required this.isConfirmationPage, + super.key, + }); + + final bool isConfirmationPage; + @override + Widget build(BuildContext context) { + final l10n = context.l10n; + + return BlocBuilder( + builder: (context, state) { + Widget errorWidget = const SizedBox.shrink(); + switch (state.pinCodeError) { + case PinCodeErrors.none: + errorWidget = const SizedBox.shrink(); + case PinCodeErrors.errorSerie: + errorWidget = PinCodeErrorText(l10n.pincodeSerie); + case PinCodeErrors.errorSequence: + errorWidget = PinCodeErrorText(l10n.pincodeSequence); + case PinCodeErrors.errorConfirmation: + case PinCodeErrors.errorPinCode: + if (isConfirmationPage) { + errorWidget = PinCodeErrorText(l10n.pincodeDifferent); + } else { + errorWidget = PinCodeErrorText( + // ignore: lines_longer_than_80_chars + '${l10n.userPinIsIncorrect}\n${l10n.codeSecretIncorrectDescription( + state.loginAttemptsRemaining, + state.loginAttemptsRemaining == 1 ? '' : 's', + )}', + ); + } + } + return errorWidget; + }, + ); + } +} + +class PinCodeErrorText extends StatelessWidget { + const PinCodeErrorText( + this.errorText, { + super.key, + }); + + final String errorText; + + @override + Widget build(BuildContext context) { + return Text( + errorText, + style: Theme.of(context).textTheme.labelMedium?.copyWith( + color: Theme.of(context).colorScheme.error, + ), + textAlign: TextAlign.center, + ); + } +} + class KeyboardButton extends StatelessWidget { const KeyboardButton({ super.key, diff --git a/lib/pin_code/widgets/widgets.dart b/lib/pin_code/widgets/widgets.dart index 778e28fcb..e5cdb9f4d 100644 --- a/lib/pin_code/widgets/widgets.dart +++ b/lib/pin_code/widgets/widgets.dart @@ -4,4 +4,3 @@ export 'num_keyboard.dart'; export 'pin_code_title.dart'; export 'pin_code_widget.dart'; export 'shake_curve.dart'; -export 'wrong_pincode_popup.dart'; diff --git a/lib/pin_code/widgets/wrong_pincode_popup.dart b/lib/pin_code/widgets/wrong_pincode_popup.dart deleted file mode 100644 index 7c3728199..000000000 --- a/lib/pin_code/widgets/wrong_pincode_popup.dart +++ /dev/null @@ -1,28 +0,0 @@ -import 'package:altme/app/shared/constants/icon_strings.dart'; -import 'package:altme/app/shared/widget/widget.dart'; -import 'package:altme/l10n/l10n.dart'; -import 'package:flutter/material.dart'; - -class WrongPinCodePopUp extends StatelessWidget { - const WrongPinCodePopUp({ - super.key, - required this.loginAttemptsRemaining, - }); - - final int loginAttemptsRemaining; - - @override - Widget build(BuildContext context) { - final l10n = context.l10n; - - return ConfirmDialog( - icon: IconStrings.alert, - title: l10n.userPinIsIncorrect, - subtitle: l10n.codeSecretIncorrectDescription( - loginAttemptsRemaining, - loginAttemptsRemaining == 1 ? '' : 's', - ), - yes: l10n.tryAgain, - ); - } -} diff --git a/lib/selective_disclosure/widget/display_selective_disclosure.dart b/lib/selective_disclosure/widget/display_selective_disclosure.dart index 72634a1b4..efbace618 100644 --- a/lib/selective_disclosure/widget/display_selective_disclosure.dart +++ b/lib/selective_disclosure/widget/display_selective_disclosure.dart @@ -204,7 +204,7 @@ class DisplaySelectiveDisclosure extends StatelessWidget { .colorScheme .onSurface .withOpacity(0.3) - : Theme.of(context).colorScheme.onPrimary, + : Theme.of(context).colorScheme.onSurface, ), ), ], diff --git a/lib/splash/widgets/loading_progress.dart b/lib/splash/widgets/loading_progress.dart index 1382003ad..871c6b0a3 100644 --- a/lib/splash/widgets/loading_progress.dart +++ b/lib/splash/widgets/loading_progress.dart @@ -31,7 +31,10 @@ class LoadingProgress extends StatelessWidget { ), child: ClipRRect( borderRadius: BorderRadius.circular(borderRadius), - child: LinearProgressIndicator(value: value), + child: LinearProgressIndicator( + value: value, + color: Theme.of(context).colorScheme.primaryContainer, + ), ), ), ); diff --git a/lib/splash/widgets/subtitle_text.dart b/lib/splash/widgets/subtitle_text.dart index e17b4d3e4..6d2df07cc 100644 --- a/lib/splash/widgets/subtitle_text.dart +++ b/lib/splash/widgets/subtitle_text.dart @@ -23,7 +23,7 @@ class SubTitle extends StatelessWidget { child: Text( isEnterprise ? tag : l10n.splashSubtitle, textAlign: TextAlign.center, - style: Theme.of(context).textTheme.titleLarge, + style: Theme.of(context).textTheme.headlineSmall, ), ); } diff --git a/lib/splash/widgets/title_text.dart b/lib/splash/widgets/title_text.dart index 22ef88bc3..aba56c16c 100644 --- a/lib/splash/widgets/title_text.dart +++ b/lib/splash/widgets/title_text.dart @@ -22,11 +22,14 @@ class TitleText extends StatelessWidget { profileModel.profileSetting.generalOptions.splashScreenTitle ?? '${l10n.professional} ${l10n.wallet}'; - return MyText( + return Text( isEnterprise ? splashScreenTitle : '${Parameters.appName} ${l10n.wallet}', maxLines: 1, textAlign: TextAlign.center, - style: Theme.of(context).textTheme.headlineLarge, + style: Theme.of(context) + .textTheme + .headlineLarge! + .copyWith(fontWeight: FontWeight.bold), ); } } diff --git a/lib/theme/app_theme/app_theme.dart b/lib/theme/app_theme/app_theme.dart index 3729a9ecb..2b31eed5e 100644 --- a/lib/theme/app_theme/app_theme.dart +++ b/lib/theme/app_theme/app_theme.dart @@ -2,78 +2,46 @@ import 'package:flutter/material.dart'; import 'package:google_fonts/google_fonts.dart'; class AppTheme { - static ThemeData defaultThemeData(Brightness brightness) { + static ThemeData seedThemeData(Brightness brightness, String primaryColor) { + // final seedColor = Colors.blue; + // altme + final seedColor = const Color(0xff6600FF); + // talao + // final seedColor = const Color(0xff1EAADC); + final theme = ThemeData( useMaterial3: true, brightness: brightness, - dividerColor: const Color(0xFF605A71), - highlightColor: const Color(0xFF36334E), - colorScheme: ColorScheme( - primary: const Color(0xff6600FF), - onPrimary: const Color(0xffFFFFFF), - onPrimaryContainer: const Color(0xFF280164), - primaryContainer: const Color(0xFF322643), - secondary: const Color(0xFF5F556F), - secondaryContainer: const Color(0xFF86809D), - onSecondary: const Color(0xffFFFFFF), - tertiary: const Color(0xff18ACFF), - onTertiary: const Color(0xffD1CCE3), - surface: brightness == Brightness.dark - ? const Color(0xff0B0514) - : const Color(0xffEDEAF5), - onSurface: brightness == Brightness.light - ? const Color(0xff0B0514) - : const Color(0xffEDEAF5), - error: const Color(0xffcf6679), - onError: Colors.black, - shadow: const Color(0xff1D1D1D).withOpacity(0.1), - surfaceBright: const Color(0xff232630), - surfaceDim: const Color(0xff271C38), - brightness: brightness, - ), - // textTheme: GoogleFonts.nunitoTextTheme(), - iconTheme: const IconThemeData(color: Color(0xff6600FF)), - snackBarTheme: SnackBarThemeData( - backgroundColor: Colors.green, - contentTextStyle: GoogleFonts.roboto( - color: const Color(0xFFFFFFFF), + snackBarTheme: const SnackBarThemeData( + contentTextStyle: TextStyle( fontSize: 12, fontWeight: FontWeight.w400, ), ), - tabBarTheme: const TabBarTheme(), + tabBarTheme: const TabBarTheme(dividerColor: Colors.transparent), + textTheme: const TextTheme( + headlineSmall: TextStyle( + fontWeight: FontWeight.bold, + ), + titleLarge: TextStyle( + fontSize: 20, + fontWeight: FontWeight.normal, + ), + ), + buttonTheme: ButtonThemeData( + textTheme: ButtonTextTheme.primary, + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(8), + ), + ), ); return theme.copyWith( textTheme: GoogleFonts.nunitoTextTheme(theme.textTheme), - ); - } - - static ThemeData seedThemeData(Brightness brightness, String? primaryColor) { - if (primaryColor == null) { - return defaultThemeData(brightness); - } else if (primaryColor.startsWith('#')) { - final seedColor = Color( - int.parse(primaryColor.substring(1, 7), radix: 16) + 0xFF000000, - ); - final theme = ThemeData( - useMaterial3: true, + colorScheme: ColorScheme.fromSeed( + seedColor: seedColor, brightness: brightness, - snackBarTheme: SnackBarThemeData( - contentTextStyle: GoogleFonts.roboto( - fontSize: 12, - fontWeight: FontWeight.w400, - ), - ), - tabBarTheme: const TabBarTheme(dividerColor: Colors.transparent), - ); - return theme.copyWith( - textTheme: GoogleFonts.robotoTextTheme(theme.textTheme), - colorScheme: ColorScheme.fromSeed( - seedColor: seedColor, - brightness: brightness, - ), - ); - } - return defaultThemeData(brightness); + dynamicSchemeVariant: DynamicSchemeVariant.fidelity, + ), + ); } } diff --git a/test/onboarding/gen_phrase/view/onboarding_gen_phrase_test.dart b/test/onboarding/gen_phrase/view/onboarding_gen_phrase_test.dart index 7bc14632e..486cf3552 100644 --- a/test/onboarding/gen_phrase/view/onboarding_gen_phrase_test.dart +++ b/test/onboarding/gen_phrase/view/onboarding_gen_phrase_test.dart @@ -172,7 +172,7 @@ void main() { expect(find.byType(MStepper), findsOneWidget); expect(find.byType(MnemonicDisplay), findsOneWidget); expect(find.byType(MyElevatedButton), findsOneWidget); - expect(find.byType(MyGradientButton), findsOneWidget); + expect(find.byType(MyElevatedButton), findsOneWidget); }); testWidgets( diff --git a/test/onboarding/tos/view/onboarding_tos_page_test.dart b/test/onboarding/tos/view/onboarding_tos_page_test.dart index 074ccb6a1..c6d640e82 100644 --- a/test/onboarding/tos/view/onboarding_tos_page_test.dart +++ b/test/onboarding/tos/view/onboarding_tos_page_test.dart @@ -80,7 +80,7 @@ void main() { ), ); - await tester.tap(find.byType(MyGradientButton)); + await tester.tap(find.byType(MyElevatedButton)); await tester.pumpAndSettle(); expect(find.byType(OnBoardingTosView), findsOneWidget); }); @@ -141,7 +141,7 @@ void main() { }); testWidgets( - 'MyGradientButton press calls onAcceptancePressed', + 'MyElevatedButton press calls onAcceptancePressed', (WidgetTester tester) async { when(() => onBoardingTosCubit.state) .thenReturn(const OnBoardingTosState());