SIB and GCs accessed from home screen on mobile
What changed, and why it matters
This commit moves two existing app features—gift cards and concierge services—from a wallet-specific menu to the main home screen on mobile. It is a user-interface navigation change, not a security fix or vulnerability patch. There is no indication it fixes a bug that could be exploited.
No security action required. Treat as a routine UI/UX refactor. If reviewing for release, verify that the removed named routes are no longer referenced elsewhere and that the new tab navigation behaves correctly on small screens.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The change refactors GiftCardsView and ServicesView so they are rendered as tabs inside HomeView rather than as standalone routed pages reachable from WalletView. It removes their named routes and route generator entries, strips their Scaffold/AppBar wrappers, and updates ShopInBit flows to pop back to HomeView.routeName instead of ServicesView.routeName. The button bar fade logic is also reworked to support more tabs. No cryptographic, network, permission, or input-validation code is modified.
Changed components
lib/pages/home_view/home_view.dartlib/pages/home_view/sub_widgets/home_view_button_bar.dartlib/pages/more_view/gift_cards_view.dartlib/pages/more_view/services_view.dartlib/pages/shopinbit/shopinbit_car_fee_view.dartlib/pages/shopinbit/shopinbit_car_research_payment_view.dartlib/pages/shopinbit/shopinbit_order_created.dartlib/pages/shopinbit/shopinbit_payment_view.dartlib/pages/wallet_view/wallet_view.dartlib/route_generator.dartInspect captured patch +331 / −364
diff --git a/lib/pages/home_view/home_view.dart b/lib/pages/home_view/home_view.dart
index e464edb..fcd4259 100644
--- a/lib/pages/home_view/home_view.dart
+++ b/lib/pages/home_view/home_view.dart
@@ -38,6 +38,8 @@ import '../../widgets/small_tor_icon.dart';
import '../../widgets/stack_dialog.dart';
import '../buy_view/buy_view.dart';
import '../exchange_view/exchange_view.dart';
+import '../more_view/gift_cards_view.dart';
+import '../more_view/services_view.dart';
import '../notification_views/notifications_view.dart';
import '../pinpad_views/lock_screen_view.dart';
import '../settings_views/global_settings_view/global_settings_view.dart';
@@ -227,6 +229,11 @@ class _HomeViewState extends ConsumerState<HomeView> {
const ExchangeView(),
if (AppConfig.hasFeature(AppFeature.buy) && Constants.enableExchange)
const BuyView(),
+ if (AppConfig.hasFeature(AppFeature.cakePay) && Constants.enableExchange)
+ const GiftCardsView(),
+ if (AppConfig.hasFeature(AppFeature.shopinBit) &&
+ Constants.enableExchange)
+ const ServicesView(),
];
ref.read(notificationsProvider).startCheckingWatchedNotifications();
diff --git a/lib/pages/home_view/sub_widgets/home_view_button_bar.dart b/lib/pages/home_view/sub_widgets/home_view_button_bar.dart
index 3ff022c..2fefa8c 100644
--- a/lib/pages/home_view/sub_widgets/home_view_button_bar.dart
+++ b/lib/pages/home_view/sub_widgets/home_view_button_bar.dart
@@ -17,9 +17,14 @@ import 'package:flutter_riverpod/flutter_riverpod.dart';
import '../../../app_config.dart';
import '../../../providers/providers.dart';
import '../../../themes/stack_colors.dart';
+import '../../../utilities/constants.dart';
import '../../../utilities/text_styles.dart';
-const double _fadeWidth = 32;
+const double _fadeWidth = 64;
+const double _fadeRampDistance = _fadeWidth;
+const Duration _fadeDuration = Duration(milliseconds: 200);
+
+enum _FadeEdge { left, right }
class HomeViewButtonBar extends StatefulWidget {
const HomeViewButtonBar({super.key});
@@ -29,48 +34,29 @@ class HomeViewButtonBar extends StatefulWidget {
}
class _HomeViewButtonBarState extends State<HomeViewButtonBar> {
- static const Duration _fadeDuration = Duration(milliseconds: 200);
-
- bool _canScrollLeft = false;
- bool _canScrollRight = false;
- static const int _rampSamples = 8;
+ double _leftProximity = 0;
+ double _rightProximity = 0;
void _updateEdges(ScrollMetrics metrics) {
- final bool canScrollLeft = metrics.extentBefore > 0;
- final bool canScrollRight = metrics.extentAfter > 0;
- if (canScrollLeft == _canScrollLeft && canScrollRight == _canScrollRight) {
+ final double leftProximity = clampDouble(
+ metrics.extentBefore / _fadeRampDistance,
+ 0,
+ 1,
+ );
+ final double rightProximity = clampDouble(
+ metrics.extentAfter / _fadeRampDistance,
+ 0,
+ 1,
+ );
+ if (leftProximity == _leftProximity && rightProximity == _rightProximity) {
return;
}
setState(() {
- _canScrollLeft = canScrollLeft;
- _canScrollRight = canScrollRight;
+ _leftProximity = leftProximity;
+ _rightProximity = rightProximity;
});
}
- Shader _fadeShader(Rect bounds, double leftFade, double rightFade) {
- final double fade = clampDouble(_fadeWidth / bounds.width, 0, 0.5);
- final List<Color> colors = [];
- final List<double> stops = [];
-
- for (int i = 0; i <= _rampSamples; i++) {
- final double t = i / _rampSamples;
- stops.add(fade * t);
- colors.add(_rampColor(edgeAlpha: 1 - leftFade, t: t));
- }
- for (int i = 0; i <= _rampSamples; i++) {
- final double t = i / _rampSamples;
- stops.add(1 - fade * (1 - t));
- colors.add(_rampColor(edgeAlpha: 1 - rightFade, t: 1 - t));
- }
-
- return LinearGradient(colors: colors, stops: stops).createShader(bounds);
- }
-
- Color _rampColor({required double edgeAlpha, required double t}) {
- final double eased = Curves.easeInOutSine.transform(t);
- return Colors.white.withValues(alpha: edgeAlpha + (1 - edgeAlpha) * eased);
- }
-
@override
Widget build(BuildContext context) {
return NotificationListener<ScrollMetricsNotification>(
@@ -83,23 +69,78 @@ class _HomeViewButtonBarState extends State<HomeViewButtonBar> {
_updateEdges(notification.metrics);
return false;
},
+ child: Stack(
+ children: [
+ const RepaintBoundary(child: _HomeViewButtonBarContent()),
+ Positioned(
+ left: 0,
+ top: 0,
+ bottom: 0,
+ child: _EdgeFadeStrip(edge: .left, proximity: _leftProximity),
+ ),
+ Positioned(
+ right: 0,
+ top: 0,
+ bottom: 0,
+ child: _EdgeFadeStrip(edge: .right, proximity: _rightProximity),
+ ),
+ ],
+ ),
+ ),
+ );
+ }
+}
+
+class _EdgeFadeStrip extends StatelessWidget {
+ const _EdgeFadeStrip({required this.edge, required this.proximity});
+
+ static const int _rampSamples = 8;
+
+ static final List<double> _ramp = [
+ for (int i = 0; i <= _rampSamples; i++)
+ 1 - Curves.easeInOutSine.transform(i / _rampSamples),
+ ];
+
+ final _FadeEdge edge;
+ final double proximity;
+
+ @override
+ Widget build(BuildContext context) {
+ final Color background = Theme.of(
+ context,
+ ).extension<StackColors>()!.background;
+ final (Alignment begin, Alignment end) = switch (edge) {
+ .left => (.centerLeft, .centerRight),
+ .right => (.centerRight, .centerLeft),
+ };
+
+ return RepaintBoundary(
+ child: IgnorePointer(
child: TweenAnimationBuilder<double>(
- tween: Tween<double>(end: _canScrollLeft ? 1 : 0),
+ tween: Tween<double>(end: proximity > 0 ? 1 : 0),
duration: _fadeDuration,
curve: Curves.easeOut,
- builder: (context, leftFade, child) => TweenAnimationBuilder<double>(
- tween: Tween<double>(end: _canScrollRight ? 1 : 0),
- duration: _fadeDuration,
- curve: Curves.easeOut,
- builder: (context, rightFade, child) => ShaderMask(
- shaderCallback: (bounds) =>
- _fadeShader(bounds, leftFade, rightFade),
- blendMode: .dstIn,
- child: child,
- ),
- child: child,
- ),
- child: const _HomeViewButtonBarContent(),
+ builder: (context, timeStrength, _) {
+ final double strength = timeStrength * proximity;
+ if (strength == 0) {
+ return const SizedBox(width: _fadeWidth);
+ }
+ return SizedBox(
+ width: _fadeWidth,
+ child: DecoratedBox(
+ decoration: BoxDecoration(
+ gradient: LinearGradient(
+ begin: begin,
+ end: end,
+ colors: [
+ for (final double factor in _ramp)
+ background.withValues(alpha: strength * factor),
+ ],
+ ),
+ ),
+ ),
+ );
+ },
),
),
);
@@ -123,14 +164,27 @@ class _HomeViewButtonBarContent extends StatelessWidget {
const Expanded(
child: _HomeViewTopMenuButton(index: 0, label: "Wallets"),
),
- if (AppConfig.hasFeature(.swap))
+ if (AppConfig.hasFeature(.swap) && Constants.enableExchange)
const Expanded(
child: _HomeViewTopMenuButton(index: 1, label: "Swap"),
),
- if (AppConfig.hasFeature(.buy))
+ if (AppConfig.hasFeature(AppFeature.buy) &&
+ Constants.enableExchange)
const Expanded(
child: _HomeViewTopMenuButton(index: 2, label: "Buy"),
),
+ if (AppConfig.hasFeature(.cakePay) && Constants.enableExchange)
+ const Expanded(
+ child: _HomeViewTopMenuButton(
+ index: 3,
+ label: "Gift cards",
+ ),
+ ),
+ if (AppConfig.hasFeature(.shopinBit) &&
+ Constants.enableExchange)
+ const Expanded(
+ child: _HomeViewTopMenuButton(index: 4, label: "Services"),
+ ),
],
),
),
@@ -225,34 +279,33 @@ class _HomeViewTopMenuButtonState
@override
Widget build(BuildContext context) {
- ref.listen(homeViewPageIndexStateProvider, (previous, next) {
- if (next == widget.index) {
- _scheduleReveal(animate: true);
- }
- });
+ final bool isSelected = ref.watch(
+ homeViewPageIndexStateProvider.select((index) => index == widget.index),
+ );
- final selectedIndex = ref.watch(homeViewPageIndexStateProvider);
+ ref.listen(
+ homeViewPageIndexStateProvider.select((index) => index == widget.index),
+ (previous, next) {
+ if (next) {
+ _scheduleReveal(animate: true);
+ }
+ },
+ );
+
+ final StackColors colors = Theme.of(context).extension<StackColors>()!;
return TextButton(
- style: selectedIndex == widget.index
- ? Theme.of(context)
- .extension<StackColors>()!
- .getPrimaryEnabledButtonStyle(context)!
- .copyWith(
- minimumSize: MaterialStateProperty.all<Size>(
- const Size(46, 36),
- ),
- )
- : Theme.of(context)
- .extension<StackColors>()!
- .getSecondaryEnabledButtonStyle(context)!
- .copyWith(
- minimumSize: MaterialStateProperty.all<Size>(
- const Size(46, 36),
- ),
+ style:
+ (isSelected
+ ? colors.getPrimaryEnabledButtonStyle(context)!
+ : colors.getSecondaryEnabledButtonStyle(context)!)
+ .copyWith(
+ minimumSize: MaterialStateProperty.all<Size>(
+ const Size(46, 36),
),
- onPressed: () async {
+ ),
+ onPressed: () {
FocusScope.of(context).unfocus();
- if (selectedIndex != widget.index) {
+ if (!isSelected) {
ref.read(homeViewPageIndexStateProvider.state).state = widget.index;
}
},
@@ -262,11 +315,9 @@ class _HomeViewTopMenuButtonState
widget.label,
style: STextStyles.button(context).copyWith(
fontSize: 14,
- color: selectedIndex == widget.index
- ? Theme.of(context).extension<StackColors>()!.buttonTextPrimary
- : Theme.of(
- context,
- ).extension<StackColors>()!.buttonTextSecondary,
+ color: isSelected
+ ? colors.buttonTextPrimary
+ : colors.buttonTextSecondary,
),
),
),
diff --git a/lib/pages/more_view/gift_cards_view.dart b/lib/pages/more_view/gift_cards_view.dart
index 48ff0f3..db0ecb4 100644
--- a/lib/pages/more_view/gift_cards_view.dart
+++ b/lib/pages/more_view/gift_cards_view.dart
@@ -6,8 +6,6 @@ import '../../services/event_bus/events/global/tor_connection_status_changed_eve
import '../../services/tor_service.dart';
import '../../themes/stack_colors.dart';
import '../../utilities/text_styles.dart';
-import '../../widgets/background.dart';
-import '../../widgets/custom_buttons/app_bar_icon_button.dart';
import '../../widgets/desktop/primary_button.dart';
import '../../widgets/desktop/secondary_button.dart';
import '../../widgets/icon_widgets/credit_card_icon.dart';
@@ -19,8 +17,6 @@ import '../cakepay/cakepay_vendors_view.dart';
class GiftCardsView extends ConsumerStatefulWidget {
const GiftCardsView({super.key});
- static const String routeName = "/giftCardsView";
-
@override
ConsumerState<GiftCardsView> createState() => _GiftCardsViewState();
}
@@ -44,100 +40,88 @@ class _GiftCardsViewState extends ConsumerState<GiftCardsView> {
_torEnabled = status != TorConnectionStatus.disconnected;
});
},
- child: Background(
- child: Scaffold(
- backgroundColor: Theme.of(
- context,
- ).extension<StackColors>()!.background,
- appBar: AppBar(
- leading: const AppBarBackButton(),
- title: Text("Gift cards", style: STextStyles.navBarTitle(context)),
- ),
- body: SafeArea(
- child: Padding(
- padding: const EdgeInsets.all(16),
- child: Column(
- children: [
- RoundedWhiteContainer(
- child: Column(
- crossAxisAlignment: CrossAxisAlignment.start,
+ child: SafeArea(
+ child: Padding(
+ padding: const EdgeInsets.all(16),
+ child: Column(
+ children: [
+ RoundedWhiteContainer(
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ Row(
children: [
- Row(
- children: [
- const CreditCardIcon(width: 32, height: 32),
- const SizedBox(width: 12),
- Expanded(
- child: Column(
- crossAxisAlignment: CrossAxisAlignment.start,
- mainAxisSize: MainAxisSize.min,
- children: [
- Text(
- "CakePay",
- style: STextStyles.titleBold12(context),
- ),
- const SizedBox(height: 2),
- Text(
- "Purchase gift cards with cryptocurrency",
- style: STextStyles.itemSubtitle12(context)
- .copyWith(
- color: Theme.of(context)
- .extension<StackColors>()!
- .textSubtitle1,
- ),
- ),
- ],
+ const CreditCardIcon(width: 32, height: 32),
+ const SizedBox(width: 12),
+ Expanded(
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ mainAxisSize: MainAxisSize.min,
+ children: [
+ Text(
+ "CakePay",
+ style: STextStyles.titleBold12(context),
),
- ),
- ],
+ const SizedBox(height: 2),
+ Text(
+ "Purchase gift cards with cryptocurrency",
+ style: STextStyles.itemSubtitle12(context)
+ .copyWith(
+ color: Theme.of(
+ context,
+ ).extension<StackColors>()!.textSubtitle1,
+ ),
+ ),
+ ],
+ ),
),
- const SizedBox(height: 16),
- if (_torEnabled)
- Padding(
- padding: const EdgeInsets.only(bottom: 12),
- child: Text(
- "CakePay is not available while Tor is enabled",
- style: STextStyles.itemSubtitle12(context)
- .copyWith(
- color: Theme.of(
- context,
- ).extension<StackColors>()!.textSubtitle1,
- ),
- ),
+ ],
+ ),
+ const SizedBox(height: 16),
+ if (_torEnabled)
+ Padding(
+ padding: const EdgeInsets.only(bottom: 12),
+ child: Text(
+ "CakePay is not available while Tor is enabled",
+ style: STextStyles.itemSubtitle12(context).copyWith(
+ color: Theme.of(
+ context,
+ ).extension<StackColors>()!.textSubtitle1,
),
- Row(
- children: [
- Expanded(
- child: SecondaryButton(
- label: "My Orders",
- enabled: !_torEnabled,
- onPressed: () {
- Navigator.of(
- context,
- ).pushNamed(CakePayOrdersView.routeName);
- },
- ),
- ),
+ ),
+ ),
+ Row(
+ children: [
+ Expanded(
+ child: SecondaryButton(
+ label: "My Orders",
+ enabled: !_torEnabled,
+ onPressed: () {
+ Navigator.of(
+ context,
+ ).pushNamed(CakePayOrdersView.routeName);
+ },
+ ),
+ ),
- const SizedBox(width: 16),
- Expanded(
- child: PrimaryButton(
- label: "Browse",
- enabled: !_torEnabled,
- onPressed: () {
- Navigator.of(
- context,
- ).pushNamed(CakePayVendorsView.routeName);
- },
- ),
- ),
- ],
+ const SizedBox(width: 16),
+ Expanded(
+ child: PrimaryButton(
+ label: "Browse",
+ enabled: !_torEnabled,
+ onPressed: () {
+ Navigator.of(
+ context,
+ ).pushNamed(CakePayVendorsView.routeName);
+ },
+ ),
),
],
),
- ),
- ],
+ ],
+ ),
),
- ),
+ ],
),
),
),
diff --git a/lib/pages/more_view/services_view.dart b/lib/pages/more_view/services_view.dart
index 7025e34..0cd01d8 100644
--- a/lib/pages/more_view/services_view.dart
+++ b/lib/pages/more_view/services_view.dart
@@ -8,8 +8,6 @@ import '../../providers/providers.dart';
import '../../themes/stack_colors.dart';
import '../../utilities/assets.dart';
import '../../utilities/text_styles.dart';
-import '../../widgets/background.dart';
-import '../../widgets/custom_buttons/app_bar_icon_button.dart';
import '../../widgets/desktop/primary_button.dart';
import '../../widgets/desktop/secondary_button.dart';
import '../../widgets/dialogs/request_external_link_navigation_dialog.dart';
@@ -23,8 +21,6 @@ import '../shopinbit/shopinbit_tickets_view.dart';
class ServicesView extends ConsumerStatefulWidget {
const ServicesView({super.key});
- static const String routeName = "/servicesView";
-
@override
ConsumerState<ServicesView> createState() => _ServicesViewState();
}
@@ -126,138 +122,125 @@ class _ServicesViewState extends ConsumerState<ServicesView> {
@override
Widget build(BuildContext context) {
- return Background(
- child: Scaffold(
- backgroundColor: Theme.of(context).extension<StackColors>()!.background,
- appBar: AppBar(
- leading: AppBarBackButton(
- onPressed: () {
- Navigator.of(context).pop();
- },
- ),
- title: Text("Services", style: STextStyles.navBarTitle(context)),
- ),
- body: SafeArea(
- child: SingleChildScrollView(
- child: Padding(
- padding: const EdgeInsets.all(16),
- child: RoundedWhiteContainer(
- child: Column(
- crossAxisAlignment: CrossAxisAlignment.start,
+ return SafeArea(
+ child: SingleChildScrollView(
+ child: Padding(
+ padding: const EdgeInsets.all(16),
+ child: RoundedWhiteContainer(
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ Row(
children: [
- Row(
- children: [
- SvgPicture.asset(
- Assets.svg.circleSliders,
- width: 32,
- height: 32,
- ),
- const SizedBox(width: 12),
- Expanded(
- child: Text(
- "ShopinBit",
- style: STextStyles.titleBold12(context),
- ),
- ),
- GestureDetector(
- onTap: () {
- Navigator.of(
- context,
- ).pushNamed(ShopInBitSettingsView.routeName);
- },
- child: SvgPicture.asset(
- Assets.svg.gear,
- width: 20,
- height: 20,
- color: Theme.of(
- context,
- ).extension<StackColors>()!.textDark3,
- ),
- ),
- ],
+ SvgPicture.asset(
+ Assets.svg.circleSliders,
+ width: 32,
+ height: 32,
),
- const SizedBox(height: 12),
- Text(
- "Turn your crypto into Electronics, Flights, Hotel, "
- "Cars or any other legal product or service... "
- "ShopinBit is a concierge shopping service that helps "
- "you 'live the good life with crypto'...",
- style: STextStyles.itemSubtitle12(context).copyWith(
+ const SizedBox(width: 12),
+ Expanded(
+ child: Text(
+ "ShopinBit",
+ style: STextStyles.titleBold12(context),
+ ),
+ ),
+ GestureDetector(
+ onTap: () {
+ Navigator.of(
+ context,
+ ).pushNamed(ShopInBitSettingsView.routeName);
+ },
+ child: SvgPicture.asset(
+ Assets.svg.gear,
+ width: 20,
+ height: 20,
color: Theme.of(
context,
- ).extension<StackColors>()!.textSubtitle1,
+ ).extension<StackColors>()!.textDark3,
),
),
- const SizedBox(height: 12),
- RichText(
- text: TextSpan(
- style: STextStyles.itemSubtitle12(context).copyWith(
- color: Theme.of(
- context,
- ).extension<StackColors>()!.textSubtitle1,
- ),
- children: [
- const TextSpan(
- text:
- "Minimum order value of 1,000 EUR. "
- "A 10% service fee applies to all orders.\n\n"
- "By using ShopinBit, you agree to their ",
- ),
- TextSpan(
- text: "Terms & Conditions",
- style: STextStyles.richLink(
- context,
- ).copyWith(fontSize: 14),
- recognizer: TapGestureRecognizer()
- ..onTap = () async {
- const url =
- "https://api.shopinbit.com/static/policy/terms.html";
+ ],
+ ),
+ const SizedBox(height: 12),
+ Text(
+ "Turn your crypto into Electronics, Flights, Hotel, "
+ "Cars or any other legal product or service... "
+ "ShopinBit is a concierge shopping service that helps "
+ "you 'live the good life with crypto'...",
+ style: STextStyles.itemSubtitle12(context).copyWith(
+ color: Theme.of(
+ context,
+ ).extension<StackColors>()!.textSubtitle1,
+ ),
+ ),
+ const SizedBox(height: 12),
+ RichText(
+ text: TextSpan(
+ style: STextStyles.itemSubtitle12(context).copyWith(
+ color: Theme.of(
+ context,
+ ).extension<StackColors>()!.textSubtitle1,
+ ),
+ children: [
+ const TextSpan(
+ text:
+ "Minimum order value of 1,000 EUR. "
+ "A 10% service fee applies to all orders.\n\n"
+ "By using ShopinBit, you agree to their ",
+ ),
+ TextSpan(
+ text: "Terms & Conditions",
+ style: STextStyles.richLink(
+ context,
+ ).copyWith(fontSize: 14),
+ recognizer: TapGestureRecognizer()
+ ..onTap = () async {
+ const url =
+ "https://api.shopinbit.com/static/policy/terms.html";
- await showRequestExternalLinkAndMaybeLaunch(
- context,
- uri: Uri.parse(url),
- );
- },
- ),
- const TextSpan(text: " and "),
- TextSpan(
- text: "Privacy Policy",
- style: STextStyles.richLink(
+ await showRequestExternalLinkAndMaybeLaunch(
context,
- ).copyWith(fontSize: 14),
- recognizer: TapGestureRecognizer()
- ..onTap = () async {
- const url =
- "https://api.shopinbit.com/static/policy/privacy.html";
-
- await showRequestExternalLinkAndMaybeLaunch(
- context,
- uri: Uri.parse(url),
- );
- },
- ),
- const TextSpan(text: "."),
- ],
+ uri: Uri.parse(url),
+ );
+ },
),
- ),
- const SizedBox(height: 16),
- PrimaryButton(
- label: "Shop with ShopinBit",
- enabled: true,
- onPressed: _showShopDialog,
- ),
- const SizedBox(height: 12),
- SecondaryButton(
- label: "My requests",
- onPressed: () async {
- await Navigator.of(
+ const TextSpan(text: " and "),
+ TextSpan(
+ text: "Privacy Policy",
+ style: STextStyles.richLink(
context,
- ).pushNamed(ShopInBitTicketsView.routeName);
- },
- ),
- ],
+ ).copyWith(fontSize: 14),
+ recognizer: TapGestureRecognizer()
+ ..onTap = () async {
+ const url =
+ "https://api.shopinbit.com/static/policy/privacy.html";
+
+ await showRequestExternalLinkAndMaybeLaunch(
+ context,
+ uri: Uri.parse(url),
+ );
+ },
+ ),
+ const TextSpan(text: "."),
+ ],
+ ),
+ ),
+ const SizedBox(height: 16),
+ PrimaryButton(
+ label: "Shop with ShopinBit",
+ enabled: true,
+ onPressed: _showShopDialog,
),
- ),
+ const SizedBox(height: 12),
+ SecondaryButton(
+ label: "My requests",
+ onPressed: () async {
+ await Navigator.of(
+ context,
+ ).pushNamed(ShopInBitTicketsView.routeName);
+ },
+ ),
+ ],
),
),
),
diff --git a/lib/pages/shopinbit/shopinbit_car_fee_view.dart b/lib/pages/shopinbit/shopinbit_car_fee_view.dart
index 555924e..044c862 100644
--- a/lib/pages/shopinbit/shopinbit_car_fee_view.dart
+++ b/lib/pages/shopinbit/shopinbit_car_fee_view.dart
@@ -22,7 +22,7 @@ import '../../widgets/dialogs/s_dialog.dart';
import '../../widgets/rounded_white_container.dart';
import '../../widgets/stack_dialog.dart';
import '../../widgets/textfields/adaptive_text_field.dart';
-import '../more_view/services_view.dart';
+import '../home_view/home_view.dart';
import 'shopinbit_car_research_payment_view.dart';
import 'shopinbit_step_2.dart';
@@ -93,10 +93,7 @@ class _ShopInBitCarFeeViewState extends ConsumerState<ShopInBitCarFeeView> {
if (name == ShopInBitStep2.routeName) {
return true;
}
- if (name == ServicesView.routeName) {
- return true;
- }
- if (route.isFirst) {
+ if (route.isFirst || name == HomeView.routeName) {
return true;
}
return false;
diff --git a/lib/pages/shopinbit/shopinbit_car_research_payment_view.dart b/lib/pages/shopinbit/shopinbit_car_research_payment_view.dart
index a1f4a5c..8846e6a 100644
--- a/lib/pages/shopinbit/shopinbit_car_research_payment_view.dart
+++ b/lib/pages/shopinbit/shopinbit_car_research_payment_view.dart
@@ -25,7 +25,7 @@ import '../../widgets/qr.dart';
import '../../widgets/rounded_container.dart';
import '../../widgets/rounded_white_container.dart';
import '../../widgets/stack_dialog.dart';
-import '../more_view/services_view.dart';
+import '../home_view/home_view.dart';
import 'shopinbit_order_created.dart';
import 'shopinbit_payment_shared.dart';
import 'shopinbit_tickets_view.dart';
@@ -257,10 +257,7 @@ class _ShopInBitCarResearchPaymentViewState
if (name == ShopInBitTicketsView.routeName) {
return true;
}
- if (name == ServicesView.routeName) {
- return true;
- }
- if (route.isFirst) {
+ if (route.isFirst || name == HomeView.routeName) {
return true;
}
return false;
@@ -276,7 +273,7 @@ class _ShopInBitCarResearchPaymentViewState
landedOnTickets = true;
return true;
}
- return name == ServicesView.routeName || route.isFirst;
+ return route.isFirst || name == HomeView.routeName;
});
if (!landedOnTickets) {
unawaited(navigator.pushNamed(ShopInBitTicketsView.routeName));
diff --git a/lib/pages/shopinbit/shopinbit_order_created.dart b/lib/pages/shopinbit/shopinbit_order_created.dart
index 0389a24..0e202b8 100644
--- a/lib/pages/shopinbit/shopinbit_order_created.dart
+++ b/lib/pages/shopinbit/shopinbit_order_created.dart
@@ -16,7 +16,7 @@ import '../../widgets/desktop/secondary_button.dart';
import '../../widgets/dialogs/nested_navigator_dialog/nested_navigator_dialog.dart';
import '../../widgets/dialogs/s_dialog.dart';
import '../../widgets/rounded_white_container.dart';
-import '../more_view/services_view.dart';
+import '../home_view/home_view.dart';
import 'shopinbit_ticket_detail.dart';
class ShopInBitOrderCreated extends ConsumerWidget {
@@ -28,7 +28,7 @@ class ShopInBitOrderCreated extends ConsumerWidget {
static void _popToServices(BuildContext context) {
Navigator.of(context).popUntil((route) {
- if (route.settings.name == ServicesView.routeName) {
+ if (route.settings.name == HomeView.routeName) {
return true;
}
if (route.isFirst) {
diff --git a/lib/pages/shopinbit/shopinbit_payment_view.dart b/lib/pages/shopinbit/shopinbit_payment_view.dart
index 18b6b89..f7e17eb 100644
--- a/lib/pages/shopinbit/shopinbit_payment_view.dart
+++ b/lib/pages/shopinbit/shopinbit_payment_view.dart
@@ -31,7 +31,7 @@ import '../../widgets/qr.dart';
import '../../widgets/rounded_container.dart';
import '../../widgets/rounded_white_container.dart';
import '../../widgets/stack_dialog.dart';
-import '../more_view/services_view.dart';
+import '../home_view/home_view.dart';
import 'shopinbit_payment_shared.dart';
import 'shopinbit_ticket_detail.dart';
import 'shopinbit_tickets_view.dart';
@@ -334,9 +334,9 @@ class _ShopInBitPaymentViewState extends ConsumerState<ShopInBitPaymentView>
landedOnRequest = true;
return true;
}
- return name == ShopInBitTicketsView.routeName ||
- name == ServicesView.routeName ||
- route.isFirst;
+ return route.isFirst ||
+ name == ShopInBitTicketsView.routeName ||
+ name == HomeView.routeName;
});
if (!landedOnRequest) {
unawaited(
@@ -357,7 +357,7 @@ class _ShopInBitPaymentViewState extends ConsumerState<ShopInBitPaymentView>
landedOnTickets = true;
return true;
}
- return name == ServicesView.routeName || route.isFirst;
+ return route.isFirst || name == HomeView.routeName;
});
if (!landedOnTickets) {
unawaited(navigator.pushNamed(ShopInBitTicketsView.routeName));
diff --git a/lib/pages/wallet_view/wallet_view.dart b/lib/pages/wallet_view/wallet_view.dart
index b6619f9..322b8fb 100644
--- a/lib/pages/wallet_view/wallet_view.dart
+++ b/lib/pages/wallet_view/wallet_view.dart
@@ -72,7 +72,6 @@ import '../../widgets/custom_buttons/blue_text_button.dart';
import '../../widgets/custom_loading_overlay.dart';
import '../../widgets/desktop/secondary_button.dart';
import '../../widgets/frost_scaffold.dart';
-import '../../widgets/icon_widgets/credit_card_icon.dart';
import '../../widgets/loading_indicator.dart';
import '../../widgets/small_tor_icon.dart';
import '../../widgets/stack_dialog.dart';
@@ -97,8 +96,6 @@ import '../epic_finalize_view/epic_finalize_view.dart';
import '../exchange_view/wallet_initiated_exchange_view.dart';
import '../finalize_view/finalize_view.dart';
import '../monkey/monkey_view.dart';
-import '../more_view/gift_cards_view.dart';
-import '../more_view/services_view.dart';
import '../namecoin_names/namecoin_names_home_view.dart';
import '../notification_views/notifications_view.dart';
import '../ordinals/ordinals_view.dart';
@@ -1347,39 +1344,6 @@ class _WalletViewState extends ConsumerState<WalletView> {
);
},
),
- if (!viewOnly && AppConfig.hasFeature(.shopinBit))
- WalletNavigationBarItemData(
- label: "Services",
- icon: SvgPicture.asset(
- Assets.svg.solidSliders,
- height: 20,
- width: 20,
- color: Theme.of(
- context,
- ).extension<StackColors>()!.bottomNavIconIcon,
- ),
- onTap: () {
- Navigator.of(
- context,
- ).pushNamed(ServicesView.routeName);
- },
- ),
- if (AppConfig.hasFeature(.cakePay))
- WalletNavigationBarItemData(
- label: "Gift cards",
- icon: CreditCardIcon(
- height: 20,
- width: 20,
- color: Theme.of(
- context,
- ).extension<StackColors>()!.bottomNavIconIcon,
- ),
- onTap: () {
- Navigator.of(
- context,
- ).pushNamed(GiftCardsView.routeName);
- },
- ),
],
),
),
diff --git a/lib/route_generator.dart b/lib/route_generator.dart
index 049a808..6197874 100644
--- a/lib/route_generator.dart
+++ b/lib/route_generator.dart
@@ -91,8 +91,6 @@ import 'pages/masternodes/create_masternode_view.dart';
import 'pages/masternodes/masternode_details_view.dart';
import 'pages/masternodes/masternodes_home_view.dart';
import 'pages/monkey/monkey_view.dart';
-import 'pages/more_view/gift_cards_view.dart';
-import 'pages/more_view/services_view.dart';
import 'pages/namecoin_names/buy_domain_view.dart';
import 'pages/namecoin_names/confirm_name_transaction_view.dart';
import 'pages/namecoin_names/manage_domain_view.dart';
@@ -1066,20 +1064,6 @@ class RouteGenerator {
}
return _routeError("${settings.name} invalid args: ${args.toString()}");
- case ServicesView.routeName:
- return getRoute(
- shouldUseMaterialRoute: useMaterialPageRoute,
- builder: (_) => const ServicesView(),
- settings: RouteSettings(name: settings.name),
- );
-
- case GiftCardsView.routeName:
- return getRoute(
- shouldUseMaterialRoute: useMaterialPageRoute,
- builder: (_) => const GiftCardsView(),
- settings: RouteSettings(name: settings.name),
- );
-
case ShopInBitSetupView.routeName:
return getRoute(
shouldUseMaterialRoute: useMaterialPageRoute,
Why this scored 17/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.