Format Solana wallet picker changes for the current Dart SDK
What changed, and why it matters
This commit only reformats Dart code to match the project's current Dart SDK style rules. It changes whitespace, line breaks, and import grouping in two wallet-related UI files. There are no functional changes, no security fixes, and no behavior changes visible in the diff.
No security action needed. Treat as routine code-style maintenance.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The diff is a pure formatting patch. In restore_wallet_view.dart and select_wallet_for_sol_token_view.dart, trailing-argument closures are collapsed onto single lines, Theme.of(context) chains are rewrapped, string literals are re-indented, and one import block is reorganized. No logic, API, dependency, or permission changes are present.
Changed components
lib/pages/add_wallet_views/restore_wallet_view/restore_wallet_view.dartlib/pages/add_wallet_views/select_wallet_for_sol_token_view.dartInspect captured patch +78 / −101
### lib/pages/add_wallet_views/restore_wallet_view/restore_wallet_view.dart
@@ -409,9 +409,8 @@ class _RestoreWalletViewState extends ConsumerState<RestoreWalletView> {
if (mounted) {
if (isDesktop) {
- Navigator.of(
- context,
- ).popUntil(ModalRoute.withName(DesktopHomeView.routeName));
+ Navigator.of(context)
+ .popUntil(ModalRoute.withName(DesktopHomeView.routeName));
} else {
if (isCreateSpecialEthWallet) {
Navigator.of(context).popUntil(
@@ -503,42 +502,42 @@ class _RestoreWalletViewState extends ConsumerState<RestoreWalletView> {
case FormInputStatus.empty:
color = Theme.of(context).extension<StackColors>()!.textFieldDefaultBG;
prefixColor = Theme.of(context).extension<StackColors>()!.textSubtitle2;
- borderColor = Theme.of(
- context,
- ).extension<StackColors>()!.textFieldDefaultBG;
+ borderColor = Theme.of(context)
+ .extension<StackColors>()!
+ .textFieldDefaultBG;
break;
case FormInputStatus.invalid:
color = Theme.of(context).extension<StackColors>()!.textFieldErrorBG;
- prefixColor = Theme.of(
- context,
- ).extension<StackColors>()!.textFieldErrorSearchIconLeft;
- borderColor = Theme.of(
- context,
- ).extension<StackColors>()!.textFieldErrorBorder;
+ prefixColor = Theme.of(context)
+ .extension<StackColors>()!
+ .textFieldErrorSearchIconLeft;
+ borderColor = Theme.of(context)
+ .extension<StackColors>()!
+ .textFieldErrorBorder;
suffixIcon = SvgPicture.asset(
Assets.svg.alertCircle,
width: 16,
height: 16,
- color: Theme.of(
- context,
- ).extension<StackColors>()!.textFieldErrorSearchIconRight,
+ color: Theme.of(context)
+ .extension<StackColors>()!
+ .textFieldErrorSearchIconRight,
);
break;
case FormInputStatus.valid:
color = Theme.of(context).extension<StackColors>()!.textFieldSuccessBG;
- prefixColor = Theme.of(
- context,
- ).extension<StackColors>()!.textFieldSuccessSearchIconLeft;
- borderColor = Theme.of(
- context,
- ).extension<StackColors>()!.textFieldSuccessBorder;
+ prefixColor = Theme.of(context)
+ .extension<StackColors>()!
+ .textFieldSuccessSearchIconLeft;
+ borderColor = Theme.of(context)
+ .extension<StackColors>()!
+ .textFieldSuccessBorder;
suffixIcon = SvgPicture.asset(
Assets.svg.checkCircle,
width: 16,
height: 16,
- color: Theme.of(
- context,
- ).extension<StackColors>()!.textFieldSuccessSearchIconRight,
+ color: Theme.of(context)
+ .extension<StackColors>()!
+ .textFieldSuccessSearchIconRight,
);
break;
}
@@ -727,20 +726,19 @@ class _RestoreWalletViewState extends ConsumerState<RestoreWalletView> {
child: AspectRatio(
aspectRatio: 1,
child: AppBarIconButton(
- semanticsLabel:
- "View QR Code Button. Opens Camera To Scan QR Code For Restoring Wallet.",
+ semanticsLabel: "View QR Code Button. Opens Camera To Scan QR Code For Restoring Wallet.",
key: const Key("restoreWalletViewQrCodeButton"),
size: 36,
shadows: const [],
- color: Theme.of(
- context,
- ).extension<StackColors>()!.background,
+ color: Theme.of(context)
+ .extension<StackColors>()!
+ .background,
icon: QrCodeIcon(
width: 20,
height: 20,
- color: Theme.of(
- context,
- ).extension<StackColors>()!.accentColorDark,
+ color: Theme.of(context)
+ .extension<StackColors>()!
+ .accentColorDark,
),
onPressed: scanMnemonicQr,
),
@@ -755,20 +753,19 @@ class _RestoreWalletViewState extends ConsumerState<RestoreWalletView> {
child: AspectRatio(
aspectRatio: 1,
child: AppBarIconButton(
- semanticsLabel:
- "Paste Button. Pastes From Clipboard For Restoring Wallet.",
+ semanticsLabel: "Paste Button. Pastes From Clipboard For Restoring Wallet.",
key: const Key("restoreWalletPasteButton"),
size: 36,
shadows: const [],
- color: Theme.of(
- context,
- ).extension<StackColors>()!.background,
+ color: Theme.of(context)
+ .extension<StackColors>()!
+ .background,
icon: ClipboardIcon(
width: 20,
height: 20,
- color: Theme.of(
- context,
- ).extension<StackColors>()!.accentColorDark,
+ color: Theme.of(context)
+ .extension<StackColors>()!
+ .accentColorDark,
),
onPressed: pasteMnemonic,
),
@@ -825,9 +822,9 @@ class _RestoreWalletViewState extends ConsumerState<RestoreWalletView> {
Assets.svg.clipboard,
width: 22,
height: 22,
- color: Theme.of(
- context,
- ).extension<StackColors>()!.buttonTextSecondary,
+ color: Theme.of(context)
+ .extension<StackColors>()!
+ .buttonTextSecondary,
),
const SizedBox(width: 8),
Text(
@@ -1208,9 +1205,9 @@ class _RestoreWalletViewState extends ConsumerState<RestoreWalletView> {
},
controller: _controllers[i - 1],
style: STextStyles.field(context).copyWith(
- color: Theme.of(
- context,
- ).extension<StackColors>()!.textRestore,
+ color: Theme.of(context)
+ .extension<StackColors>()!
+ .textRestore,
fontSize: isDesktop ? 16 : 14,
),
),
### lib/pages/add_wallet_views/select_wallet_for_sol_token_view.dart
@@ -9,6 +9,7 @@
import 'package:flutter/material.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
+
import '../../models/add_wallet_list_entity/sub_classes/coin_entity.dart';
import '../../models/add_wallet_list_entity/sub_classes/sol_token_entity.dart';
import 'add_token_view/edit_wallet_tokens_view.dart';
@@ -30,16 +31,15 @@ import '../../widgets/eth_wallet_radio.dart';
import '../../widgets/rounded_container.dart';
import '../../widgets/rounded_white_container.dart';
import '../../widgets/wallet_info_row/wallet_info_row.dart';
+
import 'package:tuple/tuple.dart';
-final newSolWalletTriggerTempUntilHiveCompletelyDeleted =
- StateProvider((ref) => false);
+final newSolWalletTriggerTempUntilHiveCompletelyDeleted = StateProvider(
+ (ref) => false,
+);
class SelectWalletForSolTokenView extends ConsumerStatefulWidget {
- const SelectWalletForSolTokenView({
- super.key,
- required this.entity,
- });
+ const SelectWalletForSolTokenView({super.key, required this.entity});
static const String routeName = "/selectWalletForSolTokenView";
@@ -59,15 +59,13 @@ class _SelectWalletForSolTokenViewState
void _onContinue() {
Navigator.of(context).pushNamed(
EditWalletTokensView.routeName,
- arguments: Tuple2(
- _selectedWalletId!,
- [widget.entity.token.address],
- ),
+ arguments: Tuple2(_selectedWalletId!, [widget.entity.token.address]),
);
}
void _onAddNewSolWallet() {
- ref.read(newSolWalletTriggerTempUntilHiveCompletelyDeleted.notifier).state = true;
+ ref.read(newSolWalletTriggerTempUntilHiveCompletelyDeleted.notifier).state =
+ true;
Navigator.of(context).pushNamed(
CreateOrRestoreWalletView.routeName,
arguments: CoinEntity(widget.entity.cryptoCurrency),
@@ -105,15 +103,21 @@ class _SelectWalletForSolTokenViewState
return WillPopScope(
onWillPop: () async {
- ref.read(newSolWalletTriggerTempUntilHiveCompletelyDeleted.notifier).state = false;
+ ref
+ .read(
+ newSolWalletTriggerTempUntilHiveCompletelyDeleted.notifier,
+ )
+ .state =
+ false;
return true;
},
child: ConditionalParent(
condition: !isDesktop,
builder: (child) => Background(
child: Scaffold(
- backgroundColor:
- Theme.of(context).extension<StackColors>()!.background,
+ backgroundColor: Theme.of(context)
+ .extension<StackColors>()!
+ .background,
appBar: AppBar(
leading: AppBarBackButton(
onPressed: () {
@@ -122,10 +126,7 @@ class _SelectWalletForSolTokenViewState
),
),
body: SafeArea(
- child: Padding(
- padding: const EdgeInsets.all(16),
- child: child,
- ),
+ child: Padding(padding: const EdgeInsets.all(16), child: child),
),
),
),
@@ -136,48 +137,36 @@ class _SelectWalletForSolTokenViewState
isCompactHeight: false,
leading: AppBarBackButton(),
),
- body: SizedBox(
- width: 500,
- child: child,
- ),
+ body: SizedBox(width: 500, child: child),
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [
- if (isDesktop)
- const SizedBox(
- height: 24,
- ),
+ if (isDesktop) const SizedBox(height: 24),
Text(
"Select Solana wallet",
textAlign: TextAlign.center,
style: isDesktop
? STextStyles.desktopH2(context)
: STextStyles.pageTitleH1(context),
),
- SizedBox(
- height: isDesktop ? 16 : 8,
- ),
+ SizedBox(height: isDesktop ? 16 : 8),
Text(
"You are adding a Solana token.",
textAlign: TextAlign.center,
style: isDesktop
? STextStyles.desktopSubtitleH2(context)
: STextStyles.subtitle(context),
),
- const SizedBox(
- height: 8,
- ),
+ const SizedBox(height: 8),
Text(
"You must choose a Solana wallet in order to use ${widget.entity.name}",
textAlign: TextAlign.center,
style: isDesktop
? STextStyles.desktopSubtitleH2(context)
: STextStyles.subtitle(context),
),
- SizedBox(
- height: isDesktop ? 60 : 16,
- ),
+ SizedBox(height: isDesktop ? 60 : 16),
solWalletIds.isEmpty
? RoundedWhiteContainer(
padding: EdgeInsets.all(isDesktop ? 16 : 12),
@@ -205,9 +194,8 @@ class _SelectWalletForSolTokenViewState
child: ListView.separated(
itemCount: solWalletIds.length,
shrinkWrap: true,
- separatorBuilder: (_, __) => SizedBox(
- height: isDesktop ? 12 : 6,
- ),
+ separatorBuilder: (_, __) =>
+ SizedBox(height: isDesktop ? 12 : 6),
itemBuilder: (_, index) {
return RoundedContainer(
padding: EdgeInsets.all(isDesktop ? 16 : 8),
@@ -218,33 +206,25 @@ class _SelectWalletForSolTokenViewState
},
color: isDesktop
? Theme.of(context)
- .extension<StackColors>()!
- .popupBG
+ .extension<StackColors>()!
+ .popupBG
: _selectedWalletId == solWalletIds[index]
- ? Theme.of(context)
- .extension<StackColors>()!
- .highlight
- : Colors.transparent,
+ ? Theme.of(context)
+ .extension<StackColors>()!
+ .highlight
+ : Colors.transparent,
child: isDesktop
? EthWalletRadio(
walletId: solWalletIds[index],
selectedWalletId: _selectedWalletId,
)
- : WalletInfoRow(
- walletId: solWalletIds[index],
- ),
+ : WalletInfoRow(walletId: solWalletIds[index]),
);
},
),
),
- if (solWalletIds.isEmpty || isDesktop)
- const SizedBox(
- height: 16,
- ),
- if (isDesktop)
- const SizedBox(
- height: 16,
- ),
+ if (solWalletIds.isEmpty || isDesktop) const SizedBox(height: 16),
+ if (isDesktop) const SizedBox(height: 16),
solWalletIds.isEmpty
? PrimaryButton(
label: "Add new Solana wallet",Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.