@@ -23,10 +23,10 @@ import '../../utilities/util.dart';
2323import '../../wallets/crypto_currency/crypto_currency.dart' ;
2424import '../../widgets/background.dart' ;
2525import '../../widgets/custom_buttons/app_bar_icon_button.dart' ;
26- import '../../widgets/desktop/desktop_dialog.dart' ;
2726import '../../widgets/desktop/desktop_dialog_close_button.dart' ;
2827import '../../widgets/desktop/primary_button.dart' ;
2928import '../../widgets/desktop/secondary_button.dart' ;
29+ import '../../widgets/dialogs/s_dialog.dart' ;
3030import '../../widgets/qr.dart' ;
3131import '../../widgets/rounded_white_container.dart' ;
3232import '../../widgets/stack_dialog.dart' ;
@@ -407,22 +407,13 @@ class _ShopInBitCarResearchPaymentViewState
407407 // Both steps already done: navigate to success directly.
408408 if (! mounted) return ;
409409 setState (() => _flowState = _PaymentFlowState .complete);
410- if (Util .isDesktop) {
411- Navigator .of (context, rootNavigator: true ).pop ();
412- unawaited (
413- showDialog <void >(
414- context: context,
415- builder: (_) => ShopInBitOrderCreated (model: widget.model),
416- ),
417- );
418- } else {
419- unawaited (
420- Navigator .of (context).pushNamed (
421- ShopInBitOrderCreated .routeName,
422- arguments: widget.model,
423- ),
424- );
425- }
410+
411+ unawaited (
412+ Navigator .of (
413+ context,
414+ ).pushNamed (ShopInBitOrderCreated .routeName, arguments: widget.model),
415+ );
416+
426417 return ;
427418 }
428419 // Fee logged; skip to createRequest.
@@ -495,22 +486,12 @@ class _ShopInBitCarResearchPaymentViewState
495486 }
496487 if (! mounted) return ;
497488 setState (() => _flowState = _PaymentFlowState .complete);
498- if (Util .isDesktop) {
499- Navigator .of (context, rootNavigator: true ).pop ();
500- unawaited (
501- showDialog <void >(
502- context: context,
503- builder: (_) => ShopInBitOrderCreated (model: widget.model),
504- ),
505- );
506- } else {
507- unawaited (
508- Navigator .of (context).pushNamed (
509- ShopInBitOrderCreated .routeName,
510- arguments: widget.model,
511- ),
512- );
513- }
489+
490+ unawaited (
491+ Navigator .of (
492+ context,
493+ ).pushNamed (ShopInBitOrderCreated .routeName, arguments: widget.model),
494+ );
514495 } catch (e) {
515496 if (mounted) {
516497 setState (() => _flowState = _PaymentFlowState .error);
@@ -630,21 +611,11 @@ class _ShopInBitCarResearchPaymentViewState
630611 if (! mounted) return ;
631612 setState (() => _flowState = _PaymentFlowState .complete);
632613
633- if (Util .isDesktop) {
634- Navigator .of (context, rootNavigator: true ).pop ();
635- unawaited (
636- showDialog <void >(
637- context: context,
638- builder: (_) => ShopInBitOrderCreated (model: widget.model),
639- ),
640- );
641- } else {
642- unawaited (
643- Navigator .of (
644- context,
645- ).pushNamed (ShopInBitOrderCreated .routeName, arguments: widget.model),
646- );
647- }
614+ unawaited (
615+ Navigator .of (
616+ context,
617+ ).pushNamed (ShopInBitOrderCreated .routeName, arguments: widget.model),
618+ );
648619 } catch (e) {
649620 if (mounted) {
650621 setState (() => _flowState = _PaymentFlowState .error);
@@ -719,21 +690,11 @@ class _ShopInBitCarResearchPaymentViewState
719690 if (! mounted) return ;
720691 setState (() => _flowState = _PaymentFlowState .complete);
721692
722- if (Util .isDesktop) {
723- Navigator .of (context, rootNavigator: true ).pop ();
724- unawaited (
725- showDialog <void >(
726- context: context,
727- builder: (_) => ShopInBitOrderCreated (model: widget.model),
728- ),
729- );
730- } else {
731- unawaited (
732- Navigator .of (
733- context,
734- ).pushNamed (ShopInBitOrderCreated .routeName, arguments: widget.model),
735- );
736- }
693+ unawaited (
694+ Navigator .of (
695+ context,
696+ ).pushNamed (ShopInBitOrderCreated .routeName, arguments: widget.model),
697+ );
737698 } catch (e) {
738699 if (mounted) {
739700 setState (() => _flowState = _PaymentFlowState .error);
@@ -848,6 +809,7 @@ class _ShopInBitCarResearchPaymentViewState
848809
849810 final content = Column (
850811 crossAxisAlignment: CrossAxisAlignment .stretch,
812+ mainAxisSize: .min,
851813 children: [
852814 Text (
853815 "Car research payment" ,
@@ -987,34 +949,38 @@ class _ShopInBitCarResearchPaymentViewState
987949 );
988950
989951 if (isDesktop) {
990- return DesktopDialog (
991- maxWidth: 580 ,
992- maxHeight: 750 ,
993- child: Column (
994- children: [
995- Row (
996- mainAxisAlignment: MainAxisAlignment .spaceBetween,
997- children: [
998- Padding (
999- padding: const EdgeInsets .only (left: 32 ),
1000- child: Text (
1001- "ShopinBit" ,
1002- style: STextStyles .desktopH3 (context),
952+ return SDialog (
953+ child: SizedBox (
954+ width: 580 ,
955+ child: Column (
956+ mainAxisSize: .min,
957+ children: [
958+ Row (
959+ mainAxisAlignment: MainAxisAlignment .spaceBetween,
960+ children: [
961+ Padding (
962+ padding: const EdgeInsets .only (left: 32 ),
963+ child: Text (
964+ "ShopinBit" ,
965+ style: STextStyles .desktopH3 (context),
966+ ),
1003967 ),
968+ const DesktopDialogCloseButton (),
969+ ],
970+ ),
971+ Flexible (
972+ child: Padding (
973+ padding: const .only (
974+ left: 32 ,
975+ right: 32 ,
976+ bottom: 32 ,
977+ top: 16 ,
978+ ),
979+ child: content,
1004980 ),
1005- const DesktopDialogCloseButton (),
1006- ],
1007- ),
1008- Expanded (
1009- child: Padding (
1010- padding: const EdgeInsets .symmetric (
1011- horizontal: 32 ,
1012- vertical: 16 ,
1013- ),
1014- child: SingleChildScrollView (child: content),
1015981 ),
1016- ) ,
1017- ] ,
982+ ] ,
983+ ) ,
1018984 ),
1019985 );
1020986 }
0 commit comments