Skip to content

Commit b1076f8

Browse files
committed
Merge branch 'feat/shopinbit' into vacay
2 parents 69e3b8a + a1088fb commit b1076f8

25 files changed

+4617
-596
lines changed

lib/pages/more_view/services_view.dart

Lines changed: 43 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,11 @@ import '../../widgets/desktop/primary_button.dart';
1414
import '../../widgets/desktop/secondary_button.dart';
1515
import '../../widgets/rounded_white_container.dart';
1616
import '../../widgets/stack_dialog.dart';
17+
import '../../services/shopinbit/shopinbit_service.dart';
1718
import '../shopinbit/shopinbit_settings_view.dart';
19+
import '../shopinbit/shopinbit_setup_view.dart';
1820
import '../shopinbit/shopinbit_step_1.dart';
21+
import '../shopinbit/shopinbit_step_2.dart';
1922
import '../shopinbit/shopinbit_tickets_view.dart';
2023

2124
class ServicesView extends StatefulWidget {
@@ -74,7 +77,7 @@ class _ServicesViewState extends State<ServicesView> {
7477
child: Column(
7578
crossAxisAlignment: CrossAxisAlignment.start,
7679
children: [
77-
Text("ShopInBit", style: STextStyles.pageTitleH2(dialogContext)),
80+
Text("ShopinBit", style: STextStyles.pageTitleH2(dialogContext)),
7881
const SizedBox(height: 8),
7982
RichText(
8083
text: TextSpan(
@@ -85,7 +88,7 @@ class _ServicesViewState extends State<ServicesView> {
8588
"Please note the following before proceeding:"
8689
"\n\n\u2022 Minimum order amount: 1,000 EUR"
8790
"\n\u2022 Service fee: 10% of the order total"
88-
"\n\nBy continuing, you agree to the ShopInBit ",
91+
"\n\nBy continuing, you agree to the ShopinBit ",
8992
),
9093
TextSpan(
9194
text: "Privacy Policy",
@@ -138,10 +141,27 @@ class _ServicesViewState extends State<ServicesView> {
138141
.getPrimaryEnabledButtonStyle(dialogContext),
139142
onPressed: () async {
140143
Navigator.of(dialogContext).pop();
141-
await Navigator.of(context).pushNamed(
142-
ShopInBitStep1.routeName,
143-
arguments: ShopInBitOrderModel(),
144-
);
144+
final model = ShopInBitOrderModel();
145+
final service = ShopInBitService.instance;
146+
147+
if (service.loadSetupComplete()) {
148+
// Returning user: pre-load display name,
149+
// skip Step 1, go to Step 2
150+
final savedName = service.loadDisplayName();
151+
if (savedName != null && savedName.isNotEmpty) {
152+
model.displayName = savedName;
153+
}
154+
await Navigator.of(context).pushNamed(
155+
ShopInBitStep2.routeName,
156+
arguments: model,
157+
);
158+
} else {
159+
// First-time user: show setup flow
160+
await Navigator.of(context).pushNamed(
161+
ShopInBitSetupView.routeName,
162+
arguments: model,
163+
);
164+
}
145165
if (mounted) setState(() {});
146166
},
147167
child: Text(
@@ -189,7 +209,7 @@ class _ServicesViewState extends State<ServicesView> {
189209
const SizedBox(width: 12),
190210
Expanded(
191211
child: Text(
192-
"ShopInBit",
212+
"ShopinBit",
193213
style: STextStyles.titleBold12(context),
194214
),
195215
),
@@ -211,6 +231,18 @@ class _ServicesViewState extends State<ServicesView> {
211231
],
212232
),
213233
const SizedBox(height: 12),
234+
Text(
235+
"Turn your crypto into Electronics, Flights, Hotel, "
236+
"Cars or any other legal product or service... "
237+
"ShopinBit is a concierge shopping service that helps "
238+
"you 'live the good life with crypto'...",
239+
style: STextStyles.itemSubtitle12(context).copyWith(
240+
color: Theme.of(
241+
context,
242+
).extension<StackColors>()!.textSubtitle1,
243+
),
244+
),
245+
const SizedBox(height: 12),
214246
RichText(
215247
text: TextSpan(
216248
style: STextStyles.itemSubtitle12(context).copyWith(
@@ -221,11 +253,9 @@ class _ServicesViewState extends State<ServicesView> {
221253
children: [
222254
const TextSpan(
223255
text:
224-
"Concierge shopping service. Purchase "
225-
"products and services using cryptocurrency.\n\n"
226256
"Minimum order value of 1,000 EUR. "
227257
"A 10% service fee applies to all orders.\n\n"
228-
"By using ShopInBit, you agree to their ",
258+
"By using ShopinBit, you agree to their ",
229259
),
230260
TextSpan(
231261
text: "Terms & Conditions",
@@ -272,7 +302,7 @@ class _ServicesViewState extends State<ServicesView> {
272302
),
273303
const SizedBox(height: 16),
274304
PrimaryButton(
275-
label: "Shop with ShopInBit",
305+
label: "Shop with ShopinBit",
276306
enabled: true,
277307
onPressed: () => _showShopDialog(context),
278308
),
@@ -284,8 +314,8 @@ class _ServicesViewState extends State<ServicesView> {
284314
.length;
285315
return SecondaryButton(
286316
label: count > 0
287-
? "My tickets ($count)"
288-
: "My tickets",
317+
? "My requests ($count)"
318+
: "My requests",
289319
onPressed: () async {
290320
await Navigator.of(
291321
context,

lib/pages/settings_views/global_settings_view/global_settings_view.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ class GlobalSettingsView extends StatelessWidget {
264264
SettingsListButton(
265265
iconAssetName: Assets.svg.key,
266266
iconSize: 16,
267-
title: "ShopInBit",
267+
title: "ShopinBit",
268268
onPressed: () {
269269
Navigator.of(context).pushNamed(
270270
ShopInBitSettingsView.routeName,

lib/pages/settings_views/global_settings_view/hidden_settings.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -325,15 +325,15 @@ class HiddenSettings extends StatelessWidget {
325325
showFloatingFlushBar(
326326
type: FlushBarType.success,
327327
message:
328-
"Deleted ${tickets.length} ShopInBit ticket(s)",
328+
"Deleted ${tickets.length} ShopinBit request(s)",
329329
context: context,
330330
),
331331
);
332332
}
333333
},
334334
child: RoundedWhiteContainer(
335335
child: Text(
336-
"Delete all ShopInBit tickets",
336+
"Delete all ShopinBit requests",
337337
style: STextStyles.button(context).copyWith(
338338
color: Theme.of(
339339
context,

0 commit comments

Comments
 (0)