@@ -17,6 +17,7 @@ import '../../widgets/desktop/primary_button.dart';
1717import '../../widgets/desktop/secondary_button.dart' ;
1818import '../../widgets/dialogs/s_dialog.dart' ;
1919import '../../widgets/icon_widgets/credit_card_icon.dart' ;
20+ import '../../widgets/loading_indicator.dart' ;
2021import '../../widgets/rounded_white_container.dart' ;
2122import '../../widgets/stack_dialog.dart' ;
2223import '../../widgets/textfields/adaptive_text_field.dart' ;
@@ -360,7 +361,7 @@ class _CakePayCardDetailViewState extends State<CakePayCardDetailView> {
360361 : null ,
361362 onIncrement: () => setState (() => _quantity++ ),
362363 ),
363- SizedBox (height: isDesktop ? 16 : 12 ),
364+ SizedBox (height: isDesktop ? 24 : 16 ),
364365 _TermsCheckbox (
365366 isDesktop: isDesktop,
366367 accepted: _termsAccepted,
@@ -370,7 +371,7 @@ class _CakePayCardDetailViewState extends State<CakePayCardDetailView> {
370371 },
371372 onOpenTerms: _openTerms,
372373 ),
373- SizedBox (height: isDesktop ? 16 : 12 ),
374+ SizedBox (height: isDesktop ? 24 : 16 ),
374375 Text (
375376 "Email for receipt and delivery" ,
376377 style: isDesktop
@@ -407,18 +408,33 @@ class _CardImage extends StatelessWidget {
407408
408409 @override
409410 Widget build (BuildContext context) {
410- return Center (
411+ return ConditionalParent (
412+ condition: isDesktop,
413+ builder: (child) => Padding (
414+ padding: const .symmetric (vertical: 8 ),
415+ child: Center (child: child),
416+ ),
411417 child: ClipRRect (
412418 borderRadius: BorderRadius .circular (8 ),
413419 child: Image .network (
414420 imageUrl,
415- width: isDesktop ? 200 : 150 ,
416- fit: BoxFit .contain,
417- errorBuilder: (BuildContext _, Object __, StackTrace ? ___) =>
418- CreditCardIcon (
421+ width: isDesktop ? 300 : null ,
422+ fit: isDesktop ? .contain : .fitWidth,
423+ loadingBuilder: (_, child, event) {
424+ if (event != null ) {
425+ return LoadingIndicator (
419426 width: isDesktop ? 80 : 60 ,
420427 height: isDesktop ? 80 : 60 ,
421- ),
428+ );
429+ }
430+ return child;
431+ },
432+ errorBuilder: (BuildContext _, Object __, StackTrace ? ___) => Center (
433+ child: CreditCardIcon (
434+ width: isDesktop ? 80 : 60 ,
435+ height: isDesktop ? 80 : 60 ,
436+ ),
437+ ),
422438 ),
423439 ),
424440 );
@@ -434,6 +450,10 @@ class _PlainInfoBlock extends StatelessWidget {
434450 @override
435451 Widget build (BuildContext context) {
436452 return RoundedWhiteContainer (
453+ borderColor: isDesktop
454+ ? Theme .of (context).extension < StackColors > ()! .textFieldDefaultBG
455+ : null ,
456+ padding: isDesktop ? const .all (16 ) : const .all (12 ),
437457 child: Text (
438458 text,
439459 style: isDesktop
@@ -458,6 +478,10 @@ class _TitledInfoBlock extends StatelessWidget {
458478 @override
459479 Widget build (BuildContext context) {
460480 return RoundedWhiteContainer (
481+ borderColor: isDesktop
482+ ? Theme .of (context).extension < StackColors > ()! .textFieldDefaultBG
483+ : null ,
484+ padding: isDesktop ? const .all (16 ) : const .all (12 ),
461485 child: Column (
462486 crossAxisAlignment: CrossAxisAlignment .start,
463487 children: [
0 commit comments