diff --git a/lib/app/shared/extension/extension.dart b/lib/app/shared/extension/extension.dart index dc5db6f25..e333dbbdc 100644 --- a/lib/app/shared/extension/extension.dart +++ b/lib/app/shared/extension/extension.dart @@ -2,4 +2,4 @@ export 'bigint_extension.dart'; export 'double_extension.dart'; export 'iterable_extension.dart'; export 'string_extension.dart'; -export 'unit8list_extension.dart'; +export 'unit8_list_extension.dart'; diff --git a/lib/app/shared/extension/unit8List_extension.dart b/lib/app/shared/extension/unit8_list_extension.dart similarity index 100% rename from lib/app/shared/extension/unit8List_extension.dart rename to lib/app/shared/extension/unit8_list_extension.dart diff --git a/lib/app/shared/loading/loading_view.dart b/lib/app/shared/loading/loading_view.dart index c6caa7813..18e7bab43 100644 --- a/lib/app/shared/loading/loading_view.dart +++ b/lib/app/shared/loading/loading_view.dart @@ -54,7 +54,7 @@ class LoadingView { minWidth: size.width * 0.5, ), decoration: BoxDecoration( - color: Theme.of(context).colorScheme.background, + color: Theme.of(context).colorScheme.surface, borderRadius: BorderRadius.circular(10), ), child: Padding( diff --git a/lib/app/shared/widget/numeric_keyboard.dart b/lib/app/shared/widget/numeric_keyboard.dart index cefdfb5e5..2c69a7326 100644 --- a/lib/app/shared/widget/numeric_keyboard.dart +++ b/lib/app/shared/widget/numeric_keyboard.dart @@ -161,7 +161,7 @@ class KeyboardButton extends StatelessWidget { child: InkWell( highlightColor: allowAction ? Theme.of(context).colorScheme.primary - : Theme.of(context).colorScheme.background, + : Theme.of(context).colorScheme.surface, splashColor: allowAction ? Theme.of(context).colorScheme.primary : Theme.of(context).colorScheme.surface, diff --git a/lib/dashboard/drawer/about_altme/sofware_licenses/view/software_license_view.dart b/lib/dashboard/drawer/about_altme/sofware_licenses/view/software_license_view.dart index 928a38e9a..e822e4ad1 100644 --- a/lib/dashboard/drawer/about_altme/sofware_licenses/view/software_license_view.dart +++ b/lib/dashboard/drawer/about_altme/sofware_licenses/view/software_license_view.dart @@ -98,7 +98,7 @@ class _SoftwareLicenseViewState extends State { const SizedBox(width: 10), Icon( Icons.chevron_right, - color: Theme.of(context).colorScheme.onBackground, + color: Theme.of(context).colorScheme.onSurface, ), ], ), diff --git a/lib/dashboard/drawer/about_altme/terms/view/terms_page.dart b/lib/dashboard/drawer/about_altme/terms/view/terms_page.dart index dedd6538e..aeb2276ce 100644 --- a/lib/dashboard/drawer/about_altme/terms/view/terms_page.dart +++ b/lib/dashboard/drawer/about_altme/terms/view/terms_page.dart @@ -14,7 +14,7 @@ class TermsPage extends StatelessWidget { Widget build(BuildContext context) { final l10n = context.l10n; return BasePage( - backgroundColor: Theme.of(context).colorScheme.background, + backgroundColor: Theme.of(context).colorScheme.surface, title: l10n.termsOfUse, titleLeading: const BackLeadingButton(), scrollView: false, diff --git a/lib/dashboard/drawer/blockchain_settings/manage_accounts/view/account_private_key_page.dart b/lib/dashboard/drawer/blockchain_settings/manage_accounts/view/account_private_key_page.dart index 56ed1807a..64b063942 100644 --- a/lib/dashboard/drawer/blockchain_settings/manage_accounts/view/account_private_key_page.dart +++ b/lib/dashboard/drawer/blockchain_settings/manage_accounts/view/account_private_key_page.dart @@ -76,7 +76,7 @@ class _AccountPrivateKeyPageState extends State }, icon: Icon( Icons.qr_code, - color: Theme.of(context).colorScheme.onBackground, + color: Theme.of(context).colorScheme.onSurface, ), ), body: BackgroundCard( diff --git a/lib/dashboard/drawer/blockchain_settings/manage_accounts/view/private_key_qr_page.dart b/lib/dashboard/drawer/blockchain_settings/manage_accounts/view/private_key_qr_page.dart index 18c54cfca..688a20ae8 100644 --- a/lib/dashboard/drawer/blockchain_settings/manage_accounts/view/private_key_qr_page.dart +++ b/lib/dashboard/drawer/blockchain_settings/manage_accounts/view/private_key_qr_page.dart @@ -81,7 +81,7 @@ class _PrivateKeyQrPageState extends State child: QrImageView( data: widget.data, size: 200, - foregroundColor: Theme.of(context).colorScheme.onBackground, + foregroundColor: Theme.of(context).colorScheme.onSurface, ), ), const SizedBox(height: 10), diff --git a/lib/dashboard/drawer/ssi/oidc4vc_settngs/widget/confidential_client_widget.dart b/lib/dashboard/drawer/ssi/oidc4vc_settngs/widget/confidential_client_widget.dart index 997bc82a0..d2605cbf6 100644 --- a/lib/dashboard/drawer/ssi/oidc4vc_settngs/widget/confidential_client_widget.dart +++ b/lib/dashboard/drawer/ssi/oidc4vc_settngs/widget/confidential_client_widget.dart @@ -118,7 +118,7 @@ class ConfidentialClientWidget extends StatelessWidget { ), decoration: BoxDecoration( border: Border.all( - color: Theme.of(context).colorScheme.onBackground, + color: Theme.of(context).colorScheme.onSurface, ), borderRadius: const BorderRadius.all( Radius.circular( diff --git a/lib/dashboard/home/tab_bar/credentials/credential_qr/view/credential_qr_page.dart b/lib/dashboard/home/tab_bar/credentials/credential_qr/view/credential_qr_page.dart index f5ce895ad..d743229fc 100644 --- a/lib/dashboard/home/tab_bar/credentials/credential_qr/view/credential_qr_page.dart +++ b/lib/dashboard/home/tab_bar/credentials/credential_qr/view/credential_qr_page.dart @@ -44,7 +44,7 @@ class CredentialQrPage extends StatelessWidget { child: QrImageView( data: data, size: 200, - foregroundColor: Theme.of(context).colorScheme.onBackground, + foregroundColor: Theme.of(context).colorScheme.onSurface, ), ), const SizedBox(height: 10), diff --git a/lib/dashboard/qr_code/qr_display/view/qr_display_page.dart b/lib/dashboard/qr_code/qr_display/view/qr_display_page.dart index b4ce1fbf8..897a58b03 100644 --- a/lib/dashboard/qr_code/qr_display/view/qr_display_page.dart +++ b/lib/dashboard/qr_code/qr_display/view/qr_display_page.dart @@ -36,7 +36,7 @@ class QrCodeDisplayPage extends StatelessWidget { child: QrImageView( data: data, size: 200, - foregroundColor: Theme.of(context).colorScheme.onBackground, + foregroundColor: Theme.of(context).colorScheme.onSurface, ), ), const SizedBox(height: 10), diff --git a/lib/onboarding/tos/view/onboarding_tos_page.dart b/lib/onboarding/tos/view/onboarding_tos_page.dart index 2379327fa..0069f6493 100644 --- a/lib/onboarding/tos/view/onboarding_tos_page.dart +++ b/lib/onboarding/tos/view/onboarding_tos_page.dart @@ -70,7 +70,7 @@ class _OnBoardingTosViewState extends State { return false; }, child: BasePage( - backgroundColor: Theme.of(context).colorScheme.background, + backgroundColor: Theme.of(context).colorScheme.surface, title: l10n.termsOfUse, scrollView: false, padding: const EdgeInsets.symmetric(horizontal: 10), diff --git a/lib/pin_code/view/confirm_pin_code_page.dart b/lib/pin_code/view/confirm_pin_code_page.dart index f67b2fc88..3f89e92bc 100644 --- a/lib/pin_code/view/confirm_pin_code_page.dart +++ b/lib/pin_code/view/confirm_pin_code_page.dart @@ -85,7 +85,7 @@ class _ConfirmPinCodeViewState extends State { titleAlignment: Alignment.topCenter, titleLeading: const BackLeadingButton(), padding: const EdgeInsets.symmetric(horizontal: Sizes.spaceSmall), - backgroundColor: Theme.of(context).colorScheme.background, + backgroundColor: Theme.of(context).colorScheme.surface, body: PinCodeWidget( title: l10n.confirmYourPinCode, header: widget.isFromOnboarding diff --git a/lib/pin_code/view/enter_new_pin_code_page.dart b/lib/pin_code/view/enter_new_pin_code_page.dart index 97e60631c..25ac66037 100644 --- a/lib/pin_code/view/enter_new_pin_code_page.dart +++ b/lib/pin_code/view/enter_new_pin_code_page.dart @@ -73,7 +73,7 @@ class _EnterNewPinCodeViewState extends State { scrollView: false, titleLeading: const BackLeadingButton(), padding: const EdgeInsets.symmetric(horizontal: Sizes.spaceSmall), - backgroundColor: Theme.of(context).colorScheme.background, + backgroundColor: Theme.of(context).colorScheme.surface, body: PinCodeWidget( title: l10n.enterNewPinCode, header: widget.isFromOnboarding diff --git a/lib/pin_code/view/pin_code_page.dart b/lib/pin_code/view/pin_code_page.dart index fa3676f4d..a9bc9f239 100644 --- a/lib/pin_code/view/pin_code_page.dart +++ b/lib/pin_code/view/pin_code_page.dart @@ -84,7 +84,7 @@ class _PinCodeViewState extends State { return PopScope( canPop: !widget.restrictToBack, child: BasePage( - backgroundColor: Theme.of(context).colorScheme.background, + backgroundColor: Theme.of(context).colorScheme.surface, title: '', titleAlignment: Alignment.topCenter, titleLeading: widget.restrictToBack ? null : const BackLeadingButton(), diff --git a/pubspec.lock b/pubspec.lock index e04714c7a..5efc42bde 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -595,7 +595,7 @@ packages: didkit: dependency: transitive description: - path: "didkit/lib/flutter" + path: "../didkit/lib/flutter" relative: true source: path version: "0.0.2" diff --git a/test/app/shared/enum/type/blockchain_type_test.dart b/test/app/shared/enum/type/blockchain_type_test.dart index 8afe660a7..d7ac7856c 100644 --- a/test/app/shared/enum/type/blockchain_type_test.dart +++ b/test/app/shared/enum/type/blockchain_type_test.dart @@ -34,18 +34,28 @@ void main() { test('BlockchainType chain returns correct value', () { expect(() => BlockchainType.tezos.chain, throwsA(isA())); expect( - BlockchainType.ethereum.chain, equals('${Parameters.NAMESPACE}:1')); + BlockchainType.ethereum.chain, + equals('${Parameters.NAMESPACE}:1'), + ); expect( - BlockchainType.fantom.chain, equals('${Parameters.NAMESPACE}:250')); + BlockchainType.fantom.chain, + equals('${Parameters.NAMESPACE}:250'), + ); expect( - BlockchainType.polygon.chain, equals('${Parameters.NAMESPACE}:137')); + BlockchainType.polygon.chain, + equals('${Parameters.NAMESPACE}:137'), + ); expect( - BlockchainType.binance.chain, equals('${Parameters.NAMESPACE}:56')); + BlockchainType.binance.chain, + equals('${Parameters.NAMESPACE}:56'), + ); }); test('BlockchainType chainId returns correct value', () { expect( - () => BlockchainType.tezos.chainId, throwsA(isA())); + () => BlockchainType.tezos.chainId, + throwsA(isA()), + ); expect(BlockchainType.ethereum.chainId, equals(1)); expect(BlockchainType.fantom.chainId, equals(250)); expect(BlockchainType.polygon.chainId, equals(137)); @@ -53,93 +63,171 @@ void main() { }); test('BlockchainType derivePathIndexKey returns correct value', () { - expect(BlockchainType.tezos.derivePathIndexKey, - equals(SecureStorageKeys.tezosDerivePathIndex)); - expect(BlockchainType.ethereum.derivePathIndexKey, - equals(SecureStorageKeys.ethereumDerivePathIndex)); - expect(BlockchainType.fantom.derivePathIndexKey, - equals(SecureStorageKeys.fantomDerivePathIndex)); - expect(BlockchainType.polygon.derivePathIndexKey, - equals(SecureStorageKeys.polygonDerivePathIndex)); - expect(BlockchainType.binance.derivePathIndexKey, - equals(SecureStorageKeys.binanceDerivePathIndex)); + expect( + BlockchainType.tezos.derivePathIndexKey, + equals(SecureStorageKeys.tezosDerivePathIndex), + ); + expect( + BlockchainType.ethereum.derivePathIndexKey, + equals(SecureStorageKeys.ethereumDerivePathIndex), + ); + expect( + BlockchainType.fantom.derivePathIndexKey, + equals(SecureStorageKeys.fantomDerivePathIndex), + ); + expect( + BlockchainType.polygon.derivePathIndexKey, + equals(SecureStorageKeys.polygonDerivePathIndex), + ); + expect( + BlockchainType.binance.derivePathIndexKey, + equals(SecureStorageKeys.binanceDerivePathIndex), + ); }); test('BlockchainType credentialManifest returns correct value', () { expect( - jsonEncode(BlockchainType.tezos.credentialManifest), - equals(jsonEncode(CredentialManifest.fromJson( - ConstantsJson.tezosAssociatedAddressCredentialManifestJson)))); + jsonEncode(BlockchainType.tezos.credentialManifest), + equals( + jsonEncode( + CredentialManifest.fromJson( + ConstantsJson.tezosAssociatedAddressCredentialManifestJson, + ), + ), + ), + ); expect( - jsonEncode(BlockchainType.ethereum.credentialManifest), - equals(jsonEncode(CredentialManifest.fromJson( - ConstantsJson.ethereumAssociatedAddressCredentialManifestJson)))); + jsonEncode(BlockchainType.ethereum.credentialManifest), + equals( + jsonEncode( + CredentialManifest.fromJson( + ConstantsJson.ethereumAssociatedAddressCredentialManifestJson, + ), + ), + ), + ); expect( - jsonEncode(BlockchainType.fantom.credentialManifest), - equals(jsonEncode(CredentialManifest.fromJson( - ConstantsJson.fantomAssociatedAddressCredentialManifestJson)))); + jsonEncode(BlockchainType.fantom.credentialManifest), + equals( + jsonEncode( + CredentialManifest.fromJson( + ConstantsJson.fantomAssociatedAddressCredentialManifestJson, + ), + ), + ), + ); expect( - jsonEncode(BlockchainType.polygon.credentialManifest), - equals(jsonEncode(CredentialManifest.fromJson( - ConstantsJson.polygonAssociatedAddressCredentialManifestJson)))); + jsonEncode(BlockchainType.polygon.credentialManifest), + equals( + jsonEncode( + CredentialManifest.fromJson( + ConstantsJson.polygonAssociatedAddressCredentialManifestJson, + ), + ), + ), + ); expect( - jsonEncode(BlockchainType.binance.credentialManifest), - equals(jsonEncode(CredentialManifest.fromJson( - ConstantsJson.binanceAssociatedAddressCredentialManifestJson)))); + jsonEncode(BlockchainType.binance.credentialManifest), + equals( + jsonEncode( + CredentialManifest.fromJson( + ConstantsJson.binanceAssociatedAddressCredentialManifestJson, + ), + ), + ), + ); }); test('BlockchainType filter returns correct value', () { expect( - jsonEncode(BlockchainType.tezos.filter.toJson()), - equals(jsonEncode( - Filter(type: 'String', pattern: 'TezosAssociatedAddress') - .toJson()))); - expect( - jsonEncode(BlockchainType.ethereum.filter.toJson()), - equals(jsonEncode( - Filter(type: 'String', pattern: 'EthereumAssociatedAddress') - .toJson()))); - expect( - jsonEncode(BlockchainType.fantom.filter.toJson()), - equals(jsonEncode( - Filter(type: 'String', pattern: 'FantomAssociatedAddress') - .toJson()))); - expect( - jsonEncode(BlockchainType.polygon.filter.toJson()), - equals(jsonEncode( - Filter(type: 'String', pattern: 'PolygonAssociatedAddress') - .toJson()))); - expect( - jsonEncode(BlockchainType.binance.filter.toJson()), - equals(jsonEncode( - Filter(type: 'String', pattern: 'BinanceAssociatedAddress') - .toJson()))); + jsonEncode(BlockchainType.tezos.filter.toJson()), + equals( + jsonEncode( + Filter(type: 'String', pattern: 'TezosAssociatedAddress').toJson(), + ), + ), + ); + expect( + jsonEncode(BlockchainType.ethereum.filter.toJson()), + equals( + jsonEncode( + Filter(type: 'String', pattern: 'EthereumAssociatedAddress') + .toJson(), + ), + ), + ); + expect( + jsonEncode(BlockchainType.fantom.filter.toJson()), + equals( + jsonEncode( + Filter(type: 'String', pattern: 'FantomAssociatedAddress').toJson(), + ), + ), + ); + expect( + jsonEncode(BlockchainType.polygon.filter.toJson()), + equals( + jsonEncode( + Filter(type: 'String', pattern: 'PolygonAssociatedAddress') + .toJson(), + ), + ), + ); + expect( + jsonEncode(BlockchainType.binance.filter.toJson()), + equals( + jsonEncode( + Filter(type: 'String', pattern: 'BinanceAssociatedAddress') + .toJson(), + ), + ), + ); }); test('BlockchainType connectionBridge returns correct value', () { - expect(BlockchainType.tezos.connectionBridge, - equals(ConnectionBridgeType.beacon)); - expect(BlockchainType.ethereum.connectionBridge, - equals(ConnectionBridgeType.walletconnect)); - expect(BlockchainType.fantom.connectionBridge, - equals(ConnectionBridgeType.walletconnect)); - expect(BlockchainType.polygon.connectionBridge, - equals(ConnectionBridgeType.walletconnect)); - expect(BlockchainType.binance.connectionBridge, - equals(ConnectionBridgeType.walletconnect)); + expect( + BlockchainType.tezos.connectionBridge, + equals(ConnectionBridgeType.beacon), + ); + expect( + BlockchainType.ethereum.connectionBridge, + equals(ConnectionBridgeType.walletconnect), + ); + expect( + BlockchainType.fantom.connectionBridge, + equals(ConnectionBridgeType.walletconnect), + ); + expect( + BlockchainType.polygon.connectionBridge, + equals(ConnectionBridgeType.walletconnect), + ); + expect( + BlockchainType.binance.connectionBridge, + equals(ConnectionBridgeType.walletconnect), + ); }); test('BlockchainType networks returns correct value', () { - expect(BlockchainType.tezos.networks, - equals([TezosNetwork.mainNet(), TezosNetwork.ghostnet()])); - expect(BlockchainType.ethereum.networks, - equals([EthereumNetwork.mainNet(), EthereumNetwork.testNet()])); - expect(BlockchainType.fantom.networks, - equals([FantomNetwork.mainNet(), FantomNetwork.testNet()])); - expect(BlockchainType.polygon.networks, - equals([PolygonNetwork.mainNet(), PolygonNetwork.testNet()])); - expect(BlockchainType.binance.networks, - equals([BinanceNetwork.mainNet(), BinanceNetwork.testNet()])); + expect( + BlockchainType.tezos.networks, + equals([TezosNetwork.mainNet(), TezosNetwork.ghostnet()]), + ); + expect( + BlockchainType.ethereum.networks, + equals([EthereumNetwork.mainNet(), EthereumNetwork.testNet()]), + ); + expect( + BlockchainType.fantom.networks, + equals([FantomNetwork.mainNet(), FantomNetwork.testNet()]), + ); + expect( + BlockchainType.polygon.networks, + equals([PolygonNetwork.mainNet(), PolygonNetwork.testNet()]), + ); + expect( + BlockchainType.binance.networks, + equals([BinanceNetwork.mainNet(), BinanceNetwork.testNet()]), + ); }); test('BlockchainType isDisabled returns correct value', () { diff --git a/test/theme/app_theme_test.dart b/test/theme/app_theme_test.dart index 74df0adae..331f14354 100644 --- a/test/theme/app_theme_test.dart +++ b/test/theme/app_theme_test.dart @@ -36,7 +36,7 @@ void main() { expect(colorScheme.onOutlineButton, const Color(0xFF6600FF)); expect(colorScheme.onElevatedButton, equals(Colors.white)); expect(colorScheme.appBarUpperLayer, const Color(0xff25095B)); - expect(colorScheme.appBarLowerLayer, equals(colorScheme.background)); + expect(colorScheme.appBarLowerLayer, equals(colorScheme.surface)); expect( colorScheme.surfaceContainer, equals(const Color(0xff707070).withOpacity(0.07)),