From 5c8bcefa4d5f9ea5306a44eb8bbe0e8643996fdf Mon Sep 17 00:00:00 2001 From: Bibash Shrestha Date: Wed, 5 Jun 2024 15:07:05 +0545 Subject: [PATCH] fix: Remove linter problems --- lib/app/shared/extension/extension.dart | 2 +- .../widget/button/my_elevated_button.dart | 8 +- lib/app/shared/widget/checkbox_item.dart | 2 +- .../widgets/crypto_accont_item.dart | 2 +- .../widgets/advance_settings_radio_item.dart | 2 +- .../reset_wallet/view/reset_wallet_menu.dart | 2 - .../widgets/select_box_account_item.dart | 2 +- .../qr_code_scan/view/qr_camera_view.dart | 7 +- .../widgets/select_network_fee_item.dart | 2 +- lib/dashboard/src/view/dashboard_page.dart | 7 +- .../user_pin/view/user_pin_page.dart | 7 +- .../wallet_ready/view/wallet_ready_page.dart | 2 +- lib/pin_code/cubit/pin_code_view_cubit.dart | 12 +- lib/pin_code/view/confirm_pin_code_page.dart | 22 +- lib/pin_code/view/delete_my_wallet_page.dart | 2 - lib/pin_code/view/pin_code_page.dart | 5 +- .../test/src/secure_jwt_signer_test.dart | 5 +- .../shared/enum/credential_category_test.dart | 68 +- ...redential_subject_type_extension_test.dart | 784 ++++++++++++------ .../shared/enum/polygon_id_network_test.dart | 4 +- .../credential_status_extension_test.dart | 6 +- .../shared/enum/type/language_type_test.dart | 4 +- .../extension/unit8List_extension_test.dart | 40 - .../extension/unit_8_list_extension_test.dart | 15 +- .../helper_functions_test.dart | 331 +++++--- test/app/shared/issuer/check_issuer_test.dart | 14 +- .../issuer/models/organization_info_test.dart | 8 +- .../state_message/state_message_test.dart | 2 +- .../network/network_exception_test.dart | 4 +- .../wallet_address_validator_test.dart | 14 +- .../widget/base/otp_textfield_test.dart | 9 +- test/app/shared/widget/base/page_test.dart | 4 +- .../widget/dialog/confirm_dialog_test.dart | 14 +- .../widget/dialog/text_field_dialog_test.dart | 3 +- test/app/shared/widget/wallet_logo_test.dart | 3 +- .../view/onboarding_gen_phrase_test.dart | 3 +- .../helper_function/helper_function_test.dart | 4 +- .../view/protect_wallet_page_test.dart | 3 +- .../tos/cubit/onboarding_tos_cubit_test.dart | 3 +- .../tos/cubit/onboarding_tos_state_test.dart | 4 +- test/route/cubit/route_cubit_test.dart | 2 - test/route/router/router_test.dart | 4 +- test/scan/cubit/scan_cubit.dart | 2 +- test/splash/cubit/splash_cubit_test.dart | 2 - test/theme/app_theme_test.dart | 60 +- 45 files changed, 953 insertions(+), 552 deletions(-) delete mode 100644 test/app/shared/extension/unit8List_extension_test.dart diff --git a/lib/app/shared/extension/extension.dart b/lib/app/shared/extension/extension.dart index c8a08d0ed..dc5db6f25 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 'unit8list_extension.dart'; diff --git a/lib/app/shared/widget/button/my_elevated_button.dart b/lib/app/shared/widget/button/my_elevated_button.dart index 9e58c6ed0..62155f4f2 100644 --- a/lib/app/shared/widget/button/my_elevated_button.dart +++ b/lib/app/shared/widget/button/my_elevated_button.dart @@ -90,16 +90,16 @@ ButtonStyle elevatedStyleFrom({ GestureTapCallback? onPressed, }) { return ButtonStyle( - elevation: MaterialStateProperty.all(elevation), - padding: MaterialStateProperty.all( + elevation: WidgetStateProperty.all(elevation), + padding: WidgetStateProperty.all( EdgeInsets.symmetric(vertical: verticalSpacing), ), - backgroundColor: MaterialStateProperty.all( + backgroundColor: WidgetStateProperty.all( onPressed == null ? Theme.of(context).colorScheme.disabledBgColor : backgroundColor ?? Theme.of(context).colorScheme.primary, ), - shape: MaterialStateProperty.all( + shape: WidgetStateProperty.all( RoundedRectangleBorder( borderRadius: BorderRadius.circular(borderRadius), ), diff --git a/lib/app/shared/widget/checkbox_item.dart b/lib/app/shared/widget/checkbox_item.dart index d9cf52f36..52f263264 100644 --- a/lib/app/shared/widget/checkbox_item.dart +++ b/lib/app/shared/widget/checkbox_item.dart @@ -26,7 +26,7 @@ class CheckboxItem extends StatelessWidget { children: [ Checkbox( value: value, - fillColor: MaterialStateProperty.all( + fillColor: WidgetStateProperty.all( Theme.of(context).colorScheme.primary, ), shape: const RoundedRectangleBorder( 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 c1d1cbf9a..8581cb2e1 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 @@ -34,7 +34,7 @@ class CryptoAccountItem extends StatelessWidget { horizontalTitleGap: 0, leading: Checkbox( value: isSelected, - fillColor: MaterialStateProperty.all( + fillColor: WidgetStateProperty.all( Theme.of(context).colorScheme.inversePrimary, ), checkColor: Theme.of(context).colorScheme.primary, diff --git a/lib/dashboard/drawer/advance_settings/widgets/advance_settings_radio_item.dart b/lib/dashboard/drawer/advance_settings/widgets/advance_settings_radio_item.dart index bafa0c81b..4b1e1ec1d 100644 --- a/lib/dashboard/drawer/advance_settings/widgets/advance_settings_radio_item.dart +++ b/lib/dashboard/drawer/advance_settings/widgets/advance_settings_radio_item.dart @@ -22,7 +22,7 @@ class AdvanceSettingsRadioItem extends StatelessWidget { horizontalTitleGap: 0, leading: Checkbox( value: isSelected, - fillColor: MaterialStateProperty.all( + fillColor: WidgetStateProperty.all( Theme.of(context).colorScheme.inversePrimary, ), checkColor: Theme.of(context).colorScheme.primary, 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 c92d0aa7c..231e6b652 100644 --- a/lib/dashboard/drawer/reset_wallet/view/reset_wallet_menu.dart +++ b/lib/dashboard/drawer/reset_wallet/view/reset_wallet_menu.dart @@ -1,10 +1,8 @@ import 'package:altme/app/app.dart'; -import 'package:altme/credentials/credentials.dart'; import 'package:altme/dashboard/dashboard.dart'; import 'package:altme/dashboard/drawer/reset_wallet/helper_functions/reset_wallet.dart'; import 'package:altme/l10n/l10n.dart'; import 'package:altme/theme/theme.dart'; -import 'package:altme/wallet/wallet.dart'; import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; diff --git a/lib/dashboard/home/tab_bar/tokens/widgets/select_box_account_item.dart b/lib/dashboard/home/tab_bar/tokens/widgets/select_box_account_item.dart index 354cab5f6..3df20e18c 100644 --- a/lib/dashboard/home/tab_bar/tokens/widgets/select_box_account_item.dart +++ b/lib/dashboard/home/tab_bar/tokens/widgets/select_box_account_item.dart @@ -32,7 +32,7 @@ class SelectBoxAccountItem extends StatelessWidget { horizontalTitleGap: 0, leading: Checkbox( value: isSelected, - fillColor: MaterialStateProperty.all( + fillColor: WidgetStateProperty.all( Theme.of(context).colorScheme.primary, ), checkColor: Theme.of(context).colorScheme.onPrimary, diff --git a/lib/dashboard/qr_code/qr_code_scan/view/qr_camera_view.dart b/lib/dashboard/qr_code/qr_code_scan/view/qr_camera_view.dart index 074c39ae5..e31e928a6 100644 --- a/lib/dashboard/qr_code/qr_code_scan/view/qr_camera_view.dart +++ b/lib/dashboard/qr_code/qr_code_scan/view/qr_camera_view.dart @@ -20,10 +20,11 @@ class QrCameraView extends StatefulWidget { }); final String title; - final Function(InputImage inputImage) onImage; + final dynamic Function(InputImage inputImage) onImage; final VoidCallback? onCameraFeedReady; final VoidCallback? onDetectorViewModeChanged; - final Function(CameraLensDirection direction)? onCameraLensDirectionChanged; + final dynamic Function(CameraLensDirection direction)? + onCameraLensDirectionChanged; final CameraLensDirection initialCameraLensDirection; @override @@ -34,7 +35,9 @@ class _QrCameraViewState extends State { static List _cameras = []; CameraController? _controller; int _cameraIndex = -1; + // ignore: unused_field double _currentZoomLevel = 1; + // ignore: unused_field double _minAvailableZoom = 1; // ignore: unused_field double _maxAvailableZoom = 1; diff --git a/lib/dashboard/select_network_fee_bottom_sheet/widgets/select_network_fee_item.dart b/lib/dashboard/select_network_fee_bottom_sheet/widgets/select_network_fee_item.dart index 06f45ce5a..059451b36 100644 --- a/lib/dashboard/select_network_fee_bottom_sheet/widgets/select_network_fee_item.dart +++ b/lib/dashboard/select_network_fee_bottom_sheet/widgets/select_network_fee_item.dart @@ -25,7 +25,7 @@ class SelectNetworkFeeItem extends StatelessWidget { horizontalTitleGap: 0, leading: Checkbox( value: isSelected, - fillColor: MaterialStateProperty.all( + fillColor: WidgetStateProperty.all( Theme.of(context).colorScheme.inversePrimary, ), checkColor: Theme.of(context).colorScheme.primary, diff --git a/lib/dashboard/src/view/dashboard_page.dart b/lib/dashboard/src/view/dashboard_page.dart index 6963197aa..d59d7496b 100644 --- a/lib/dashboard/src/view/dashboard_page.dart +++ b/lib/dashboard/src/view/dashboard_page.dart @@ -6,7 +6,6 @@ import 'package:altme/dashboard/dashboard.dart'; import 'package:altme/enterprise/cubit/enterprise_cubit.dart'; import 'package:altme/kyc_verification/kyc_verification.dart'; import 'package:altme/l10n/l10n.dart'; -import 'package:altme/splash/cubit/splash_cubit.dart'; import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; @@ -162,12 +161,12 @@ class _DashboardViewState extends State { .helpCenterOptions .displayChatSupport; - return WillPopScope( - onWillPop: () async { + return PopScope( + canPop: false, + onPopInvoked: (_) async { if (scaffoldKey.currentState!.isDrawerOpen) { Navigator.of(context).pop(); } - return false; }, child: BasePage( scrollView: false, diff --git a/lib/dashboard/user_pin/view/user_pin_page.dart b/lib/dashboard/user_pin/view/user_pin_page.dart index f0014052c..4fb31507c 100644 --- a/lib/dashboard/user_pin/view/user_pin_page.dart +++ b/lib/dashboard/user_pin/view/user_pin_page.dart @@ -37,8 +37,7 @@ class UserPinPage extends StatelessWidget { @override Widget build(BuildContext context) { return BlocProvider( - create: (context) => - PinCodeViewCubit(), + create: (context) => PinCodeViewCubit(), child: UserPinView( onCancel: onCancel, onProceed: onProceed, @@ -81,8 +80,8 @@ class _UserPinViewState extends State { final l10n = context.l10n; return BlocBuilder( builder: (context, state) { - return WillPopScope( - onWillPop: () async => false, + return PopScope( + canPop: false, child: BasePage( backgroundColor: Theme.of(context).colorScheme.background, scrollView: false, diff --git a/lib/onboarding/wallet_ready/view/wallet_ready_page.dart b/lib/onboarding/wallet_ready/view/wallet_ready_page.dart index 286491ed0..1e1190477 100644 --- a/lib/onboarding/wallet_ready/view/wallet_ready_page.dart +++ b/lib/onboarding/wallet_ready/view/wallet_ready_page.dart @@ -138,7 +138,7 @@ class _WalletReadyViewState extends State { scale: 1.3, child: Checkbox( value: state.isAgreeWithTerms, - fillColor: MaterialStateProperty.all( + fillColor: WidgetStateProperty.all( Theme.of(context).colorScheme.primary, ), materialTapTargetSize: diff --git a/lib/pin_code/cubit/pin_code_view_cubit.dart b/lib/pin_code/cubit/pin_code_view_cubit.dart index eeb77ed7c..db1d3cc9c 100644 --- a/lib/pin_code/cubit/pin_code_view_cubit.dart +++ b/lib/pin_code/cubit/pin_code_view_cubit.dart @@ -19,7 +19,7 @@ class PinCodeViewCubit extends Cubit { final loginAttemptCount = state.loginAttemptCount + 1; final loginAttemptsRemaining = totalPermitedLoginAttempt - state.loginAttemptCount - 1; - bool allowAction = true; + const allowAction = true; // if (loginAttemptCount >= totalPermitedLoginAttempt) { // allowAction = false; // _startLockTimer(); @@ -124,10 +124,12 @@ class PinCodeViewCubit extends Cubit { return; } } - emit(state.copyWith( - isPinCodeValid: true, - enteredPasscode: passCode, - )); + emit( + state.copyWith( + isPinCodeValid: true, + enteredPasscode: passCode, + ), + ); // on new pincode // void _onPasscodeEntered(String enteredPasscode) { diff --git a/lib/pin_code/view/confirm_pin_code_page.dart b/lib/pin_code/view/confirm_pin_code_page.dart index 9654197df..f67b2fc88 100644 --- a/lib/pin_code/view/confirm_pin_code_page.dart +++ b/lib/pin_code/view/confirm_pin_code_page.dart @@ -88,17 +88,17 @@ class _ConfirmPinCodeViewState extends State { backgroundColor: Theme.of(context).colorScheme.background, body: PinCodeWidget( title: l10n.confirmYourPinCode, - header: widget.isFromOnboarding - ? MStepper( - step: 1, - totalStep: byPassScreen ? 2 : 3, - ) - : null, - deleteButton: Text( - l10n.delete, - style: Theme.of(context).textTheme.labelLarge, - ), - cancelButton: Text( + header: widget.isFromOnboarding + ? MStepper( + step: 1, + totalStep: byPassScreen ? 2 : 3, + ) + : null, + deleteButton: Text( + l10n.delete, + style: Theme.of(context).textTheme.labelLarge, + ), + cancelButton: Text( l10n.cancel, style: Theme.of(context).textTheme.labelLarge, ), diff --git a/lib/pin_code/view/delete_my_wallet_page.dart b/lib/pin_code/view/delete_my_wallet_page.dart index e18555bc7..ad2e67d74 100644 --- a/lib/pin_code/view/delete_my_wallet_page.dart +++ b/lib/pin_code/view/delete_my_wallet_page.dart @@ -1,11 +1,9 @@ import 'package:altme/app/shared/constants/image_strings.dart'; import 'package:altme/app/shared/constants/sizes.dart'; import 'package:altme/app/shared/widget/widget.dart'; -import 'package:altme/credentials/cubit/credentials_cubit.dart'; import 'package:altme/dashboard/drawer/reset_wallet/helper_functions/reset_wallet.dart'; import 'package:altme/l10n/l10n.dart'; import 'package:flutter/material.dart'; -import 'package:flutter_bloc/flutter_bloc.dart'; class DeleteMyWalletPage extends StatelessWidget { const DeleteMyWalletPage({super.key}); diff --git a/lib/pin_code/view/pin_code_page.dart b/lib/pin_code/view/pin_code_page.dart index 391b97a3e..fa3676f4d 100644 --- a/lib/pin_code/view/pin_code_page.dart +++ b/lib/pin_code/view/pin_code_page.dart @@ -1,4 +1,3 @@ - import 'package:altme/app/app.dart'; import 'package:altme/l10n/l10n.dart'; import 'package:altme/pin_code/pin_code.dart'; @@ -82,8 +81,8 @@ class _PinCodeViewState extends State { @override Widget build(BuildContext context) { final l10n = context.l10n; - return WillPopScope( - onWillPop: () async => !widget.restrictToBack, + return PopScope( + canPop: !widget.restrictToBack, child: BasePage( backgroundColor: Theme.of(context).colorScheme.background, title: '', diff --git a/packages/secure_jwt_signer/test/src/secure_jwt_signer_test.dart b/packages/secure_jwt_signer/test/src/secure_jwt_signer_test.dart index 1fc327786..1733de055 100644 --- a/packages/secure_jwt_signer/test/src/secure_jwt_signer_test.dart +++ b/packages/secure_jwt_signer/test/src/secure_jwt_signer_test.dart @@ -1,13 +1,10 @@ -// ignore_for_file: prefer_const_constructors -import 'dart:convert'; - import 'package:secure_jwt_signer/secure_jwt_signer.dart'; import 'package:test/test.dart'; void main() { group('SecureJwtSigner', () { test('can be instantiated', () { - expect(SecureJwtSigner(), isNotNull); + expect(const SecureJwtSigner(), isNotNull); }); }); } diff --git a/test/app/shared/enum/credential_category_test.dart b/test/app/shared/enum/credential_category_test.dart index 32a64652d..58e99e8d7 100644 --- a/test/app/shared/enum/credential_category_test.dart +++ b/test/app/shared/enum/credential_category_test.dart @@ -4,68 +4,116 @@ import 'package:flutter_test/flutter_test.dart'; import 'package:mockito/mockito.dart'; class MockAppLocalizations extends Mock implements AppLocalizations { + @override final my = 'My'; + @override final get = 'Get'; - + @override final advantagesCards = 'A1'; + @override final advantagesCredentialHomeSubtitle = 'A2'; + @override final advantagesDiscoverCards = 'A3'; + @override final advantagesCredentialDiscoverSubtitle = 'A4'; - + @override final identityCards = 'A1'; + @override final identityCredentialHomeSubtitle = 'A2'; + @override final identityDiscoverCards = 'A3'; + @override final identityCredentialDiscoverSubtitle = 'A4'; + @override final myProfessionalCards = 'A1'; + @override final myProfessionalrCardsSubtitle = 'A2'; + @override final myProfessionalCredentialDiscoverSubtitle = 'A3'; + @override final contactInfoCredentials = 'A1'; + @override final contactInfoCredentialHomeSubtitle = 'A2'; + @override final contactInfoDiscoverCredentials = 'A3'; + @override final contactInfoCredentialDiscoverSubtitle = 'A4'; + @override final blockchainAccounts = 'A1'; + @override final blockchainAccountsCredentialHomeSubtitle = 'A2'; + @override final blockchainCardsDiscoverTitle = 'A3'; + @override final blockchainCardsDiscoverSubtitle = 'A4'; + @override final educationCredentials = 'A1'; + @override final educationCredentialHomeSubtitle = 'A2'; + @override final educationDiscoverCredentials = 'A3'; + @override final educationCredentialsDiscoverSubtitle = 'A4'; + @override final otherCards = 'A1'; + @override final otherCredentialHomeSubtitle = 'A2'; + @override final otherCredentialDiscoverSubtitle = 'A4'; + @override final financeCredentialsHomeTitle = 'A1'; + @override final financeCredentialsHomeSubtitle = 'A2'; + @override final financeCredentialsDiscoverTitle = 'A3'; + @override final financeCredentialsDiscoverSubtitle = 'A4'; + @override final hummanityProofCredentialsHomeTitle = 'A1'; + @override final hummanityProofCredentialsHomeSubtitle = 'A2'; + @override final hummanityProofCredentialsDiscoverTitle = 'A3'; + @override final hummanityProofCredentialsDiscoverSubtitle = 'A4'; + @override final socialMediaCredentialsHomeTitle = 'A1'; + @override final socialMediaCredentialsHomeSubtitle = 'A2'; + @override final socialMediaCredentialsDiscoverTitle = 'A3'; + @override final socialMediaCredentialsDiscoverSubtitle = 'A4'; + @override final walletIntegrityCredentialsHomeTitle = 'A1'; + @override final walletIntegrityCredentialsHomeSubtitle = 'A2'; + @override final walletIntegrityCredentialsDiscoverTitle = 'A3'; + @override final walletIntegrityCredentialsDiscoverSubtitle = 'A4'; + @override final polygonCredentialsHomeTitle = 'A1'; + @override final polygonCredentialsHomeSubtitle = 'A2'; + @override final polygonCredentialsDiscoverTitle = 'A3'; + @override final polygonCredentialsDiscoverSubtitle = 'A4'; + @override final pendingCredentialsHomeTitle = 'A1'; + @override final pendingCredentialsHomeSubtitle = 'A2'; } @@ -113,15 +161,21 @@ void main() { expect(CredentialCategory.identityCards.showInHomeIfListEmpty, true); expect(CredentialCategory.professionalCards.showInHomeIfListEmpty, false); expect(CredentialCategory.advantagesCards.showInHomeIfListEmpty, false); - expect(CredentialCategory.contactInfoCredentials.showInHomeIfListEmpty, - false); - expect(CredentialCategory.blockchainAccountsCards.showInHomeIfListEmpty, - false); + expect( + CredentialCategory.contactInfoCredentials.showInHomeIfListEmpty, + false, + ); + expect( + CredentialCategory.blockchainAccountsCards.showInHomeIfListEmpty, + false, + ); expect(CredentialCategory.educationCards.showInHomeIfListEmpty, false); expect(CredentialCategory.othersCards.showInHomeIfListEmpty, false); expect(CredentialCategory.financeCards.showInHomeIfListEmpty, false); expect( - CredentialCategory.humanityProofCards.showInHomeIfListEmpty, false); + CredentialCategory.humanityProofCards.showInHomeIfListEmpty, + false, + ); expect(CredentialCategory.socialMediaCards.showInHomeIfListEmpty, false); expect(CredentialCategory.walletIntegrity.showInHomeIfListEmpty, false); expect(CredentialCategory.polygonidCards.showInHomeIfListEmpty, false); diff --git a/test/app/shared/enum/credential_subject_type/credential_subject_type_extension_test.dart b/test/app/shared/enum/credential_subject_type/credential_subject_type_extension_test.dart index df2f5615d..b01c5937b 100644 --- a/test/app/shared/enum/credential_subject_type/credential_subject_type_extension_test.dart +++ b/test/app/shared/enum/credential_subject_type/credential_subject_type_extension_test.dart @@ -24,10 +24,14 @@ void main() { ); for (final value in CredentialSubjectType.values) { - expect(value.backgroundColor(credentialModel), - equals(const Color(0xFFFFFFFF))); - expect(value.backgroundColor(credentialModel2), - equals(value.defaultBackgroundColor)); + expect( + value.backgroundColor(credentialModel), + equals(const Color(0xFFFFFFFF)), + ); + expect( + value.backgroundColor(credentialModel2), + equals(value.defaultBackgroundColor), + ); } }); @@ -338,102 +342,174 @@ void main() { test('CredentialSubjectType name returns correct value', () { expect( - CredentialSubjectType.defiCompliance.name, equals('DefiCompliance')); + CredentialSubjectType.defiCompliance.name, + equals('DefiCompliance'), + ); expect(CredentialSubjectType.livenessCard.name, equals('Liveness')); - expect(CredentialSubjectType.tezotopiaMembership.name, - equals('MembershipCard_1')); - expect(CredentialSubjectType.chainbornMembership.name, - equals('Chainborn_MembershipCard')); - expect(CredentialSubjectType.twitterCard.name, - equals('TwitterAccountProof')); + expect( + CredentialSubjectType.tezotopiaMembership.name, + equals('MembershipCard_1'), + ); + expect( + CredentialSubjectType.chainbornMembership.name, + equals('Chainborn_MembershipCard'), + ); + expect( + CredentialSubjectType.twitterCard.name, + equals('TwitterAccountProof'), + ); expect(CredentialSubjectType.ageRange.name, equals('AgeRange')); expect(CredentialSubjectType.nationality.name, equals('Nationality')); expect(CredentialSubjectType.gender.name, equals('Gender')); - expect(CredentialSubjectType.walletCredential.name, - equals('WalletCredential')); - expect(CredentialSubjectType.tezosAssociatedWallet.name, - equals('TezosAssociatedAddress')); - expect(CredentialSubjectType.ethereumAssociatedWallet.name, - equals('EthereumAssociatedAddress')); - expect(CredentialSubjectType.fantomAssociatedWallet.name, - equals('FantomAssociatedAddress')); - expect(CredentialSubjectType.polygonAssociatedWallet.name, - equals('PolygonAssociatedAddress')); - expect(CredentialSubjectType.binanceAssociatedWallet.name, - equals('BinanceAssociatedAddress')); - expect(CredentialSubjectType.ethereumPooAddress.name, - equals('EthereumPooAddress')); - expect(CredentialSubjectType.fantomPooAddress.name, - equals('FantomPooAddress')); - expect(CredentialSubjectType.polygonPooAddress.name, - equals('PolygonPooAddress')); - expect(CredentialSubjectType.binancePooAddress.name, - equals('BinancePooAddress')); - expect(CredentialSubjectType.tezosPooAddress.name, - equals('TezosPooAddress')); - expect(CredentialSubjectType.certificateOfEmployment.name, - equals('CertificateOfEmployment')); + expect( + CredentialSubjectType.walletCredential.name, + equals('WalletCredential'), + ); + expect( + CredentialSubjectType.tezosAssociatedWallet.name, + equals('TezosAssociatedAddress'), + ); + expect( + CredentialSubjectType.ethereumAssociatedWallet.name, + equals('EthereumAssociatedAddress'), + ); + expect( + CredentialSubjectType.fantomAssociatedWallet.name, + equals('FantomAssociatedAddress'), + ); + expect( + CredentialSubjectType.polygonAssociatedWallet.name, + equals('PolygonAssociatedAddress'), + ); + expect( + CredentialSubjectType.binanceAssociatedWallet.name, + equals('BinanceAssociatedAddress'), + ); + expect( + CredentialSubjectType.ethereumPooAddress.name, + equals('EthereumPooAddress'), + ); + expect( + CredentialSubjectType.fantomPooAddress.name, + equals('FantomPooAddress'), + ); + expect( + CredentialSubjectType.polygonPooAddress.name, + equals('PolygonPooAddress'), + ); + expect( + CredentialSubjectType.binancePooAddress.name, + equals('BinancePooAddress'), + ); + expect( + CredentialSubjectType.tezosPooAddress.name, + equals('TezosPooAddress'), + ); + expect( + CredentialSubjectType.certificateOfEmployment.name, + equals('CertificateOfEmployment'), + ); expect(CredentialSubjectType.emailPass.name, equals('EmailPass')); expect(CredentialSubjectType.identityPass.name, equals('IdentityPass')); expect( - CredentialSubjectType.verifiableIdCard.name, equals('VerifiableId')); + CredentialSubjectType.verifiableIdCard.name, + equals('VerifiableId'), + ); expect(CredentialSubjectType.linkedInCard.name, equals('LinkedinCard')); - expect(CredentialSubjectType.learningAchievement.name, - equals('LearningAchievement')); + expect( + CredentialSubjectType.learningAchievement.name, + equals('LearningAchievement'), + ); expect(CredentialSubjectType.over13.name, equals('Over13')); expect(CredentialSubjectType.over15.name, equals('Over15')); expect(CredentialSubjectType.over18.name, equals('Over18')); expect(CredentialSubjectType.over21.name, equals('Over21')); expect(CredentialSubjectType.over50.name, equals('Over50')); expect(CredentialSubjectType.over65.name, equals('Over65')); - expect(CredentialSubjectType.passportFootprint.name, - equals('PassportNumber')); + expect( + CredentialSubjectType.passportFootprint.name, + equals('PassportNumber'), + ); expect(CredentialSubjectType.phonePass.name, equals('PhoneProof')); - expect(CredentialSubjectType.professionalExperienceAssessment.name, - equals('ProfessionalExperienceAssessment')); - expect(CredentialSubjectType.professionalSkillAssessment.name, - equals('ProfessionalSkillAssessment')); - expect(CredentialSubjectType.professionalStudentCard.name, - equals('ProfessionalStudentCard')); + expect( + CredentialSubjectType.professionalExperienceAssessment.name, + equals('ProfessionalExperienceAssessment'), + ); + expect( + CredentialSubjectType.professionalSkillAssessment.name, + equals('ProfessionalSkillAssessment'), + ); + expect( + CredentialSubjectType.professionalStudentCard.name, + equals('ProfessionalStudentCard'), + ); expect(CredentialSubjectType.residentCard.name, equals('ResidentCard')); - expect(CredentialSubjectType.employeeCredential.name, - equals('EmployeeCredential')); - expect(CredentialSubjectType.legalPersonalCredential.name, - equals('LegalPersonCredential')); + expect( + CredentialSubjectType.employeeCredential.name, + equals('EmployeeCredential'), + ); + expect( + CredentialSubjectType.legalPersonalCredential.name, + equals('LegalPersonCredential'), + ); expect(CredentialSubjectType.selfIssued.name, equals('SelfIssued')); expect(CredentialSubjectType.studentCard.name, equals('StudentCard')); expect(CredentialSubjectType.voucher.name, equals('Voucher')); expect(CredentialSubjectType.tezVoucher.name, equals('TezVoucher_1')); expect( - CredentialSubjectType.diplomaCard.name, equals('VerifiableDiploma')); + CredentialSubjectType.diplomaCard.name, + equals('VerifiableDiploma'), + ); expect(CredentialSubjectType.aragoPass.name, equals('AragoPass')); expect( - CredentialSubjectType.aragoEmailPass.name, equals('AragoEmailPass')); + CredentialSubjectType.aragoEmailPass.name, + equals('AragoEmailPass'), + ); + expect( + CredentialSubjectType.aragoIdentityCard.name, + equals('AragoIdCard'), + ); expect( - CredentialSubjectType.aragoIdentityCard.name, equals('AragoIdCard')); - expect(CredentialSubjectType.aragoLearningAchievement.name, - equals('AragoLearningAchievement')); + CredentialSubjectType.aragoLearningAchievement.name, + equals('AragoLearningAchievement'), + ); expect(CredentialSubjectType.aragoOver18.name, equals('AragoOver18')); - expect(CredentialSubjectType.pcdsAgentCertificate.name, - equals('PCDSAgentCertificate')); - expect( - CredentialSubjectType.euDiplomaCard.name, - equals( - 'https://api.preprod.ebsi.eu/trusted-schemas-registry/v1/schemas/0xbf78fc08a7a9f28f5479f58dea269d3657f54f13ca37d380cd4e92237fb691dd')); - expect( - CredentialSubjectType.euVerifiableId.name, - equals( - 'https://api-conformance.ebsi.eu/trusted-schemas-registry/v2/schemas/z22ZAMdQtNLwi51T2vdZXGGZaYyjrsuP1yzWyXZirCAHv')); - expect(CredentialSubjectType.kycAgeCredential.name, - equals('KYCAgeCredential')); - expect(CredentialSubjectType.kycCountryOfResidence.name, - equals('KYCCountryOfResidenceCredential')); - expect(CredentialSubjectType.proofOfTwitterStats.name, - equals('ProofOfTwitterStats')); - expect(CredentialSubjectType.civicPassCredential.name, - equals('CivicPassCredential')); - expect(CredentialSubjectType.identityCredential.name, - equals('IdentityCredential')); + expect( + CredentialSubjectType.pcdsAgentCertificate.name, + equals('PCDSAgentCertificate'), + ); + expect( + CredentialSubjectType.euDiplomaCard.name, + equals( + 'https://api.preprod.ebsi.eu/trusted-schemas-registry/v1/schemas/0xbf78fc08a7a9f28f5479f58dea269d3657f54f13ca37d380cd4e92237fb691dd', + ), + ); + expect( + CredentialSubjectType.euVerifiableId.name, + equals( + 'https://api-conformance.ebsi.eu/trusted-schemas-registry/v2/schemas/z22ZAMdQtNLwi51T2vdZXGGZaYyjrsuP1yzWyXZirCAHv', + ), + ); + expect( + CredentialSubjectType.kycAgeCredential.name, + equals('KYCAgeCredential'), + ); + expect( + CredentialSubjectType.kycCountryOfResidence.name, + equals('KYCCountryOfResidenceCredential'), + ); + expect( + CredentialSubjectType.proofOfTwitterStats.name, + equals('ProofOfTwitterStats'), + ); + expect( + CredentialSubjectType.civicPassCredential.name, + equals('CivicPassCredential'), + ); + expect( + CredentialSubjectType.identityCredential.name, + equals('IdentityCredential'), + ); expect(CredentialSubjectType.eudiPid.name, equals('EudiPid')); expect(CredentialSubjectType.pid.name, equals('Pid')); expect(CredentialSubjectType.defaultCredential.name, equals('')); @@ -567,7 +643,9 @@ void main() { expect(value.blockchainWidget, isA()); } else if (value == CredentialSubjectType.ethereumAssociatedWallet) { expect( - value.blockchainWidget, isA()); + value.blockchainWidget, + isA(), + ); } else if (value == CredentialSubjectType.polygonAssociatedWallet) { expect(value.blockchainWidget, isA()); } else if (value == CredentialSubjectType.binanceAssociatedWallet) { @@ -584,40 +662,64 @@ void main() { expect(CredentialSubjectType.defiCompliance.title, 'Defi Compliance'); expect(CredentialSubjectType.livenessCard.title, 'Liveness'); expect( - CredentialSubjectType.tezotopiaMembership.title, 'Membership Card'); + CredentialSubjectType.tezotopiaMembership.title, + 'Membership Card', + ); expect(CredentialSubjectType.chainbornMembership.title, 'Chainborn'); expect(CredentialSubjectType.twitterCard.title, 'Twitter Account Proof'); expect(CredentialSubjectType.ageRange.title, 'Age Range'); expect(CredentialSubjectType.nationality.title, 'Nationality'); expect(CredentialSubjectType.gender.title, 'Gender'); expect(CredentialSubjectType.walletCredential.title, 'Wallet Credential'); - expect(CredentialSubjectType.tezosAssociatedWallet.title, - 'Tezos Associated Address'); - expect(CredentialSubjectType.ethereumAssociatedWallet.title, - 'Ethereum Associated Address'); - expect(CredentialSubjectType.fantomAssociatedWallet.title, - 'Fantom Associated Address'); - expect(CredentialSubjectType.polygonAssociatedWallet.title, - 'Polygon Associated Address'); - expect(CredentialSubjectType.binanceAssociatedWallet.title, - 'BNB Chain Associated Address'); - expect(CredentialSubjectType.ethereumPooAddress.title, - 'Ethereum Poo Address'); - expect( - CredentialSubjectType.fantomPooAddress.title, 'Fantom Poo Address'); - expect( - CredentialSubjectType.polygonPooAddress.title, 'Polygon Poo Address'); - expect(CredentialSubjectType.binancePooAddress.title, - 'BNB Chain Poo Address'); + expect( + CredentialSubjectType.tezosAssociatedWallet.title, + 'Tezos Associated Address', + ); + expect( + CredentialSubjectType.ethereumAssociatedWallet.title, + 'Ethereum Associated Address', + ); + expect( + CredentialSubjectType.fantomAssociatedWallet.title, + 'Fantom Associated Address', + ); + expect( + CredentialSubjectType.polygonAssociatedWallet.title, + 'Polygon Associated Address', + ); + expect( + CredentialSubjectType.binanceAssociatedWallet.title, + 'BNB Chain Associated Address', + ); + expect( + CredentialSubjectType.ethereumPooAddress.title, + 'Ethereum Poo Address', + ); + expect( + CredentialSubjectType.fantomPooAddress.title, + 'Fantom Poo Address', + ); + expect( + CredentialSubjectType.polygonPooAddress.title, + 'Polygon Poo Address', + ); + expect( + CredentialSubjectType.binancePooAddress.title, + 'BNB Chain Poo Address', + ); expect(CredentialSubjectType.tezosPooAddress.title, 'Tezos Poo Address'); - expect(CredentialSubjectType.certificateOfEmployment.title, - 'Certificate of Employment'); + expect( + CredentialSubjectType.certificateOfEmployment.title, + 'Certificate of Employment', + ); expect(CredentialSubjectType.emailPass.title, 'Email Pass'); expect(CredentialSubjectType.identityPass.title, 'Identity Pass'); expect(CredentialSubjectType.verifiableIdCard.title, 'VerifiableId'); expect(CredentialSubjectType.linkedInCard.title, 'Linkedin Card'); - expect(CredentialSubjectType.learningAchievement.title, - 'Learning Achievement'); + expect( + CredentialSubjectType.learningAchievement.title, + 'Learning Achievement', + ); expect(CredentialSubjectType.over13.title, 'Over13'); expect(CredentialSubjectType.over15.title, 'Over15'); expect(CredentialSubjectType.over18.title, 'Over18'); @@ -626,12 +728,18 @@ void main() { expect(CredentialSubjectType.over65.title, 'Over18'); expect(CredentialSubjectType.passportFootprint.title, 'Passport Number'); expect(CredentialSubjectType.phonePass.title, 'Phone Proof'); - expect(CredentialSubjectType.professionalExperienceAssessment.title, - 'Professional Experience Assessment'); - expect(CredentialSubjectType.professionalSkillAssessment.title, - 'Professional Skill Assessment'); - expect(CredentialSubjectType.professionalStudentCard.title, - 'Professional Student Card'); + expect( + CredentialSubjectType.professionalExperienceAssessment.title, + 'Professional Experience Assessment', + ); + expect( + CredentialSubjectType.professionalSkillAssessment.title, + 'Professional Skill Assessment', + ); + expect( + CredentialSubjectType.professionalStudentCard.title, + 'Professional Student Card', + ); expect(CredentialSubjectType.residentCard.title, 'Resident Card'); expect(CredentialSubjectType.selfIssued.title, 'Self Issued'); expect(CredentialSubjectType.studentCard.title, 'Student Card'); @@ -641,27 +749,45 @@ void main() { expect(CredentialSubjectType.aragoPass.title, 'Arago Pass'); expect(CredentialSubjectType.aragoEmailPass.title, 'Arago Email Pass'); expect(CredentialSubjectType.aragoIdentityCard.title, 'Arago Id Card'); - expect(CredentialSubjectType.aragoLearningAchievement.title, - 'Arago Learning Achievement'); + expect( + CredentialSubjectType.aragoLearningAchievement.title, + 'Arago Learning Achievement', + ); expect(CredentialSubjectType.aragoOver18.title, 'Arago Over18'); - expect(CredentialSubjectType.pcdsAgentCertificate.title, - 'PCDS Agent Certificate'); + expect( + CredentialSubjectType.pcdsAgentCertificate.title, + 'PCDS Agent Certificate', + ); expect(CredentialSubjectType.euDiplomaCard.title, 'EU Diploma'); expect(CredentialSubjectType.euVerifiableId.title, 'EU VerifiableID'); expect( - CredentialSubjectType.kycAgeCredential.title, 'KYC Age Credential'); - expect(CredentialSubjectType.kycCountryOfResidence.title, - 'KYC Country of Residence'); - expect(CredentialSubjectType.proofOfTwitterStats.title, - 'Proof Of Twitter Stats'); - expect(CredentialSubjectType.civicPassCredential.title, - 'Civic Pass Credential'); - expect(CredentialSubjectType.employeeCredential.title, - 'Employee Credential'); - expect(CredentialSubjectType.legalPersonalCredential.title, - 'Legal Person Credential'); - expect(CredentialSubjectType.identityCredential.title, - 'Identity Credential'); + CredentialSubjectType.kycAgeCredential.title, + 'KYC Age Credential', + ); + expect( + CredentialSubjectType.kycCountryOfResidence.title, + 'KYC Country of Residence', + ); + expect( + CredentialSubjectType.proofOfTwitterStats.title, + 'Proof Of Twitter Stats', + ); + expect( + CredentialSubjectType.civicPassCredential.title, + 'Civic Pass Credential', + ); + expect( + CredentialSubjectType.employeeCredential.title, + 'Employee Credential', + ); + expect( + CredentialSubjectType.legalPersonalCredential.title, + 'Legal Person Credential', + ); + expect( + CredentialSubjectType.identityCredential.title, + 'Identity Credential', + ); expect(CredentialSubjectType.eudiPid.title, 'EudiPid'); expect(CredentialSubjectType.pid.title, 'Pid'); expect(CredentialSubjectType.defaultCredential.title, ''); @@ -690,15 +816,25 @@ void main() { expect(CredentialSubjectType.diplomaCard.supportSingleOnly, true); expect(CredentialSubjectType.twitterCard.supportSingleOnly, true); expect( - CredentialSubjectType.tezosAssociatedWallet.supportSingleOnly, true); - expect(CredentialSubjectType.ethereumAssociatedWallet.supportSingleOnly, - true); + CredentialSubjectType.tezosAssociatedWallet.supportSingleOnly, + true, + ); expect( - CredentialSubjectType.fantomAssociatedWallet.supportSingleOnly, true); - expect(CredentialSubjectType.polygonAssociatedWallet.supportSingleOnly, - true); - expect(CredentialSubjectType.binanceAssociatedWallet.supportSingleOnly, - true); + CredentialSubjectType.ethereumAssociatedWallet.supportSingleOnly, + true, + ); + expect( + CredentialSubjectType.fantomAssociatedWallet.supportSingleOnly, + true, + ); + expect( + CredentialSubjectType.polygonAssociatedWallet.supportSingleOnly, + true, + ); + expect( + CredentialSubjectType.binanceAssociatedWallet.supportSingleOnly, + true, + ); expect(CredentialSubjectType.walletCredential.supportSingleOnly, false); expect(CredentialSubjectType.tezosPooAddress.supportSingleOnly, false); @@ -706,82 +842,132 @@ void main() { expect(CredentialSubjectType.fantomPooAddress.supportSingleOnly, false); expect(CredentialSubjectType.polygonPooAddress.supportSingleOnly, false); expect(CredentialSubjectType.binancePooAddress.supportSingleOnly, false); - expect(CredentialSubjectType.certificateOfEmployment.supportSingleOnly, - false); + expect( + CredentialSubjectType.certificateOfEmployment.supportSingleOnly, + false, + ); expect(CredentialSubjectType.defaultCredential.supportSingleOnly, false); expect(CredentialSubjectType.emailPass.supportSingleOnly, false); expect(CredentialSubjectType.linkedInCard.supportSingleOnly, false); expect( - CredentialSubjectType.learningAchievement.supportSingleOnly, false); + CredentialSubjectType.learningAchievement.supportSingleOnly, + false, + ); expect(CredentialSubjectType.phonePass.supportSingleOnly, false); expect( - CredentialSubjectType - .professionalExperienceAssessment.supportSingleOnly, - false); + CredentialSubjectType + .professionalExperienceAssessment.supportSingleOnly, + false, + ); + expect( + CredentialSubjectType.professionalSkillAssessment.supportSingleOnly, + false, + ); expect( - CredentialSubjectType.professionalSkillAssessment.supportSingleOnly, - false); - expect(CredentialSubjectType.professionalStudentCard.supportSingleOnly, - false); + CredentialSubjectType.professionalStudentCard.supportSingleOnly, + false, + ); expect(CredentialSubjectType.selfIssued.supportSingleOnly, false); expect(CredentialSubjectType.studentCard.supportSingleOnly, false); expect(CredentialSubjectType.aragoPass.supportSingleOnly, false); expect(CredentialSubjectType.aragoEmailPass.supportSingleOnly, false); expect(CredentialSubjectType.aragoIdentityCard.supportSingleOnly, false); - expect(CredentialSubjectType.aragoLearningAchievement.supportSingleOnly, - false); + expect( + CredentialSubjectType.aragoLearningAchievement.supportSingleOnly, + false, + ); expect(CredentialSubjectType.aragoOver18.supportSingleOnly, false); expect( - CredentialSubjectType.pcdsAgentCertificate.supportSingleOnly, false); + CredentialSubjectType.pcdsAgentCertificate.supportSingleOnly, + false, + ); expect(CredentialSubjectType.euDiplomaCard.supportSingleOnly, false); expect(CredentialSubjectType.euVerifiableId.supportSingleOnly, false); expect(CredentialSubjectType.kycAgeCredential.supportSingleOnly, false); expect( - CredentialSubjectType.kycCountryOfResidence.supportSingleOnly, false); + CredentialSubjectType.kycCountryOfResidence.supportSingleOnly, + false, + ); expect( - CredentialSubjectType.proofOfTwitterStats.supportSingleOnly, false); + CredentialSubjectType.proofOfTwitterStats.supportSingleOnly, + false, + ); expect( - CredentialSubjectType.civicPassCredential.supportSingleOnly, false); + CredentialSubjectType.civicPassCredential.supportSingleOnly, + false, + ); expect(CredentialSubjectType.employeeCredential.supportSingleOnly, false); - expect(CredentialSubjectType.legalPersonalCredential.supportSingleOnly, - false); + expect( + CredentialSubjectType.legalPersonalCredential.supportSingleOnly, + false, + ); expect(CredentialSubjectType.identityCredential.supportSingleOnly, false); expect(CredentialSubjectType.eudiPid.supportSingleOnly, false); expect(CredentialSubjectType.pid.supportSingleOnly, false); }); test('CredentialSubjectType getVCFormatType returns correct value', () { - expect(CredentialSubjectType.ethereumAssociatedWallet.getVCFormatType, - VCFormatType.values); - expect(CredentialSubjectType.fantomAssociatedWallet.getVCFormatType, - VCFormatType.values); - expect(CredentialSubjectType.polygonAssociatedWallet.getVCFormatType, - VCFormatType.values); - expect(CredentialSubjectType.binanceAssociatedWallet.getVCFormatType, - VCFormatType.values); - expect(CredentialSubjectType.tezosAssociatedWallet.getVCFormatType, - VCFormatType.values); + expect( + CredentialSubjectType.ethereumAssociatedWallet.getVCFormatType, + VCFormatType.values, + ); + expect( + CredentialSubjectType.fantomAssociatedWallet.getVCFormatType, + VCFormatType.values, + ); + expect( + CredentialSubjectType.polygonAssociatedWallet.getVCFormatType, + VCFormatType.values, + ); + expect( + CredentialSubjectType.binanceAssociatedWallet.getVCFormatType, + VCFormatType.values, + ); + expect( + CredentialSubjectType.tezosAssociatedWallet.getVCFormatType, + VCFormatType.values, + ); expect( - CredentialSubjectType.over13.getVCFormatType, [VCFormatType.ldpVc]); + CredentialSubjectType.over13.getVCFormatType, + [VCFormatType.ldpVc], + ); + expect( + CredentialSubjectType.over15.getVCFormatType, + [VCFormatType.ldpVc], + ); + expect( + CredentialSubjectType.over21.getVCFormatType, + [VCFormatType.ldpVc], + ); + expect( + CredentialSubjectType.over50.getVCFormatType, + [VCFormatType.ldpVc], + ); expect( - CredentialSubjectType.over15.getVCFormatType, [VCFormatType.ldpVc]); + CredentialSubjectType.over65.getVCFormatType, + [VCFormatType.ldpVc], + ); expect( - CredentialSubjectType.over21.getVCFormatType, [VCFormatType.ldpVc]); + CredentialSubjectType.gender.getVCFormatType, + [VCFormatType.ldpVc], + ); expect( - CredentialSubjectType.over50.getVCFormatType, [VCFormatType.ldpVc]); + CredentialSubjectType.ageRange.getVCFormatType, + [VCFormatType.ldpVc], + ); expect( - CredentialSubjectType.over65.getVCFormatType, [VCFormatType.ldpVc]); + CredentialSubjectType.defiCompliance.getVCFormatType, + [VCFormatType.ldpVc], + ); expect( - CredentialSubjectType.gender.getVCFormatType, [VCFormatType.ldpVc]); + CredentialSubjectType.tezotopiaMembership.getVCFormatType, + [VCFormatType.ldpVc], + ); expect( - CredentialSubjectType.ageRange.getVCFormatType, [VCFormatType.ldpVc]); - expect(CredentialSubjectType.defiCompliance.getVCFormatType, - [VCFormatType.ldpVc]); - expect(CredentialSubjectType.tezotopiaMembership.getVCFormatType, - [VCFormatType.ldpVc]); - expect(CredentialSubjectType.chainbornMembership.getVCFormatType, - [VCFormatType.ldpVc]); + CredentialSubjectType.chainbornMembership.getVCFormatType, + [VCFormatType.ldpVc], + ); expect(CredentialSubjectType.verifiableIdCard.getVCFormatType, [ VCFormatType.ldpVc, @@ -790,10 +976,14 @@ void main() { VCFormatType.jwtVc, ]); - expect(CredentialSubjectType.identityCredential.getVCFormatType, - [VCFormatType.vcSdJWT]); - expect(CredentialSubjectType.eudiPid.getVCFormatType, - [VCFormatType.vcSdJWT]); + expect( + CredentialSubjectType.identityCredential.getVCFormatType, + [VCFormatType.vcSdJWT], + ); + expect( + CredentialSubjectType.eudiPid.getVCFormatType, + [VCFormatType.vcSdJWT], + ); expect(CredentialSubjectType.pid.getVCFormatType, [VCFormatType.vcSdJWT]); expect(CredentialSubjectType.over18.getVCFormatType, [ @@ -801,89 +991,167 @@ void main() { VCFormatType.jwtVcJson, ]); - expect(CredentialSubjectType.phonePass.getVCFormatType, - [VCFormatType.ldpVc, VCFormatType.jwtVcJson]); - expect(CredentialSubjectType.livenessCard.getVCFormatType, - [VCFormatType.ldpVc, VCFormatType.jwtVcJson]); - expect(CredentialSubjectType.emailPass.getVCFormatType, - [VCFormatType.ldpVc, VCFormatType.jwtVcJson]); - - expect(CredentialSubjectType.nationality.getVCFormatType, - [VCFormatType.jwtVc]); - expect(CredentialSubjectType.identityPass.getVCFormatType, - [VCFormatType.jwtVc]); - expect(CredentialSubjectType.passportFootprint.getVCFormatType, - [VCFormatType.jwtVc]); - expect(CredentialSubjectType.residentCard.getVCFormatType, - [VCFormatType.jwtVc]); - expect( - CredentialSubjectType.voucher.getVCFormatType, [VCFormatType.jwtVc]); - expect(CredentialSubjectType.tezVoucher.getVCFormatType, - [VCFormatType.jwtVc]); - expect(CredentialSubjectType.diplomaCard.getVCFormatType, - [VCFormatType.jwtVc]); - expect(CredentialSubjectType.twitterCard.getVCFormatType, - [VCFormatType.jwtVc]); - expect(CredentialSubjectType.walletCredential.getVCFormatType, - [VCFormatType.jwtVc]); - expect(CredentialSubjectType.tezosPooAddress.getVCFormatType, - [VCFormatType.jwtVc]); - expect(CredentialSubjectType.ethereumPooAddress.getVCFormatType, - [VCFormatType.jwtVc]); - expect(CredentialSubjectType.fantomPooAddress.getVCFormatType, - [VCFormatType.jwtVc]); - expect(CredentialSubjectType.polygonPooAddress.getVCFormatType, - [VCFormatType.jwtVc]); - expect(CredentialSubjectType.binancePooAddress.getVCFormatType, - [VCFormatType.jwtVc]); - expect(CredentialSubjectType.certificateOfEmployment.getVCFormatType, - [VCFormatType.jwtVc]); - expect(CredentialSubjectType.defaultCredential.getVCFormatType, - [VCFormatType.jwtVc]); - expect(CredentialSubjectType.linkedInCard.getVCFormatType, - [VCFormatType.jwtVc]); - expect(CredentialSubjectType.learningAchievement.getVCFormatType, - [VCFormatType.jwtVc]); - expect( - CredentialSubjectType - .professionalExperienceAssessment.getVCFormatType, - [VCFormatType.jwtVc]); - expect(CredentialSubjectType.professionalSkillAssessment.getVCFormatType, - [VCFormatType.jwtVc]); - expect(CredentialSubjectType.professionalStudentCard.getVCFormatType, - [VCFormatType.jwtVc]); - expect(CredentialSubjectType.selfIssued.getVCFormatType, - [VCFormatType.jwtVc]); - expect(CredentialSubjectType.studentCard.getVCFormatType, - [VCFormatType.jwtVc]); - expect(CredentialSubjectType.aragoPass.getVCFormatType, - [VCFormatType.jwtVc]); - expect(CredentialSubjectType.aragoEmailPass.getVCFormatType, - [VCFormatType.jwtVc]); - expect(CredentialSubjectType.aragoIdentityCard.getVCFormatType, - [VCFormatType.jwtVc]); - expect(CredentialSubjectType.aragoLearningAchievement.getVCFormatType, - [VCFormatType.jwtVc]); - expect(CredentialSubjectType.aragoOver18.getVCFormatType, - [VCFormatType.jwtVc]); - expect(CredentialSubjectType.pcdsAgentCertificate.getVCFormatType, - [VCFormatType.jwtVc]); - expect(CredentialSubjectType.euDiplomaCard.getVCFormatType, - [VCFormatType.jwtVc]); - expect(CredentialSubjectType.euVerifiableId.getVCFormatType, - [VCFormatType.jwtVc]); - expect(CredentialSubjectType.kycAgeCredential.getVCFormatType, - [VCFormatType.jwtVc]); - expect(CredentialSubjectType.kycCountryOfResidence.getVCFormatType, - [VCFormatType.jwtVc]); - expect(CredentialSubjectType.proofOfTwitterStats.getVCFormatType, - [VCFormatType.jwtVc]); - expect(CredentialSubjectType.civicPassCredential.getVCFormatType, - [VCFormatType.jwtVc]); - expect(CredentialSubjectType.employeeCredential.getVCFormatType, - [VCFormatType.jwtVc]); - expect(CredentialSubjectType.legalPersonalCredential.getVCFormatType, - [VCFormatType.jwtVc]); + expect( + CredentialSubjectType.phonePass.getVCFormatType, + [VCFormatType.ldpVc, VCFormatType.jwtVcJson], + ); + expect( + CredentialSubjectType.livenessCard.getVCFormatType, + [VCFormatType.ldpVc, VCFormatType.jwtVcJson], + ); + expect( + CredentialSubjectType.emailPass.getVCFormatType, + [VCFormatType.ldpVc, VCFormatType.jwtVcJson], + ); + + expect( + CredentialSubjectType.nationality.getVCFormatType, + [VCFormatType.jwtVc], + ); + expect( + CredentialSubjectType.identityPass.getVCFormatType, + [VCFormatType.jwtVc], + ); + expect( + CredentialSubjectType.passportFootprint.getVCFormatType, + [VCFormatType.jwtVc], + ); + expect( + CredentialSubjectType.residentCard.getVCFormatType, + [VCFormatType.jwtVc], + ); + expect( + CredentialSubjectType.voucher.getVCFormatType, + [VCFormatType.jwtVc], + ); + expect( + CredentialSubjectType.tezVoucher.getVCFormatType, + [VCFormatType.jwtVc], + ); + expect( + CredentialSubjectType.diplomaCard.getVCFormatType, + [VCFormatType.jwtVc], + ); + expect( + CredentialSubjectType.twitterCard.getVCFormatType, + [VCFormatType.jwtVc], + ); + expect( + CredentialSubjectType.walletCredential.getVCFormatType, + [VCFormatType.jwtVc], + ); + expect( + CredentialSubjectType.tezosPooAddress.getVCFormatType, + [VCFormatType.jwtVc], + ); + expect( + CredentialSubjectType.ethereumPooAddress.getVCFormatType, + [VCFormatType.jwtVc], + ); + expect( + CredentialSubjectType.fantomPooAddress.getVCFormatType, + [VCFormatType.jwtVc], + ); + expect( + CredentialSubjectType.polygonPooAddress.getVCFormatType, + [VCFormatType.jwtVc], + ); + expect( + CredentialSubjectType.binancePooAddress.getVCFormatType, + [VCFormatType.jwtVc], + ); + expect( + CredentialSubjectType.certificateOfEmployment.getVCFormatType, + [VCFormatType.jwtVc], + ); + expect( + CredentialSubjectType.defaultCredential.getVCFormatType, + [VCFormatType.jwtVc], + ); + expect( + CredentialSubjectType.linkedInCard.getVCFormatType, + [VCFormatType.jwtVc], + ); + expect( + CredentialSubjectType.learningAchievement.getVCFormatType, + [VCFormatType.jwtVc], + ); + expect( + CredentialSubjectType.professionalExperienceAssessment.getVCFormatType, + [VCFormatType.jwtVc], + ); + expect( + CredentialSubjectType.professionalSkillAssessment.getVCFormatType, + [VCFormatType.jwtVc], + ); + expect( + CredentialSubjectType.professionalStudentCard.getVCFormatType, + [VCFormatType.jwtVc], + ); + expect( + CredentialSubjectType.selfIssued.getVCFormatType, + [VCFormatType.jwtVc], + ); + expect( + CredentialSubjectType.studentCard.getVCFormatType, + [VCFormatType.jwtVc], + ); + expect( + CredentialSubjectType.aragoPass.getVCFormatType, + [VCFormatType.jwtVc], + ); + expect( + CredentialSubjectType.aragoEmailPass.getVCFormatType, + [VCFormatType.jwtVc], + ); + expect( + CredentialSubjectType.aragoIdentityCard.getVCFormatType, + [VCFormatType.jwtVc], + ); + expect( + CredentialSubjectType.aragoLearningAchievement.getVCFormatType, + [VCFormatType.jwtVc], + ); + expect( + CredentialSubjectType.aragoOver18.getVCFormatType, + [VCFormatType.jwtVc], + ); + expect( + CredentialSubjectType.pcdsAgentCertificate.getVCFormatType, + [VCFormatType.jwtVc], + ); + expect( + CredentialSubjectType.euDiplomaCard.getVCFormatType, + [VCFormatType.jwtVc], + ); + expect( + CredentialSubjectType.euVerifiableId.getVCFormatType, + [VCFormatType.jwtVc], + ); + expect( + CredentialSubjectType.kycAgeCredential.getVCFormatType, + [VCFormatType.jwtVc], + ); + expect( + CredentialSubjectType.kycCountryOfResidence.getVCFormatType, + [VCFormatType.jwtVc], + ); + expect( + CredentialSubjectType.proofOfTwitterStats.getVCFormatType, + [VCFormatType.jwtVc], + ); + expect( + CredentialSubjectType.civicPassCredential.getVCFormatType, + [VCFormatType.jwtVc], + ); + expect( + CredentialSubjectType.employeeCredential.getVCFormatType, + [VCFormatType.jwtVc], + ); + expect( + CredentialSubjectType.legalPersonalCredential.getVCFormatType, + [VCFormatType.jwtVc], + ); }); test('CredentialSubjectType order returns correct value', () { diff --git a/test/app/shared/enum/polygon_id_network_test.dart b/test/app/shared/enum/polygon_id_network_test.dart index 54f309b20..e69762883 100644 --- a/test/app/shared/enum/polygon_id_network_test.dart +++ b/test/app/shared/enum/polygon_id_network_test.dart @@ -15,7 +15,9 @@ void main() { test('oppositeNetwork should return correct opposite network', () { expect( - PolygonIdNetwork.PolygonMainnet.oppositeNetwork, 'mumbai(testnet)'); + PolygonIdNetwork.PolygonMainnet.oppositeNetwork, + 'mumbai(testnet)', + ); expect(PolygonIdNetwork.PolygonMumbai.oppositeNetwork, 'mainnet'); }); }); diff --git a/test/app/shared/enum/status/credential_status_extension_test.dart b/test/app/shared/enum/status/credential_status_extension_test.dart index 77fc84dd8..a7527a7e7 100644 --- a/test/app/shared/enum/status/credential_status_extension_test.dart +++ b/test/app/shared/enum/status/credential_status_extension_test.dart @@ -11,8 +11,10 @@ void main() { expect(CredentialStatus.pending.icon, Icons.circle_outlined); expect(CredentialStatus.unknown.icon, Icons.circle_outlined); expect(CredentialStatus.invalidSignature.icon, Icons.circle_outlined); - expect(CredentialStatus.statusListInvalidSignature.icon, - Icons.circle_outlined); + expect( + CredentialStatus.statusListInvalidSignature.icon, + Icons.circle_outlined, + ); expect(CredentialStatus.noStatus.icon, Icons.circle_outlined); }); }); diff --git a/test/app/shared/enum/type/language_type_test.dart b/test/app/shared/enum/type/language_type_test.dart index eaaa11216..3a85ac106 100644 --- a/test/app/shared/enum/type/language_type_test.dart +++ b/test/app/shared/enum/type/language_type_test.dart @@ -25,7 +25,9 @@ void main() { test('LanguageType getTitle returns correct value', () { final l10n = MockAppLocalizations(); expect( - LanguageType.phone.getTitle(l10n: l10n, name: ''), equals('Phone')); + LanguageType.phone.getTitle(l10n: l10n, name: ''), + equals('Phone'), + ); expect(LanguageType.ca.getTitle(l10n: l10n, name: ''), equals('Catalan')); expect(LanguageType.en.getTitle(l10n: l10n, name: ''), equals('English')); expect(LanguageType.es.getTitle(l10n: l10n, name: ''), equals('Spanish')); diff --git a/test/app/shared/extension/unit8List_extension_test.dart b/test/app/shared/extension/unit8List_extension_test.dart deleted file mode 100644 index 9effdc86f..000000000 --- a/test/app/shared/extension/unit8List_extension_test.dart +++ /dev/null @@ -1,40 +0,0 @@ -import 'dart:typed_data'; -import 'package:altme/app/app.dart'; -import 'package:flutter_test/flutter_test.dart'; - -void main() { - group('Uint8ListExtension', () { - test( - 'filterPayload returns the original list if length is less than or equal to 6', - () { - final list = Uint8List.fromList([1, 2, 3]); - expect(list.filterPayload, list); - - final shortList = Uint8List.fromList([1, 2, 3, 4, 5, 6]); - expect(shortList.filterPayload, shortList); - }); - - test( - 'filterPayload returns the original list if the first two elements do not match the test list', - () { - final list = Uint8List.fromList([1, 2, 3, 4, 5, 6, 7, 8, 9]); - expect(list.filterPayload, list); - - final differentFirstElement = - Uint8List.fromList([6, 1, 3, 4, 5, 6, 7, 8, 9]); - expect(differentFirstElement.filterPayload, differentFirstElement); - - final differentSecondElement = - Uint8List.fromList([5, 5, 3, 4, 5, 6, 7, 8, 9]); - expect(differentSecondElement.filterPayload, differentSecondElement); - }); - - test( - 'filterPayload returns a sublist starting from index 6 if the first two elements match the test list', - () { - final list = Uint8List.fromList([5, 1, 3, 4, 5, 6, 7, 8, 9]); - final expected = Uint8List.fromList([7, 8, 9]); - expect(list.filterPayload, expected); - }); - }); -} diff --git a/test/app/shared/extension/unit_8_list_extension_test.dart b/test/app/shared/extension/unit_8_list_extension_test.dart index e13d65fcb..2ff3c43eb 100644 --- a/test/app/shared/extension/unit_8_list_extension_test.dart +++ b/test/app/shared/extension/unit_8_list_extension_test.dart @@ -5,9 +5,8 @@ import 'package:flutter_test/flutter_test.dart'; void main() { group('Uint8ListExtension', () { test( - // ignore: lines_longer_than_80_chars - 'filterPayload returns the original list if length is less than or equal to 6', - () { + 'filterPayload returns the original list ' + 'if length is less than or equal to 6', () { final list = Uint8List.fromList([1, 2, 3]); expect(list.filterPayload, list); @@ -16,9 +15,8 @@ void main() { }); test( - // ignore: lines_longer_than_80_chars - 'filterPayload returns the original list if the first two elements do not match the test list', - () { + 'filterPayload returns the original list ' + 'if the first two elements do not match the test list', () { final list = Uint8List.fromList([1, 2, 3, 4, 5, 6, 7, 8, 9]); expect(list.filterPayload, list); @@ -32,9 +30,8 @@ void main() { }); test( - // ignore: lines_longer_than_80_chars - 'filterPayload returns a sublist starting from index 6 if the first two elements match the test list', - () { + 'filterPayload returns a sublist starting from index 6 ' + 'if the first two elements match the test list', () { final list = Uint8List.fromList([5, 1, 3, 4, 5, 6, 7, 8, 9]); final expected = Uint8List.fromList([7, 8, 9]); expect(list.filterPayload, expected); diff --git a/test/app/shared/helper_functions/helper_functions_test.dart b/test/app/shared/helper_functions/helper_functions_test.dart index d0b148260..d4b7764b9 100644 --- a/test/app/shared/helper_functions/helper_functions_test.dart +++ b/test/app/shared/helper_functions/helper_functions_test.dart @@ -1,3 +1,5 @@ +// ignore_for_file: lines_longer_than_80_chars + import 'dart:convert'; import 'package:altme/app/app.dart'; @@ -84,7 +86,8 @@ void main() { test('Should return last issuer DID if multiple issuers in URI', () { final uri = Uri.parse( - 'https://example.com?issuer=did:example1&issuer=did:example2',); + 'https://example.com?issuer=did:example1&issuer=did:example2', + ); expect(getIssuerDid(uriToCheck: uri), 'did:example2'); }); }); @@ -111,11 +114,12 @@ void main() { test('stringToHexPrefixedWith05 returns correct value', () { const payload = 'Bibash'; expect( - stringToHexPrefixedWith05( - payload: payload, - dateTime: DateTime(2022, 1, 1, 0, 0, 0, 0), - ), - '05010031323254657a6f73205369676e6564204d6573736167653a20616c746d652e696f20323032322d30312d30312030303a30303a30302e30303020426962617368',); + stringToHexPrefixedWith05( + payload: payload, + dateTime: DateTime(2022, 1, 1, 0, 0, 0, 0), + ), + '05010031323254657a6f73205369676e6564204d6573736167653a20616c746d652e696f20323032322d30312d30312030303a30303a30302e30303020426962617368', + ); }); test('getCredentialName returns correct credential name', () { @@ -148,17 +152,29 @@ void main() { test('getBlockchainType returns correct issuer name', () { expect( - getBlockchainType(AccountType.tezos), equals(BlockchainType.tezos),); - expect(getBlockchainType(AccountType.ethereum), - equals(BlockchainType.ethereum),); + getBlockchainType(AccountType.tezos), + equals(BlockchainType.tezos), + ); + expect( + getBlockchainType(AccountType.ethereum), + equals(BlockchainType.ethereum), + ); + expect( + getBlockchainType(AccountType.fantom), + equals(BlockchainType.fantom), + ); + expect( + getBlockchainType(AccountType.polygon), + equals(BlockchainType.polygon), + ); + expect( + getBlockchainType(AccountType.binance), + equals(BlockchainType.binance), + ); expect( - getBlockchainType(AccountType.fantom), equals(BlockchainType.fantom),); - expect(getBlockchainType(AccountType.polygon), - equals(BlockchainType.polygon),); - expect(getBlockchainType(AccountType.binance), - equals(BlockchainType.binance),); - expect(() => getBlockchainType(AccountType.ssi), - throwsA(isA()),); + () => getBlockchainType(AccountType.ssi), + throwsA(isA()), + ); }); test('getCredTypeFromName returns correct type', () { @@ -186,21 +202,22 @@ void main() { final result = await getssiMnemonicsInList(mockSecureStorage); expect( - result, - containsAll([ - 'word1', - 'word2', - 'word3', - 'word4', - 'word5', - 'word6', - 'word7', - 'word8', - 'word9', - 'word10', - 'word11', - 'word12', - ]),); + result, + containsAll([ + 'word1', + 'word2', + 'word3', + 'word4', + 'word5', + 'word6', + 'word7', + 'word8', + 'word9', + 'word10', + 'word11', + 'word12', + ]), + ); }); test('getDateTimeWithoutSpace replaces spaces with dashes', () { @@ -211,26 +228,34 @@ void main() { test('getIndexValue returns correct index for each DidKeyType', () { expect( - getIndexValue(isEBSIV3: true, didKeyType: DidKeyType.secp256k1), 3,); + getIndexValue(isEBSIV3: true, didKeyType: DidKeyType.secp256k1), + 3, + ); expect( - getIndexValue(isEBSIV3: false, didKeyType: DidKeyType.secp256k1), 1,); + getIndexValue(isEBSIV3: false, didKeyType: DidKeyType.secp256k1), + 1, + ); expect(getIndexValue(isEBSIV3: false, didKeyType: DidKeyType.p256), 4); expect(getIndexValue(isEBSIV3: false, didKeyType: DidKeyType.ebsiv3), 5); expect(getIndexValue(isEBSIV3: false, didKeyType: DidKeyType.jwkP256), 6); expect(getIndexValue(isEBSIV3: false, didKeyType: DidKeyType.edDSA), 0); expect( - getIndexValue( - isEBSIV3: false, didKeyType: DidKeyType.jwtClientAttestation,), - 0,); + getIndexValue( + isEBSIV3: false, + didKeyType: DidKeyType.jwtClientAttestation, + ), + 0, + ); }); group('getWalletAttestationP256Key', () { test('returns existing key', () async { const existingKey = 'existing_key'; - when(() => mockSecureStorage - .get(SecureStorageKeys.p256PrivateKeyForWallet),) - .thenAnswer((_) => Future.value(existingKey)); + when( + () => + mockSecureStorage.get(SecureStorageKeys.p256PrivateKeyForWallet), + ).thenAnswer((_) => Future.value(existingKey)); final result = await getWalletAttestationP256Key(mockSecureStorage); @@ -238,10 +263,10 @@ void main() { }); test('generates and returns new key', () async { - const newKey = 'new_key'; - when(() => mockSecureStorage - .get(SecureStorageKeys.p256PrivateKeyForWallet),) - .thenAnswer((_) => Future.value(null)); + when( + () => + mockSecureStorage.get(SecureStorageKeys.p256PrivateKeyForWallet), + ).thenAnswer((_) => Future.value(null)); when(() => mockSecureStorage.set(any(), any())) .thenAnswer((_) async {}); @@ -262,9 +287,10 @@ void main() { group('getP256KeyToGetAndPresentVC', () { test('returns existing key', () async { const existingKey = 'existing_key'; - when(() => mockSecureStorage - .get(SecureStorageKeys.p256PrivateKeyToGetAndPresentVC),) - .thenAnswer((_) => Future.value(existingKey)); + when( + () => mockSecureStorage + .get(SecureStorageKeys.p256PrivateKeyToGetAndPresentVC), + ).thenAnswer((_) => Future.value(existingKey)); final result = await getP256KeyToGetAndPresentVC(mockSecureStorage); @@ -272,10 +298,10 @@ void main() { }); test('generates and returns new key', () async { - const newKey = 'new_key'; - when(() => mockSecureStorage - .get(SecureStorageKeys.p256PrivateKeyToGetAndPresentVC),) - .thenAnswer((_) => Future.value(null)); + when( + () => mockSecureStorage + .get(SecureStorageKeys.p256PrivateKeyToGetAndPresentVC), + ).thenAnswer((_) => Future.value(null)); when(() => mockSecureStorage.set(any(), any())) .thenAnswer((_) async {}); @@ -313,8 +339,10 @@ void main() { expect(getDidKeyFromString('DidKeyType.p256'), DidKeyType.p256); expect(getDidKeyFromString('DidKeyType.ebsiv3'), DidKeyType.ebsiv3); expect(getDidKeyFromString('DidKeyType.jwkP256'), DidKeyType.jwkP256); - expect(getDidKeyFromString('DidKeyType.jwtClientAttestation'), - DidKeyType.jwtClientAttestation,); + expect( + getDidKeyFromString('DidKeyType.jwtClientAttestation'), + DidKeyType.jwtClientAttestation, + ); expect(getDidKeyFromString('InvalidKeyType'), null); expect(getDidKeyFromString(null), null); }); @@ -355,11 +383,15 @@ void main() { test('getSignatureType returns correct signature type for circuitId', () { expect(getSignatureType('credentialAtomicQuerySigV2'), 'BJJ Signature'); - expect(getSignatureType('credentialAtomicQuerySigV2OnChain'), - 'BJJ Signature',); + expect( + getSignatureType('credentialAtomicQuerySigV2OnChain'), + 'BJJ Signature', + ); expect(getSignatureType('credentialAtomicQueryMTPV2'), 'SMT Signature'); - expect(getSignatureType('credentialAtomicQueryMTPV2OnChain'), - 'SMT Signature',); + expect( + getSignatureType('credentialAtomicQueryMTPV2OnChain'), + 'SMT Signature', + ); expect(getSignatureType('unknownCircuitId'), ''); }); @@ -375,7 +407,9 @@ void main() { 'https://example.com?uri_list=https%3A%2F%2Fexample.com%2Fpath1&uri_list=https%3A%2F%2Fexample.com%2Fpath2'; final result = generateUriList(url); expect( - result, ['https://example.com/path1', 'https://example.com/path2'],); + result, + ['https://example.com/path1', 'https://example.com/path2'], + ); }); test('sortedPublcJwk returns sorted public JWK without private key', () { @@ -540,7 +574,8 @@ void main() { group('getPresentationDefinition', () { test('returns presentation definition from URI', () async { final uri = Uri.parse( - "https://example.com?presentation_definition={'title':'Test'}",); + "https://example.com?presentation_definition={'title':'Test'}", + ); final presentationDefinition = await getPresentationDefinition(uri: uri, client: mockClient); @@ -559,7 +594,8 @@ void main() { 'returns presentation definition from URI with ' 'presentation_definition_uri', () async { final uri = Uri.parse( - 'https://example.com?presentation_definition_uri=https://example.com/presentation.com',); + 'https://example.com?presentation_definition_uri=https://example.com/presentation.com', + ); dioAdapter.onGet( 'https://example.com/presentation.com', @@ -574,7 +610,8 @@ void main() { test('returns null for invalid presentation_definition_uri', () async { final uri = Uri.parse( - 'https://example.com?presentation_definition_uri=https://example.com/presentation.com',); + 'https://example.com?presentation_definition_uri=https://example.com/presentation.com', + ); dioAdapter.onGet( 'https://example.com/presentation.com', @@ -610,7 +647,8 @@ void main() { 'returns client metadata from URI with ' 'client_metadata_uri', () async { final uri = Uri.parse( - 'https://example.com?client_metadata_uri=https://example.com.com',); + 'https://example.com?client_metadata_uri=https://example.com.com', + ); dioAdapter.onGet( 'https://example.com.com', @@ -625,7 +663,8 @@ void main() { test('returns null for invalid client_metadata_uri', () async { final uri = Uri.parse( - 'https://example.com?client_metadata_uri=https://example.com.com',); + 'https://example.com?client_metadata_uri=https://example.com.com', + ); dioAdapter.onGet( 'https://example.com.com', @@ -808,72 +847,118 @@ void main() { }); test('getErrorResponseString returns correct ResponseString', () { - expect(getErrorResponseString('invalid_request'), - ResponseString.RESPONSE_STRING_invalidRequest,); - expect(getErrorResponseString('invalid_request_uri'), - ResponseString.RESPONSE_STRING_invalidRequest,); - expect(getErrorResponseString('invalid_request_object'), - ResponseString.RESPONSE_STRING_invalidRequest,); - - expect(getErrorResponseString('unauthorized_client'), - ResponseString.RESPONSE_STRING_accessDenied,); - expect(getErrorResponseString('access_denied'), - ResponseString.RESPONSE_STRING_accessDenied,); - expect(getErrorResponseString('invalid_or_missing_proof'), - ResponseString.RESPONSE_STRING_accessDenied,); - expect(getErrorResponseString('interaction_required'), - ResponseString.RESPONSE_STRING_accessDenied,); - - expect(getErrorResponseString('unsupported_response_type'), - ResponseString.RESPONSE_STRING_thisRequestIsNotSupported,); - expect(getErrorResponseString('invalid_scope'), - ResponseString.RESPONSE_STRING_thisRequestIsNotSupported,); - expect(getErrorResponseString('request_not_supported'), - ResponseString.RESPONSE_STRING_thisRequestIsNotSupported,); - expect(getErrorResponseString('request_uri_not_supported'), - ResponseString.RESPONSE_STRING_thisRequestIsNotSupported,); - - expect(getErrorResponseString('unsupported_credential_type'), - ResponseString.RESPONSE_STRING_unsupportedCredential,); - expect(getErrorResponseString('login_required'), - ResponseString.RESPONSE_STRING_aloginIsRequired,); - expect(getErrorResponseString('account_selection_required'), - ResponseString.RESPONSE_STRING_aloginIsRequired,); - - expect(getErrorResponseString('consent_required'), - ResponseString.RESPONSE_STRING_userConsentIsRequired,); - - expect(getErrorResponseString('registration_not_supported'), - ResponseString.RESPONSE_STRING_theWalletIsNotRegistered,); - - expect(getErrorResponseString('invalid_grant'), - ResponseString.RESPONSE_STRING_credentialIssuanceDenied,); - expect(getErrorResponseString('invalid_client'), - ResponseString.RESPONSE_STRING_credentialIssuanceDenied,); - expect(getErrorResponseString('invalid_token'), - ResponseString.RESPONSE_STRING_credentialIssuanceDenied,); + expect( + getErrorResponseString('invalid_request'), + ResponseString.RESPONSE_STRING_invalidRequest, + ); + expect( + getErrorResponseString('invalid_request_uri'), + ResponseString.RESPONSE_STRING_invalidRequest, + ); + expect( + getErrorResponseString('invalid_request_object'), + ResponseString.RESPONSE_STRING_invalidRequest, + ); expect( - getErrorResponseString('unsupported_credential_format'), - ResponseString - .RESPONSE_STRING_thisCredentialFormatIsNotSupported,); + getErrorResponseString('unauthorized_client'), + ResponseString.RESPONSE_STRING_accessDenied, + ); + expect( + getErrorResponseString('access_denied'), + ResponseString.RESPONSE_STRING_accessDenied, + ); + expect( + getErrorResponseString('invalid_or_missing_proof'), + ResponseString.RESPONSE_STRING_accessDenied, + ); + expect( + getErrorResponseString('interaction_required'), + ResponseString.RESPONSE_STRING_accessDenied, + ); - expect(getErrorResponseString('unsupported_format'), - ResponseString.RESPONSE_STRING_thisFormatIsNotSupported,); + expect( + getErrorResponseString('unsupported_response_type'), + ResponseString.RESPONSE_STRING_thisRequestIsNotSupported, + ); + expect( + getErrorResponseString('invalid_scope'), + ResponseString.RESPONSE_STRING_thisRequestIsNotSupported, + ); + expect( + getErrorResponseString('request_not_supported'), + ResponseString.RESPONSE_STRING_thisRequestIsNotSupported, + ); + expect( + getErrorResponseString('request_uri_not_supported'), + ResponseString.RESPONSE_STRING_thisRequestIsNotSupported, + ); + + expect( + getErrorResponseString('unsupported_credential_type'), + ResponseString.RESPONSE_STRING_unsupportedCredential, + ); + expect( + getErrorResponseString('login_required'), + ResponseString.RESPONSE_STRING_aloginIsRequired, + ); + expect( + getErrorResponseString('account_selection_required'), + ResponseString.RESPONSE_STRING_aloginIsRequired, + ); + + expect( + getErrorResponseString('consent_required'), + ResponseString.RESPONSE_STRING_userConsentIsRequired, + ); + + expect( + getErrorResponseString('registration_not_supported'), + ResponseString.RESPONSE_STRING_theWalletIsNotRegistered, + ); - expect(getErrorResponseString('invalid_issuer_metadata'), - ResponseString.RESPONSE_STRING_theCredentialOfferIsInvalid,); + expect( + getErrorResponseString('invalid_grant'), + ResponseString.RESPONSE_STRING_credentialIssuanceDenied, + ); + expect( + getErrorResponseString('invalid_client'), + ResponseString.RESPONSE_STRING_credentialIssuanceDenied, + ); + expect( + getErrorResponseString('invalid_token'), + ResponseString.RESPONSE_STRING_credentialIssuanceDenied, + ); + + expect( + getErrorResponseString('unsupported_credential_format'), + ResponseString.RESPONSE_STRING_thisCredentialFormatIsNotSupported, + ); + + expect( + getErrorResponseString('unsupported_format'), + ResponseString.RESPONSE_STRING_thisFormatIsNotSupported, + ); + + expect( + getErrorResponseString('invalid_issuer_metadata'), + ResponseString.RESPONSE_STRING_theCredentialOfferIsInvalid, + ); - expect(getErrorResponseString('server_error'), - ResponseString.RESPONSE_STRING_theServiceIsNotAvailable,); + expect( + getErrorResponseString('server_error'), + ResponseString.RESPONSE_STRING_theServiceIsNotAvailable, + ); expect( - getErrorResponseString('issuance_pending'), - ResponseString - .RESPONSE_STRING_theIssuanceOfThisCredentialIsPending,); + getErrorResponseString('issuance_pending'), + ResponseString.RESPONSE_STRING_theIssuanceOfThisCredentialIsPending, + ); - expect(getErrorResponseString('random'), - ResponseString.RESPONSE_STRING_thisRequestIsNotSupported,); + expect( + getErrorResponseString('random'), + ResponseString.RESPONSE_STRING_thisRequestIsNotSupported, + ); }); test('isIDTokenOnly', () { @@ -937,7 +1022,7 @@ void main() { 'presentation_definition': { 'id': 'cred-123', 'format': 'vp', - 'input_descriptors': [], + 'input_descriptors': [], }, 'presentation_definition_uri': 'https://example.com/presentation', 'registration': { @@ -983,7 +1068,7 @@ void main() { format: Format.fromJson( { 'ldp_vc': { - 'proof_type': [], + 'proof_type': [], }, }, ), @@ -1230,7 +1315,7 @@ void main() { () => checkX509( clientId: '', header: { - 'x5c': [], + 'x5c': [], }, encodedData: '', ), diff --git a/test/app/shared/issuer/check_issuer_test.dart b/test/app/shared/issuer/check_issuer_test.dart index 8f1c68b42..8ce2671bb 100644 --- a/test/app/shared/issuer/check_issuer_test.dart +++ b/test/app/shared/issuer/check_issuer_test.dart @@ -28,7 +28,9 @@ void main() { mockSecureStorage = MockSecureStorage(); dioAdapter = DioAdapter( - dio: Dio(BaseOptions()), matcher: const UrlRequestMatcher()); + dio: Dio(BaseOptions()), + matcher: const UrlRequestMatcher(), + ); client.httpClientAdapter = dioAdapter; mockClient = DioClient( baseUrl: 'https://example.com/', @@ -133,8 +135,8 @@ void main() { }); test( - 'should return empty issuer if organizationInfo.issuerDomain does not contain uriToCheck.host', - () async { + 'should return empty issuer if organizationInfo.issuerDomain ' + 'does not contain uriToCheck.host', () async { final response = { 'issuer': { 'preferredName': 'Example Issuer', @@ -156,8 +158,10 @@ void main() { final result = await checkIssuer.isIssuerInApprovedList(); - expect(jsonEncode(result), - equals(jsonEncode(Issuer.emptyIssuer(uriToCheck.host)))); + expect( + jsonEncode(result), + equals(jsonEncode(Issuer.emptyIssuer(uriToCheck.host))), + ); }); test('should throw exception when an error occurs', () async { diff --git a/test/app/shared/issuer/models/organization_info_test.dart b/test/app/shared/issuer/models/organization_info_test.dart index eb7d82165..cf0c8b53a 100644 --- a/test/app/shared/issuer/models/organization_info_test.dart +++ b/test/app/shared/issuer/models/organization_info_test.dart @@ -4,8 +4,8 @@ import 'package:flutter_test/flutter_test.dart'; void main() { group('OrganizationInfo', () { test( - 'OrganizationInfo fromJson should return a valid OrganizationInfo object', - () { + 'OrganizationInfo fromJson should ' + 'return a valid OrganizationInfo object', () { final json = { 'id': 'org-123', 'legalName': 'Example Org', @@ -42,8 +42,8 @@ void main() { }); test( - 'OrganizationInfo.emptyOrganizationInfo should return an OrganizationInfo with default values', - () { + 'OrganizationInfo.emptyOrganizationInfo ' + 'should return an OrganizationInfo with default values', () { final organizationInfo = OrganizationInfo.emptyOrganizationInfo('example.com'); diff --git a/test/app/shared/models/state_message/state_message_test.dart b/test/app/shared/models/state_message/state_message_test.dart index 2467e27ba..dfb1db98d 100644 --- a/test/app/shared/models/state_message/state_message_test.dart +++ b/test/app/shared/models/state_message/state_message_test.dart @@ -1,5 +1,5 @@ -import 'package:test/test.dart'; import 'package:altme/app/app.dart'; +import 'package:test/test.dart'; void main() { group('StateMessage', () { diff --git a/test/app/shared/network/network_exception_test.dart b/test/app/shared/network/network_exception_test.dart index 53a02734d..1ea1e3f49 100644 --- a/test/app/shared/network/network_exception_test.dart +++ b/test/app/shared/network/network_exception_test.dart @@ -103,7 +103,9 @@ void main() { ); final message = NetworkException.getDioException(error: error); expect( - message.message, NetworkError.NETWORK_ERROR_NO_INTERNET_CONNECTION); + message.message, + NetworkError.NETWORK_ERROR_NO_INTERNET_CONNECTION, + ); }); test('return internalServerError response when statusCode is 500', () { diff --git a/test/app/shared/validators/wallet_address_validator_test.dart b/test/app/shared/validators/wallet_address_validator_test.dart index 0fca3d1ae..a55817624 100644 --- a/test/app/shared/validators/wallet_address_validator_test.dart +++ b/test/app/shared/validators/wallet_address_validator_test.dart @@ -21,9 +21,11 @@ void main() { test('returns true for valid Ethereum address', () { expect( - validator.validateWalletAddress( - '0x742d35Cc6634C0532925a3b844Bc454e4438f44e'), - isTrue); + validator.validateWalletAddress( + '0x742d35Cc6634C0532925a3b844Bc454e4438f44e', + ), + isTrue, + ); }); test('returns false for invalid Ethereum address', () { @@ -32,9 +34,9 @@ void main() { test('returns true for valid Tezos address', () { expect( - validator - .validateWalletAddress('tz1VSUr8wwNhLAzempoch5d6hLRiTh8Cjcjb'), - isTrue); + validator.validateWalletAddress('tz1VSUr8wwNhLAzempoch5d6hLRiTh8Cjcjb'), + isTrue, + ); }); test('returns false for invalid Tezos address', () { diff --git a/test/app/shared/widget/base/otp_textfield_test.dart b/test/app/shared/widget/base/otp_textfield_test.dart index 390068e64..34fca0ee4 100644 --- a/test/app/shared/widget/base/otp_textfield_test.dart +++ b/test/app/shared/widget/base/otp_textfield_test.dart @@ -1,7 +1,6 @@ import 'package:altme/app/app.dart'; import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:mocktail/mocktail.dart'; import '../../../../helpers/helpers.dart'; @@ -71,8 +70,9 @@ void main() { expect(controllers[1].text, '1'); expect( - FocusScope.of(tester.element(find.byType(TextField).at(1))).hasFocus, - true); + FocusScope.of(tester.element(find.byType(TextField).at(1))).hasFocus, + true, + ); }); testWidgets('onTap moves cursor to end of text', (tester) async { @@ -91,7 +91,8 @@ void main() { expect( controllers[0].selection, TextSelection.fromPosition( - TextPosition(offset: controllers[0].text.length)), + TextPosition(offset: controllers[0].text.length), + ), ); }); }); diff --git a/test/app/shared/widget/base/page_test.dart b/test/app/shared/widget/base/page_test.dart index c8800f802..f41f5c81c 100644 --- a/test/app/shared/widget/base/page_test.dart +++ b/test/app/shared/widget/base/page_test.dart @@ -37,8 +37,8 @@ void main() { }); testWidgets( - 'renders CustomAppBar when title is provided and secure screen is true', - (tester) async { + 'renders CustomAppBar when title is provided ' + 'and secure screen is true', (tester) async { await tester.pumpApp( BasePage( body: Container(), diff --git a/test/app/shared/widget/dialog/confirm_dialog_test.dart b/test/app/shared/widget/dialog/confirm_dialog_test.dart index fbe07bd1f..5cf963e05 100644 --- a/test/app/shared/widget/dialog/confirm_dialog_test.dart +++ b/test/app/shared/widget/dialog/confirm_dialog_test.dart @@ -136,12 +136,14 @@ void main() { const yesText = 'Yes'; const noText = 'No'; - await tester.pumpApp(const ConfirmDialog( - title: title, - yes: yesText, - no: noText, - showNoButton: false, - )); + await tester.pumpApp( + const ConfirmDialog( + title: title, + yes: yesText, + no: noText, + showNoButton: false, + ), + ); expect(find.text(yesText.toUpperCase()), findsOneWidget); expect(find.text(noText.toUpperCase()), findsNothing); diff --git a/test/app/shared/widget/dialog/text_field_dialog_test.dart b/test/app/shared/widget/dialog/text_field_dialog_test.dart index 267382bea..4844bf3a0 100644 --- a/test/app/shared/widget/dialog/text_field_dialog_test.dart +++ b/test/app/shared/widget/dialog/text_field_dialog_test.dart @@ -16,7 +16,8 @@ void main() { no: 'No', ), ); - // Verify that the title, label, subtitle, and initial value are displayed. + // Verify that the title, label, subtitle, + // and initial value are displayed. expect(find.text('Title'), findsOneWidget); expect(find.text('Label'), findsOneWidget); expect(find.text('Subtitle'), findsOneWidget); diff --git a/test/app/shared/widget/wallet_logo_test.dart b/test/app/shared/widget/wallet_logo_test.dart index 5565c7fe9..5821e5eb0 100644 --- a/test/app/shared/widget/wallet_logo_test.dart +++ b/test/app/shared/widget/wallet_logo_test.dart @@ -136,7 +136,8 @@ void main() { }); testWidgets( - 'displays correct image for ProfileType.owfBaselineProfile in development', + 'displays correct image for ' + 'ProfileType.owfBaselineProfile in development', (WidgetTester tester) async { await tester.pumpApp( Scaffold( 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 af55c501d..7bc14632e 100644 --- a/test/onboarding/gen_phrase/view/onboarding_gen_phrase_test.dart +++ b/test/onboarding/gen_phrase/view/onboarding_gen_phrase_test.dart @@ -149,7 +149,8 @@ void main() { BlocProvider.value(value: walletCubit), BlocProvider.value(value: splashCubit), BlocProvider.value( - value: altmeChatSupportCubit), + value: altmeChatSupportCubit, + ), BlocProvider.value(value: profileCubit), ], child: const OnBoardingGenPhrasePage(), diff --git a/test/onboarding/helper_function/helper_function_test.dart b/test/onboarding/helper_function/helper_function_test.dart index 4de6827eb..8b06a4ca4 100644 --- a/test/onboarding/helper_function/helper_function_test.dart +++ b/test/onboarding/helper_function/helper_function_test.dart @@ -95,8 +95,8 @@ void main() { ); }); - const mnemonicString = - 'notice photo opera keen climb agent soft parrot best joke field devote'; + const mnemonicString = 'notice photo opera keen climb' + ' agent soft parrot best joke field devote'; test('should generate account correctly', () async { when(() => homeCubit.emitHasWallet()).thenAnswer((_) async => {}); diff --git a/test/onboarding/protect_wallet/view/protect_wallet_page_test.dart b/test/onboarding/protect_wallet/view/protect_wallet_page_test.dart index cdddecd8a..ced9e2d88 100644 --- a/test/onboarding/protect_wallet/view/protect_wallet_page_test.dart +++ b/test/onboarding/protect_wallet/view/protect_wallet_page_test.dart @@ -205,7 +205,8 @@ void main() { BlocProvider.value(value: walletCubit), BlocProvider.value(value: splashCubit), BlocProvider.value( - value: altmeChatSupportCubit), + value: altmeChatSupportCubit, + ), BlocProvider.value( value: ProfileCubit( didKitProvider: didKitProvider, diff --git a/test/onboarding/tos/cubit/onboarding_tos_cubit_test.dart b/test/onboarding/tos/cubit/onboarding_tos_cubit_test.dart index 40be207fa..58ae82d34 100644 --- a/test/onboarding/tos/cubit/onboarding_tos_cubit_test.dart +++ b/test/onboarding/tos/cubit/onboarding_tos_cubit_test.dart @@ -40,7 +40,8 @@ void main() { ); blocTest( - 'emits [acceptanceButtonEnabled] when setAcceptanceButtonEnabled is called', + 'emits [acceptanceButtonEnabled] ' + 'when setAcceptanceButtonEnabled is called', build: () => onBoardingTosCubit, act: (cubit) => cubit.setAcceptanceButtonEnabled(acceptanceButtonEnabled: true), diff --git a/test/onboarding/tos/cubit/onboarding_tos_state_test.dart b/test/onboarding/tos/cubit/onboarding_tos_state_test.dart index de231cca7..0e4394b28 100644 --- a/test/onboarding/tos/cubit/onboarding_tos_state_test.dart +++ b/test/onboarding/tos/cubit/onboarding_tos_state_test.dart @@ -23,8 +23,8 @@ void main() { }); test( - 'toJson and fromJson methods should serialize and deserialize correctly', - () { + 'toJson and fromJson methods should serialize ' + 'and deserialize correctly', () { const state = OnBoardingTosState( agreeTerms: true, scrollIsOver: false, diff --git a/test/route/cubit/route_cubit_test.dart b/test/route/cubit/route_cubit_test.dart index 08a88168a..da958227f 100644 --- a/test/route/cubit/route_cubit_test.dart +++ b/test/route/cubit/route_cubit_test.dart @@ -1,8 +1,6 @@ import 'package:altme/route/route.dart'; import 'package:bloc_test/bloc_test.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:mocktail/mocktail.dart'; -import 'package:logger/logger.dart'; void main() { group('RouteCubit', () { diff --git a/test/route/router/router_test.dart b/test/route/router/router_test.dart index c8ad47ae7..98b1f95b0 100644 --- a/test/route/router/router_test.dart +++ b/test/route/router/router_test.dart @@ -6,8 +6,8 @@ import 'package:flutter_test/flutter_test.dart'; void main() { testWidgets('RightToLeftRoute transition test', (WidgetTester tester) async { - final fromWidget = Scaffold(body: Center(child: Text('From Screen'))); - final toWidget = Scaffold(body: Center(child: Text('To Screen'))); + const fromWidget = Scaffold(body: Center(child: Text('From Screen'))); + const toWidget = Scaffold(body: Center(child: Text('To Screen'))); final navigatorKey = GlobalKey(); diff --git a/test/scan/cubit/scan_cubit.dart b/test/scan/cubit/scan_cubit.dart index f3b91c806..29daade2e 100644 --- a/test/scan/cubit/scan_cubit.dart +++ b/test/scan/cubit/scan_cubit.dart @@ -66,4 +66,4 @@ void main() { // Add more tests here... }); -} \ No newline at end of file +} diff --git a/test/splash/cubit/splash_cubit_test.dart b/test/splash/cubit/splash_cubit_test.dart index a867e4cc7..62d261ab2 100644 --- a/test/splash/cubit/splash_cubit_test.dart +++ b/test/splash/cubit/splash_cubit_test.dart @@ -1,5 +1,3 @@ -import 'dart:async'; - import 'package:altme/app/app.dart'; import 'package:altme/chat_room/chat_room.dart'; import 'package:altme/credentials/credentials.dart'; diff --git a/test/theme/app_theme_test.dart b/test/theme/app_theme_test.dart index 5f4b0a291..74df0adae 100644 --- a/test/theme/app_theme_test.dart +++ b/test/theme/app_theme_test.dart @@ -37,8 +37,10 @@ void main() { expect(colorScheme.onElevatedButton, equals(Colors.white)); expect(colorScheme.appBarUpperLayer, const Color(0xff25095B)); expect(colorScheme.appBarLowerLayer, equals(colorScheme.background)); - expect(colorScheme.surfaceContainer, - equals(const Color(0xff707070).withOpacity(0.07))); + expect( + colorScheme.surfaceContainer, + equals(const Color(0xff707070).withOpacity(0.07)), + ); expect(colorScheme.drawerSurface, const Color(0xff232630)); expect(colorScheme.label, equals(Colors.white)); expect(colorScheme.unSelectedLabel, const Color(0xff86809D)); @@ -46,8 +48,10 @@ void main() { expect(colorScheme.selectedBottomBar, equals(colorScheme.surface)); expect(colorScheme.drawerBackground, const Color(0xff0B0514)); expect(colorScheme.borderColor, const Color(0xFFDDCEF4)); - expect(colorScheme.defualtDialogCancelButtonBorderColor, - const Color(0xFFFFFFFF).withOpacity(0.2)); + expect( + colorScheme.defualtDialogCancelButtonBorderColor, + const Color(0xFFFFFFFF).withOpacity(0.2), + ); expect(colorScheme.markDownH1, equals(Colors.white)); expect(colorScheme.markDownH2, equals(Colors.white)); expect(colorScheme.markDownP, const Color(0xFFD1CCE3)); @@ -56,8 +60,10 @@ void main() { expect(colorScheme.subtitle2, const Color(0xFF8B8C92)); expect(colorScheme.profileDummy, const Color(0xFF212121)); expect(colorScheme.documentShadow, const Color(0xFF424242)); - expect(colorScheme.documentShape, - equals(const Color(0xff3700b3).withOpacity(0.05))); + expect( + colorScheme.documentShape, + equals(const Color(0xff3700b3).withOpacity(0.05)), + ); expect(colorScheme.star, const Color(0xFFFFB83D)); expect(colorScheme.genderIcon, const Color(0xFF212121)); expect(colorScheme.activeCredential, equals(Colors.green)); @@ -69,14 +75,18 @@ void main() { expect(colorScheme.alertInfoMessage, equals(Colors.cyan)); expect(colorScheme.alertSuccessMessage, equals(Colors.green)); expect(colorScheme.qrScanBackground, const Color(0xff2B1C48)); - expect(colorScheme.qrScanInnerShadow, - const Color(0xff000000).withOpacity(0.16)); + expect( + colorScheme.qrScanInnerShadow, + const Color(0xff000000).withOpacity(0.16), + ); expect(colorScheme.qrScanOuterShadow, const Color(0xff430F91)); expect(colorScheme.dialogText, const Color(0xffF5F5F5)); expect(colorScheme.tabBarNotSelected, const Color(0xFF280164)); expect(colorScheme.credentialBackground, const Color(0xFF211F33)); - expect(colorScheme.cryptoAccountNotSelected, - equals(Colors.grey.withOpacity(0.15))); + expect( + colorScheme.cryptoAccountNotSelected, + equals(Colors.grey.withOpacity(0.15)), + ); expect(colorScheme.startButtonColorA, const Color(0xff18ACFF)); expect(colorScheme.startButtonColorB, const Color(0xff6600FF)); expect(colorScheme.associatedWalletBorder, const Color(0xff524B67)); @@ -137,7 +147,9 @@ void main() { expect(textTheme.customListTileTitleStyle.fontWeight, FontWeight.w800); expect( - textTheme.customListTileSubTitleStyle.color, const Color(0xFF86809D)); + textTheme.customListTileSubTitleStyle.color, + const Color(0xFF86809D), + ); expect(textTheme.customListTileSubTitleStyle.fontSize, 16); expect(textTheme.customListTileSubTitleStyle.fontWeight, FontWeight.w400); @@ -310,7 +322,9 @@ void main() { ); expect(textTheme.learningAchievementDescription.fontSize, 12); expect( - textTheme.learningAchievementDescription.fontWeight, FontWeight.w400); + textTheme.learningAchievementDescription.fontWeight, + FontWeight.w400, + ); expect(textTheme.credentialIssuer.color, const Color(0xff212121)); expect(textTheme.credentialIssuer.fontSize, 13); @@ -373,17 +387,25 @@ void main() { expect(textTheme.tezosAssociatedAddressData.fontSize, 17); expect(textTheme.tezosAssociatedAddressData.fontWeight, FontWeight.normal); - expect(textTheme.tezosAssociatedAddressTitleCard.color, - const Color(0xffFAFDFF)); + expect( + textTheme.tezosAssociatedAddressTitleCard.color, + const Color(0xffFAFDFF), + ); expect(textTheme.tezosAssociatedAddressTitleCard.fontSize, 20); expect( - textTheme.tezosAssociatedAddressTitleCard.fontWeight, FontWeight.w700); + textTheme.tezosAssociatedAddressTitleCard.fontWeight, + FontWeight.w700, + ); expect( - textTheme.credentialStudentCardTextCard.color, const Color(0xffffffff)); + textTheme.credentialStudentCardTextCard.color, + const Color(0xffffffff), + ); expect(textTheme.credentialStudentCardTextCard.fontSize, 14); expect( - textTheme.credentialStudentCardTextCard.fontWeight, FontWeight.normal); + textTheme.credentialStudentCardTextCard.fontWeight, + FontWeight.normal, + ); expect(textTheme.over18.color, const Color(0xffffffff)); expect(textTheme.over18.fontSize, 20); @@ -546,7 +568,9 @@ void main() { expect(textTheme.credentialManifestTitle1.fontWeight, FontWeight.w700); expect( - textTheme.credentialManifestDescription.color, const Color(0xffFFFFFF)); + textTheme.credentialManifestDescription.color, + const Color(0xffFFFFFF), + ); expect(textTheme.credentialManifestDescription.fontSize, 16); expect(textTheme.credentialManifestDescription.fontWeight, FontWeight.w400);