From 885852322bd04c181cc3d4d1bdda0c31373c9aaa Mon Sep 17 00:00:00 2001 From: Ethan Lee <125412902+ethan-tbd@users.noreply.github.com> Date: Wed, 9 Oct 2024 11:50:30 -0700 Subject: [PATCH] chore: project cleanup (#308) --- lib/features/account/account_page.dart | 2 -- lib/features/kcc/kcc_issuance_service.dart | 2 +- lib/features/kcc/kcc_webview_page.dart | 3 ++- lib/features/payment/payment_details_page.dart | 15 +++++++++------ lib/features/qr/qr_tabs.dart | 2 +- lib/features/send/send_page.dart | 1 - lib/l10n/app_localizations.dart | 2 ++ lib/l10n/app_localizations_en.dart | 2 ++ 8 files changed, 17 insertions(+), 12 deletions(-) diff --git a/lib/features/account/account_page.dart b/lib/features/account/account_page.dart index 65a51e1..ce30108 100644 --- a/lib/features/account/account_page.dart +++ b/lib/features/account/account_page.dart @@ -18,8 +18,6 @@ import 'package:web5/web5.dart'; class AccountPage extends HookConsumerWidget { const AccountPage({super.key}); - // TODO(ethan-tbd): add button to recreate did - @override Widget build(BuildContext context, WidgetRef ref) { final pfis = ref.watch(pfisProvider); diff --git a/lib/features/kcc/kcc_issuance_service.dart b/lib/features/kcc/kcc_issuance_service.dart index a91001b..7337bc4 100644 --- a/lib/features/kcc/kcc_issuance_service.dart +++ b/lib/features/kcc/kcc_issuance_service.dart @@ -377,7 +377,7 @@ class KccIssuanceService { } Future getIdvServiceEndpoint( - Pfi pfi, PresentationDefinition presentationDefinition) async { + Pfi pfi, PresentationDefinition presentationDefinition,) async { try { final res = await DidResolver.resolve(pfi.did); if (res.hasError()) { diff --git a/lib/features/kcc/kcc_webview_page.dart b/lib/features/kcc/kcc_webview_page.dart index 1e35927..4deae70 100644 --- a/lib/features/kcc/kcc_webview_page.dart +++ b/lib/features/kcc/kcc_webview_page.dart @@ -33,7 +33,8 @@ class KccWebviewPage extends HookConsumerWidget { final webViewController = useState(null); final settings = InAppWebViewSettings( - isInspectable: kDebugMode, // TODO: only enable for debug builds + isInspectable: + kDebugMode, // TODO(ethan-tbd): only enable for debug builds mediaPlaybackRequiresUserGesture: false, allowsInlineMediaPlayback: true, iframeAllow: 'camera; microphone', diff --git a/lib/features/payment/payment_details_page.dart b/lib/features/payment/payment_details_page.dart index 6df8f4d..9179f84 100644 --- a/lib/features/payment/payment_details_page.dart +++ b/lib/features/payment/payment_details_page.dart @@ -83,12 +83,15 @@ class PaymentDetailsPage extends HookConsumerWidget { ), error: (error, _) => ErrorMessage( message: error.toString(), - onRetry: () => _sendRfq( - context, - ref, - state, - quote, - ), + onRetry: () { + quote.value = const AsyncLoading(); + _sendRfq( + context, + ref, + state, + quote, + ); + }, ), ) : Column( diff --git a/lib/features/qr/qr_tabs.dart b/lib/features/qr/qr_tabs.dart index 5b279c9..be4986e 100644 --- a/lib/features/qr/qr_tabs.dart +++ b/lib/features/qr/qr_tabs.dart @@ -44,7 +44,7 @@ class QrTabs extends HookWidget { controller: tabController, indicator: BoxDecoration( borderRadius: BorderRadius.circular(Grid.radius), - color: Theme.of(context).colorScheme.surfaceContainer, + color: Theme.of(context).colorScheme.surface, ), indicatorSize: TabBarIndicatorSize.tab, indicatorPadding: const EdgeInsets.all(Grid.quarter), diff --git a/lib/features/send/send_page.dart b/lib/features/send/send_page.dart index 9ff39c5..72ba703 100644 --- a/lib/features/send/send_page.dart +++ b/lib/features/send/send_page.dart @@ -10,7 +10,6 @@ import 'package:didpay/features/transaction/transaction.dart'; import 'package:didpay/l10n/app_localizations.dart'; import 'package:didpay/shared/error_message.dart'; import 'package:didpay/shared/header.dart'; -import 'package:didpay/shared/loading_message.dart'; import 'package:didpay/shared/theme/grid.dart'; import 'package:flutter/material.dart'; import 'package:flutter_hooks/flutter_hooks.dart'; diff --git a/lib/l10n/app_localizations.dart b/lib/l10n/app_localizations.dart index 74c4ccf..65d432c 100644 --- a/lib/l10n/app_localizations.dart +++ b/lib/l10n/app_localizations.dart @@ -7,6 +7,8 @@ import 'package:intl/intl.dart' as intl; import 'app_localizations_en.dart'; +// ignore_for_file: type=lint + /// Callers can lookup localized strings with an instance of Loc /// returned by `Loc.of(context)`. /// diff --git a/lib/l10n/app_localizations_en.dart b/lib/l10n/app_localizations_en.dart index 85848db..487fe58 100644 --- a/lib/l10n/app_localizations_en.dart +++ b/lib/l10n/app_localizations_en.dart @@ -1,5 +1,7 @@ import 'app_localizations.dart'; +// ignore_for_file: type=lint + /// The translations for English (`en`). class LocEn extends Loc { LocEn([String locale = 'en']) : super(locale);