What changed, and why it matters
This commit is purely a code-formatting cleanup. It runs the Dart formatter on several files related to the ShopinBit feature, adjusting line breaks, indentation, and whitespace. No functionality, logic, or security behavior was changed.
No security action needed. This is a routine formatting commit and can be treated as non-security-related.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The diff shows only stylistic changes produced by dart format: breaking long argument lists onto multiple lines, collapsing single-argument constructors onto one line, reindenting nested widgets, and aligning ?? operators. No control flow, API calls, input validation, cryptography, or storage logic was modified. The shopinbit_service.dart changes are limited to formatting of preference-loading helpers and a log statement.
Changed components
lib/pages/more_view/services_view.dartlib/pages/shopinbit/shopinbit_order_created.dartlib/pages/shopinbit/shopinbit_payment_view.dartlib/pages/shopinbit/shopinbit_setup_view.dartlib/pages/shopinbit/shopinbit_shipping_view.dartlib/pages/shopinbit/shopinbit_step_2.dartlib/pages/shopinbit/shopinbit_step_3.dartlib/pages/wallet_view/wallet_view.dartlib/pages_desktop_specific/more_view/sub_widgets/desktop_shopinbit_view.dartlib/pages_desktop_specific/settings/settings_menu/shopinbit_settings.dartlib/services/shopinbit/shopinbit_service.dartInspect captured patch +292 / −327
diff --git a/lib/pages/more_view/services_view.dart b/lib/pages/more_view/services_view.dart
index fa4131f..aa4d7ac 100644
--- a/lib/pages/more_view/services_view.dart
+++ b/lib/pages/more_view/services_view.dart
@@ -151,10 +151,9 @@ class _ServicesViewState extends State<ServicesView> {
if (savedName != null && savedName.isNotEmpty) {
model.displayName = savedName;
}
- await Navigator.of(context).pushNamed(
- ShopInBitStep2.routeName,
- arguments: model,
- );
+ await Navigator.of(
+ context,
+ ).pushNamed(ShopInBitStep2.routeName, arguments: model);
} else {
// First-time user: show setup flow
await Navigator.of(context).pushNamed(
diff --git a/lib/pages/shopinbit/shopinbit_order_created.dart b/lib/pages/shopinbit/shopinbit_order_created.dart
index d07752c..e522e88 100644
--- a/lib/pages/shopinbit/shopinbit_order_created.dart
+++ b/lib/pages/shopinbit/shopinbit_order_created.dart
@@ -180,12 +180,11 @@ class ShopInBitOrderCreated extends StatelessWidget {
}
},
child: Scaffold(
- backgroundColor:
- Theme.of(context).extension<StackColors>()!.background,
+ backgroundColor: Theme.of(
+ context,
+ ).extension<StackColors>()!.background,
appBar: AppBar(
- leading: AppBarBackButton(
- onPressed: () => _popToServices(context),
- ),
+ leading: AppBarBackButton(onPressed: () => _popToServices(context)),
title: Text("ShopinBit", style: STextStyles.navBarTitle(context)),
),
body: SafeArea(
diff --git a/lib/pages/shopinbit/shopinbit_payment_view.dart b/lib/pages/shopinbit/shopinbit_payment_view.dart
index 1a51cbe..8747670 100644
--- a/lib/pages/shopinbit/shopinbit_payment_view.dart
+++ b/lib/pages/shopinbit/shopinbit_payment_view.dart
@@ -386,10 +386,7 @@ class _ShopInBitPaymentViewState extends ConsumerState<ShopInBitPaymentView> {
} else {
final coin = AppConfig.getCryptoCurrencyForTicker(ticker);
if (coin != null) {
- return ref
- .read(pWallets)
- .wallets
- .any((e) => e.info.coin == coin);
+ return ref.read(pWallets).wallets.any((e) => e.info.coin == coin);
}
}
return false;
@@ -425,10 +422,7 @@ class _ShopInBitPaymentViewState extends ConsumerState<ShopInBitPaymentView> {
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
- Text(
- "$ticker Payment",
- style: STextStyles.pageTitleH2(context),
- ),
+ Text("$ticker Payment", style: STextStyles.pageTitleH2(context)),
const SizedBox(height: 16),
GestureDetector(
onTap: () {
@@ -533,7 +527,10 @@ class _ShopInBitPaymentViewState extends ConsumerState<ShopInBitPaymentView> {
height: 24,
child: Center(
child: Text(
- ticker.substring(0, ticker.length > 2 ? 2 : ticker.length),
+ ticker.substring(
+ 0,
+ ticker.length > 2 ? 2 : ticker.length,
+ ),
style: STextStyles.itemSubtitle12(context),
),
),
@@ -543,10 +540,7 @@ class _ShopInBitPaymentViewState extends ConsumerState<ShopInBitPaymentView> {
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
- Text(
- ticker,
- style: STextStyles.titleBold12(context),
- ),
+ Text(ticker, style: STextStyles.titleBold12(context)),
if (amountStr != null)
Text(
"$amountStr $ticker",
@@ -556,10 +550,7 @@ class _ShopInBitPaymentViewState extends ConsumerState<ShopInBitPaymentView> {
),
),
if (hasWallet)
- Text(
- "PAY NOW",
- style: STextStyles.link2(context),
- )
+ Text("PAY NOW", style: STextStyles.link2(context))
else
Icon(
Icons.info_outline,
@@ -821,12 +812,11 @@ class _ShopInBitPaymentViewState extends ConsumerState<ShopInBitPaymentView> {
}
},
child: Scaffold(
- backgroundColor:
- Theme.of(context).extension<StackColors>()!.background,
+ backgroundColor: Theme.of(
+ context,
+ ).extension<StackColors>()!.background,
appBar: AppBar(
- leading: AppBarBackButton(
- onPressed: _popToTickets,
- ),
+ leading: AppBarBackButton(onPressed: _popToTickets),
title: Text("ShopinBit", style: STextStyles.navBarTitle(context)),
),
body: SafeArea(
diff --git a/lib/pages/shopinbit/shopinbit_setup_view.dart b/lib/pages/shopinbit/shopinbit_setup_view.dart
index 3c026a8..5566d53 100644
--- a/lib/pages/shopinbit/shopinbit_setup_view.dart
+++ b/lib/pages/shopinbit/shopinbit_setup_view.dart
@@ -37,9 +37,7 @@ class _ShopInBitSetupViewState extends State<ShopInBitSetupView> {
super.initState();
_keyFuture = ShopInBitService.instance.ensureCustomerKey();
final existingName = ShopInBitService.instance.loadDisplayName();
- _nameController = TextEditingController(
- text: existingName ?? '',
- );
+ _nameController = TextEditingController(text: existingName ?? '');
_nameFocusNode = FocusNode();
_nameFocusNode.addListener(() {
@@ -61,10 +59,9 @@ class _ShopInBitSetupViewState extends State<ShopInBitSetupView> {
await ShopInBitService.instance.setSetupComplete(true);
if (mounted) {
- Navigator.of(context).pushReplacementNamed(
- ShopInBitStep2.routeName,
- arguments: widget.model,
- );
+ Navigator.of(
+ context,
+ ).pushReplacementNamed(ShopInBitStep2.routeName, arguments: widget.model);
}
}
@@ -117,14 +114,12 @@ class _ShopInBitSetupViewState extends State<ShopInBitSetupView> {
if (snapshot.hasError) {
return Text(
"Failed to generate key. Please try again.",
- style: STextStyles.itemSubtitle(
- context,
- ).copyWith(
- color:
- Theme.of(context)
- .extension<StackColors>()!
- .textError,
- ),
+ style: STextStyles.itemSubtitle(context)
+ .copyWith(
+ color: Theme.of(
+ context,
+ ).extension<StackColors>()!.textError,
+ ),
);
}
final key = snapshot.data!;
@@ -174,17 +169,18 @@ class _ShopInBitSetupViewState extends State<ShopInBitSetupView> {
enableSuggestions: false,
onChanged: (_) => setState(() {}),
style: STextStyles.field(context),
- decoration: standardInputDecoration(
- "Display name",
- _nameFocusNode,
- context,
- ).copyWith(
- filled: true,
- contentPadding: const EdgeInsets.symmetric(
- horizontal: 16,
- vertical: 12,
- ),
- ),
+ decoration:
+ standardInputDecoration(
+ "Display name",
+ _nameFocusNode,
+ context,
+ ).copyWith(
+ filled: true,
+ contentPadding: const EdgeInsets.symmetric(
+ horizontal: 16,
+ vertical: 12,
+ ),
+ ),
),
),
const Spacer(),
diff --git a/lib/pages/shopinbit/shopinbit_shipping_view.dart b/lib/pages/shopinbit/shopinbit_shipping_view.dart
index 6bb0f6a..4ad2fe4 100644
--- a/lib/pages/shopinbit/shopinbit_shipping_view.dart
+++ b/lib/pages/shopinbit/shopinbit_shipping_view.dart
@@ -494,9 +494,9 @@ class _ShopInBitShippingViewState extends State<ShopInBitShippingView> {
}
});
},
- activeColor: Theme.of(context)
- .extension<StackColors>()!
- .accentColorBlue,
+ activeColor: Theme.of(
+ context,
+ ).extension<StackColors>()!.accentColorBlue,
),
),
const SizedBox(width: 12),
@@ -572,12 +572,13 @@ class _ShopInBitShippingViewState extends State<ShopInBitShippingView> {
child: Text(
c['label'] as String,
style: isDesktop
- ? STextStyles.desktopTextExtraSmall(context)
- .copyWith(
- color: Theme.of(context)
- .extension<StackColors>()!
- .textFieldActiveText,
- )
+ ? STextStyles.desktopTextExtraSmall(
+ context,
+ ).copyWith(
+ color: Theme.of(context)
+ .extension<StackColors>()!
+ .textFieldActiveText,
+ )
: STextStyles.w500_14(context),
),
),
@@ -608,9 +609,9 @@ class _ShopInBitShippingViewState extends State<ShopInBitShippingView> {
isExpanded: true,
buttonStyleData: ButtonStyleData(
decoration: BoxDecoration(
- color: Theme.of(context)
- .extension<StackColors>()!
- .textFieldDefaultBG,
+ color: Theme.of(
+ context,
+ ).extension<StackColors>()!.textFieldDefaultBG,
borderRadius: BorderRadius.circular(
Constants.size.circularBorderRadius,
),
@@ -634,9 +635,9 @@ class _ShopInBitShippingViewState extends State<ShopInBitShippingView> {
elevation: 0,
maxHeight: 300,
decoration: BoxDecoration(
- color: Theme.of(context)
- .extension<StackColors>()!
- .textFieldDefaultBG,
+ color: Theme.of(
+ context,
+ ).extension<StackColors>()!.textFieldDefaultBG,
borderRadius: BorderRadius.circular(
Constants.size.circularBorderRadius,
),
diff --git a/lib/pages/shopinbit/shopinbit_step_2.dart b/lib/pages/shopinbit/shopinbit_step_2.dart
index 5dfef58..6fa7fe1 100644
--- a/lib/pages/shopinbit/shopinbit_step_2.dart
+++ b/lib/pages/shopinbit/shopinbit_step_2.dart
@@ -55,8 +55,7 @@ class _ShopInBitStep2State extends State<ShopInBitStep2> {
void _continue() {
widget.model.category = _selected;
- final skipGuidelines =
- ShopInBitService.instance.loadGuidelinesAccepted();
+ final skipGuidelines = ShopInBitService.instance.loadGuidelinesAccepted();
if (Util.isDesktop) {
Navigator.of(context, rootNavigator: true).pop();
@@ -69,15 +68,13 @@ class _ShopInBitStep2State extends State<ShopInBitStep2> {
if (skipGuidelines) {
// Returning user — skip guidelines.
widget.model.guidelinesAccepted = true;
- Navigator.of(context).pushNamed(
- ShopInBitStep4.routeName,
- arguments: widget.model,
- );
+ Navigator.of(
+ context,
+ ).pushNamed(ShopInBitStep4.routeName, arguments: widget.model);
} else {
- Navigator.of(context).pushNamed(
- ShopInBitStep3.routeName,
- arguments: widget.model,
- );
+ Navigator.of(
+ context,
+ ).pushNamed(ShopInBitStep3.routeName, arguments: widget.model);
}
}
}
@@ -111,19 +108,16 @@ class _ShopInBitStep2State extends State<ShopInBitStep2> {
height: isDesktop ? 48 : 40,
decoration: BoxDecoration(
shape: BoxShape.circle,
- color: Theme.of(context)
- .extension<StackColors>()!
- .textDark
- .withOpacity(0.1),
+ color: Theme.of(
+ context,
+ ).extension<StackColors>()!.textDark.withOpacity(0.1),
),
alignment: Alignment.center,
child: SvgPicture.asset(
iconAsset,
width: isDesktop ? 24 : 20,
height: isDesktop ? 24 : 20,
- color: Theme.of(context)
- .extension<StackColors>()!
- .textDark,
+ color: Theme.of(context).extension<StackColors>()!.textDark,
),
),
SizedBox(width: isDesktop ? 16 : 12),
@@ -154,9 +148,7 @@ class _ShopInBitStep2State extends State<ShopInBitStep2> {
if (isSelected)
Icon(
Icons.check_circle,
- color: Theme.of(
- context,
- ).extension<StackColors>()!.textDark,
+ color: Theme.of(context).extension<StackColors>()!.textDark,
size: isDesktop ? 24 : 20,
),
],
@@ -241,10 +233,7 @@ class _ShopInBitStep2State extends State<ShopInBitStep2> {
iconSize: 23,
onPressed: _popBack,
),
- Text(
- "ShopinBit",
- style: STextStyles.desktopH3(context),
- ),
+ Text("ShopinBit", style: STextStyles.desktopH3(context)),
],
),
const DesktopDialogCloseButton(),
@@ -273,12 +262,11 @@ class _ShopInBitStep2State extends State<ShopInBitStep2> {
}
},
child: Scaffold(
- backgroundColor:
- Theme.of(context).extension<StackColors>()!.background,
+ backgroundColor: Theme.of(
+ context,
+ ).extension<StackColors>()!.background,
appBar: AppBar(
- leading: AppBarBackButton(
- onPressed: _popBack,
- ),
+ leading: AppBarBackButton(onPressed: _popBack),
title: Text("ShopinBit", style: STextStyles.navBarTitle(context)),
),
body: SafeArea(
diff --git a/lib/pages/shopinbit/shopinbit_step_3.dart b/lib/pages/shopinbit/shopinbit_step_3.dart
index 47db40d..21f7b14 100644
--- a/lib/pages/shopinbit/shopinbit_step_3.dart
+++ b/lib/pages/shopinbit/shopinbit_step_3.dart
@@ -139,11 +139,10 @@ class _ShopInBitStep3State extends State<ShopInBitStep3> {
child: Text(
_guidelinesText(),
style: isDesktop
- ? STextStyles.desktopTextExtraExtraSmall(context)
- .copyWith(
- color: Theme.of(context)
- .extension<StackColors>()!
- .textDark,
+ ? STextStyles.desktopTextExtraExtraSmall(context).copyWith(
+ color: Theme.of(
+ context,
+ ).extension<StackColors>()!.textDark,
)
: STextStyles.itemSubtitle12(context),
),
@@ -151,19 +150,20 @@ class _ShopInBitStep3State extends State<ShopInBitStep3> {
),
),
CheckboxListTile(
- value: _agreed,
- onChanged: (v) => setState(() => _agreed = v ?? false),
- title: Text(
- "I have read and agree to the Service Guidelines",
- style: isDesktop
- ? STextStyles.desktopTextExtraExtraSmall(context)
- : STextStyles.itemSubtitle12(context),
- ),
- controlAffinity: ListTileControlAffinity.leading,
- contentPadding: EdgeInsets.zero,
- activeColor:
- Theme.of(context).extension<StackColors>()!.accentColorBlue,
+ value: _agreed,
+ onChanged: (v) => setState(() => _agreed = v ?? false),
+ title: Text(
+ "I have read and agree to the Service Guidelines",
+ style: isDesktop
+ ? STextStyles.desktopTextExtraExtraSmall(context)
+ : STextStyles.itemSubtitle12(context),
),
+ controlAffinity: ListTileControlAffinity.leading,
+ contentPadding: EdgeInsets.zero,
+ activeColor: Theme.of(
+ context,
+ ).extension<StackColors>()!.accentColorBlue,
+ ),
SizedBox(height: isDesktop ? 24 : 16),
PrimaryButton(
label: "Next",
@@ -189,10 +189,7 @@ class _ShopInBitStep3State extends State<ShopInBitStep3> {
iconSize: 23,
onPressed: _popBack,
),
- Text(
- "ShopinBit",
- style: STextStyles.desktopH3(context),
- ),
+ Text("ShopinBit", style: STextStyles.desktopH3(context)),
],
),
const DesktopDialogCloseButton(),
diff --git a/lib/pages/wallet_view/wallet_view.dart b/lib/pages/wallet_view/wallet_view.dart
index 8573b2a..4ea1403 100644
--- a/lib/pages/wallet_view/wallet_view.dart
+++ b/lib/pages/wallet_view/wallet_view.dart
@@ -1356,9 +1356,9 @@ class _WalletViewState extends ConsumerState<WalletView> {
).extension<StackColors>()!.bottomNavIconIcon,
),
onTap: () {
- Navigator.of(context).pushNamed(
- ServicesView.routeName,
- );
+ Navigator.of(
+ context,
+ ).pushNamed(ServicesView.routeName);
},
),
],
diff --git a/lib/pages_desktop_specific/more_view/sub_widgets/desktop_shopinbit_view.dart b/lib/pages_desktop_specific/more_view/sub_widgets/desktop_shopinbit_view.dart
index 54c72a0..b30ba6b 100644
--- a/lib/pages_desktop_specific/more_view/sub_widgets/desktop_shopinbit_view.dart
+++ b/lib/pages_desktop_specific/more_view/sub_widgets/desktop_shopinbit_view.dart
@@ -156,8 +156,7 @@ class _DesktopServicesViewState extends ConsumerState<DesktopShopInBitView> {
await showDialog<void>(
context: context,
barrierDismissible: false,
- builder: (_) =>
- ShopInBitStep1(model: model),
+ builder: (_) => ShopInBitStep1(model: model),
);
if (mounted) setState(() {});
},
@@ -349,9 +348,7 @@ class _ShopInBitDesktopSetupDialogState
super.initState();
_keyFuture = ShopInBitService.instance.ensureCustomerKey();
final existingName = ShopInBitService.instance.loadDisplayName();
- _nameController = TextEditingController(
- text: existingName ?? '',
- );
+ _nameController = TextEditingController(text: existingName ?? '');
_nameFocusNode = FocusNode();
_nameFocusNode.addListener(() {
@@ -404,34 +401,31 @@ class _ShopInBitDesktopSetupDialogState
children: [
Text(
"Your Customer Key",
- style: STextStyles.desktopTextSmall(context).copyWith(
- fontWeight: FontWeight.bold,
- ),
+ style: STextStyles.desktopTextSmall(
+ context,
+ ).copyWith(fontWeight: FontWeight.bold),
),
const SizedBox(height: 8),
Text(
"This is your ShopinBit customer key: save it "
"somewhere safe, you'll need it to recover "
"your ShopinBit account on a new device.",
- style:
- STextStyles.desktopTextExtraExtraSmall(context),
+ style: STextStyles.desktopTextExtraExtraSmall(context),
),
const SizedBox(height: 12),
FutureBuilder<String>(
future: _keyFuture,
builder: (context, snapshot) {
if (snapshot.connectionState != ConnectionState.done) {
- return const Center(
- child: CircularProgressIndicator(),
- );
+ return const Center(child: CircularProgressIndicator());
}
if (snapshot.hasError) {
return Text(
"Failed to generate key. Please try again.",
style: STextStyles.desktopTextSmall(context).copyWith(
- color: Theme.of(context)
- .extension<StackColors>()!
- .textError,
+ color: Theme.of(
+ context,
+ ).extension<StackColors>()!.textError,
),
);
}
@@ -442,18 +436,15 @@ class _ShopInBitDesktopSetupDialogState
Expanded(
child: SelectableText(
key,
- style:
- STextStyles.desktopTextExtraExtraSmall(
- context,
- ),
+ style: STextStyles.desktopTextExtraExtraSmall(
+ context,
+ ),
),
),
IconButton(
icon: const Icon(Icons.copy, size: 20),
onPressed: () {
- Clipboard.setData(
- ClipboardData(text: key),
- );
+ Clipboard.setData(ClipboardData(text: key));
showFloatingFlushBar(
type: FlushBarType.info,
message: "Copied to clipboard!",
@@ -469,9 +460,9 @@ class _ShopInBitDesktopSetupDialogState
const SizedBox(height: 24),
Text(
"Display Name",
- style: STextStyles.desktopTextSmall(context).copyWith(
- fontWeight: FontWeight.bold,
- ),
+ style: STextStyles.desktopTextSmall(
+ context,
+ ).copyWith(fontWeight: FontWeight.bold),
),
const SizedBox(height: 8),
TextField(
@@ -479,9 +470,7 @@ class _ShopInBitDesktopSetupDialogState
focusNode: _nameFocusNode,
onChanged: (_) => setState(() {}),
style: STextStyles.desktopTextSmall(context),
- decoration: const InputDecoration(
- hintText: "Display name",
- ),
+ decoration: const InputDecoration(hintText: "Display name"),
),
const Spacer(),
PrimaryButton(
diff --git a/lib/pages_desktop_specific/settings/settings_menu/shopinbit_settings.dart b/lib/pages_desktop_specific/settings/settings_menu/shopinbit_settings.dart
index f311c9e..146243c 100644
--- a/lib/pages_desktop_specific/settings/settings_menu/shopinbit_settings.dart
+++ b/lib/pages_desktop_specific/settings/settings_menu/shopinbit_settings.dart
@@ -347,195 +347,203 @@ class _ShopInBitDesktopSettingsState
Widget build(BuildContext context) {
return SingleChildScrollView(
child: Column(
- children: [
- Padding(
- padding: const EdgeInsets.only(right: 30),
- child: RoundedWhiteContainer(
- radiusMultiplier: 2,
- child: Column(
- crossAxisAlignment: CrossAxisAlignment.start,
- children: [
- Padding(
- padding: const EdgeInsets.all(8.0),
- child: SvgPicture.asset(
- Assets.svg.key,
- width: 48,
- height: 48,
+ children: [
+ Padding(
+ padding: const EdgeInsets.only(right: 30),
+ child: RoundedWhiteContainer(
+ radiusMultiplier: 2,
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ Padding(
+ padding: const EdgeInsets.all(8.0),
+ child: SvgPicture.asset(
+ Assets.svg.key,
+ width: 48,
+ height: 48,
+ ),
),
- ),
- Padding(
- padding: const EdgeInsets.all(10),
- child: Column(
- crossAxisAlignment: CrossAxisAlignment.start,
- children: [
- Text(
- "Customer Key",
- style: STextStyles.desktopTextSmall(context),
- ),
- const SizedBox(height: 16),
- Text(
- "Your customer key identifies you to ShopinBit. "
- "Save it to restore access to your conversations "
- "on another device. If you change it, you will "
- "lose access to existing conversations.",
- style: STextStyles.desktopTextExtraExtraSmall(context),
- ),
- const SizedBox(height: 20),
- if (_currentKey != null) ...[
+ Padding(
+ padding: const EdgeInsets.all(10),
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
Text(
- "Current key",
- style: STextStyles.desktopTextExtraExtraSmall(context)
- .copyWith(
- color: Theme.of(
+ "Customer Key",
+ style: STextStyles.desktopTextSmall(context),
+ ),
+ const SizedBox(height: 16),
+ Text(
+ "Your customer key identifies you to ShopinBit. "
+ "Save it to restore access to your conversations "
+ "on another device. If you change it, you will "
+ "lose access to existing conversations.",
+ style: STextStyles.desktopTextExtraExtraSmall(
+ context,
+ ),
+ ),
+ const SizedBox(height: 20),
+ if (_currentKey != null) ...[
+ Text(
+ "Current key",
+ style:
+ STextStyles.desktopTextExtraExtraSmall(
context,
- ).extension<StackColors>()!.textDark3,
+ ).copyWith(
+ color: Theme.of(
+ context,
+ ).extension<StackColors>()!.textDark3,
+ ),
+ ),
+ const SizedBox(height: 8),
+ Row(
+ children: [
+ SelectableText(
+ _currentKey!,
+ style: STextStyles.desktopTextSmall(context),
),
- ),
- const SizedBox(height: 8),
- Row(
- children: [
- SelectableText(
- _currentKey!,
- style: STextStyles.desktopTextSmall(context),
- ),
- const SizedBox(width: 12),
- GestureDetector(
- onTap: () async {
- await Clipboard.setData(
- ClipboardData(text: _currentKey!),
- );
- if (mounted) {
- unawaited(
- showFloatingFlushBar(
- type: FlushBarType.info,
- message: "Key copied to clipboard",
- context: context,
- ),
+ const SizedBox(width: 12),
+ GestureDetector(
+ onTap: () async {
+ await Clipboard.setData(
+ ClipboardData(text: _currentKey!),
);
- }
- },
- child: SvgPicture.asset(
- Assets.svg.copy,
- width: 20,
- height: 20,
- color: Theme.of(
- context,
- ).extension<StackColors>()!.textDark3,
+ if (mounted) {
+ unawaited(
+ showFloatingFlushBar(
+ type: FlushBarType.info,
+ message: "Key copied to clipboard",
+ context: context,
+ ),
+ );
+ }
+ },
+ child: SvgPicture.asset(
+ Assets.svg.copy,
+ width: 20,
+ height: 20,
+ color: Theme.of(
+ context,
+ ).extension<StackColors>()!.textDark3,
+ ),
+ ),
+ ],
+ ),
+ const SizedBox(height: 20),
+ ] else
+ Padding(
+ padding: const EdgeInsets.only(bottom: 20),
+ child: Text(
+ "No key set",
+ style: STextStyles.desktopTextExtraExtraSmall(
+ context,
),
),
- ],
+ ),
+ PrimaryButton(
+ width: 210,
+ buttonHeight: ButtonHeight.m,
+ enabled: !_loading,
+ label: _currentKey == null
+ ? "Generate key"
+ : "Generate new key",
+ onPressed: _generate,
),
const SizedBox(height: 20),
- ] else
- Padding(
- padding: const EdgeInsets.only(bottom: 20),
- child: Text(
- "No key set",
- style: STextStyles.desktopTextExtraExtraSmall(
- context,
- ),
- ),
+ Text(
+ "Restore key",
+ style: STextStyles.desktopTextSmall(context),
),
- PrimaryButton(
- width: 210,
- buttonHeight: ButtonHeight.m,
- enabled: !_loading,
- label: _currentKey == null
- ? "Generate key"
- : "Generate new key",
- onPressed: _generate,
- ),
- const SizedBox(height: 20),
- Text(
- "Restore key",
- style: STextStyles.desktopTextSmall(context),
- ),
- const SizedBox(height: 8),
- Text(
- "Enter a previously saved customer key to "
- "restore access to your ShopinBit "
- "conversations.",
- style: STextStyles.desktopTextExtraExtraSmall(context),
- ),
- const SizedBox(height: 16),
- SizedBox(
- width: 512,
- child: ClipRRect(
- borderRadius: BorderRadius.circular(
- Constants.size.circularBorderRadius,
+ const SizedBox(height: 8),
+ Text(
+ "Enter a previously saved customer key to "
+ "restore access to your ShopinBit "
+ "conversations.",
+ style: STextStyles.desktopTextExtraExtraSmall(
+ context,
),
- child: TextField(
- controller: _manualKeyController,
- focusNode: _manualKeyFocusNode,
- style: STextStyles.field(context),
- decoration: standardInputDecoration(
- "Enter customer key",
- _manualKeyFocusNode,
- context,
+ ),
+ const SizedBox(height: 16),
+ SizedBox(
+ width: 512,
+ child: ClipRRect(
+ borderRadius: BorderRadius.circular(
+ Constants.size.circularBorderRadius,
+ ),
+ child: TextField(
+ controller: _manualKeyController,
+ focusNode: _manualKeyFocusNode,
+ style: STextStyles.field(context),
+ decoration: standardInputDecoration(
+ "Enter customer key",
+ _manualKeyFocusNode,
+ context,
+ ),
+ onChanged: (_) => setState(() {}),
),
- onChanged: (_) => setState(() {}),
),
),
- ),
- const SizedBox(height: 16),
- PrimaryButton(
- width: 210,
- buttonHeight: ButtonHeight.m,
- enabled:
- !_loading &&
- _manualKeyController.text.trim().isNotEmpty,
- label: "Set key",
- onPressed: _setManualKey,
- ),
- const SizedBox(height: 20),
- Text(
- "Display Name",
- style: STextStyles.desktopTextSmall(context),
- ),
- const SizedBox(height: 8),
- Text(
- "The name ShopinBit staff will see "
- "when communicating with you.",
- style: STextStyles.desktopTextExtraExtraSmall(context),
- ),
- const SizedBox(height: 16),
- SizedBox(
- width: 512,
- child: ClipRRect(
- borderRadius: BorderRadius.circular(
- Constants.size.circularBorderRadius,
+ const SizedBox(height: 16),
+ PrimaryButton(
+ width: 210,
+ buttonHeight: ButtonHeight.m,
+ enabled:
+ !_loading &&
+ _manualKeyController.text.trim().isNotEmpty,
+ label: "Set key",
+ onPressed: _setManualKey,
+ ),
+ const SizedBox(height: 20),
+ Text(
+ "Display Name",
+ style: STextStyles.desktopTextSmall(context),
+ ),
+ const SizedBox(height: 8),
+ Text(
+ "The name ShopinBit staff will see "
+ "when communicating with you.",
+ style: STextStyles.desktopTextExtraExtraSmall(
+ context,
),
- child: TextField(
- controller: _displayNameController,
- focusNode: _displayNameFocusNode,
- style: STextStyles.field(context),
- decoration: standardInputDecoration(
- "Display name",
- _displayNameFocusNode,
- context,
+ ),
+ const SizedBox(height: 16),
+ SizedBox(
+ width: 512,
+ child: ClipRRect(
+ borderRadius: BorderRadius.circular(
+ Constants.size.circularBorderRadius,
+ ),
+ child: TextField(
+ controller: _displayNameController,
+ focusNode: _displayNameFocusNode,
+ style: STextStyles.field(context),
+ decoration: standardInputDecoration(
+ "Display name",
+ _displayNameFocusNode,
+ context,
+ ),
+ onChanged: (_) => setState(() {}),
),
- onChanged: (_) => setState(() {}),
),
),
- ),
- const SizedBox(height: 16),
- PrimaryButton(
- width: 210,
- buttonHeight: ButtonHeight.m,
- enabled:
- !_savingName &&
- _displayNameController.text.trim().isNotEmpty,
- label: "Save",
- onPressed: _saveDisplayName,
- ),
- ],
+ const SizedBox(height: 16),
+ PrimaryButton(
+ width: 210,
+ buttonHeight: ButtonHeight.m,
+ enabled:
+ !_savingName &&
+ _displayNameController.text.trim().isNotEmpty,
+ label: "Save",
+ onPressed: _saveDisplayName,
+ ),
+ ],
+ ),
),
- ),
- ],
+ ],
+ ),
),
),
- ),
- ],
+ ],
),
);
}
diff --git a/lib/services/shopinbit/shopinbit_service.dart b/lib/services/shopinbit/shopinbit_service.dart
index 1caa8aa..b066943 100644
--- a/lib/services/shopinbit/shopinbit_service.dart
+++ b/lib/services/shopinbit/shopinbit_service.dart
@@ -98,7 +98,7 @@ class ShopInBitService {
key: "shopInBitGuidelinesAccepted",
)
as bool? ??
- false;
+ false;
return _guidelinesAccepted!;
}
@@ -122,7 +122,7 @@ class ShopInBitService {
key: "shopInBitSetupComplete",
)
as bool? ??
- false;
+ false;
return _setupComplete!;
}
@@ -133,9 +133,7 @@ class ShopInBitService {
key: "shopInBitSetupComplete",
value: complete,
);
- Logging.instance.i(
- "ShopInBitService: setup complete set to $complete",
- );
+ Logging.instance.i("ShopInBitService: setup complete set to $complete");
}
String? loadDisplayName() {
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.