| 1 | import 'package:cake_wallet/generated/i18n.dart'; |
| 2 | import 'package:cake_wallet/new-ui/widgets/new_primary_button.dart'; |
| 3 | import 'package:cake_wallet/new-ui/widgets/receive_page/receive_top_bar.dart'; |
| 4 | import 'package:cake_wallet/src/widgets/cake_image_widget.dart'; |
| 5 | import 'package:flutter/material.dart'; |
| 6 | import 'package:flutter_svg/svg.dart'; |
| 7 | |
| 8 | class SwapProviderInitialPreferenceModal extends StatelessWidget { |
| 9 | const SwapProviderInitialPreferenceModal({super.key}); |
| 10 | |
| 11 | @override |
| 12 | Widget build(BuildContext context) { |
| 13 | return Container( |
| 14 | decoration: BoxDecoration( |
| 15 | color: Theme.of(context).colorScheme.surface, borderRadius: BorderRadius.circular(16)), |
| 16 | child: SafeArea( |
| 17 | child: Column( |
| 18 | mainAxisSize: MainAxisSize.min, |
| 19 | children: [ |
| 20 | SizedBox(), |
| 21 | ModalTopBar(title: S.of(context).swap_providers), |
| 22 | Padding( |
| 23 | padding: const EdgeInsets.symmetric(horizontal: 18.0), |
| 24 | child: Column( |
| 25 | spacing: 12, |
| 26 | children: [ |
| 27 | CakeImageWidget(imageUrl: "assets/new-ui/exchange_providers.svg"), |
| 28 | Text( |
| 29 | "${S.of(context).swap_provider_initial_desc} Cake Wallet.", |
| 30 | textAlign: TextAlign.center, |
| 31 | style: TextStyle( |
| 32 | color: Theme.of(context).colorScheme.onSurfaceVariant, fontSize: 16), |
| 33 | ), |
| 34 | Column( |
| 35 | spacing: 12, |
| 36 | children: [ |
| 37 | NewPrimaryButton( |
| 38 | onPressed: () { |
| 39 | Navigator.of(context).pop(true); |
| 40 | }, |
| 41 | text: S.of(context).decentralized_only, |
| 42 | color: Theme.of(context).colorScheme.surfaceContainer, |
| 43 | textColor: Theme.of(context).colorScheme.primary), |
| 44 | NewPrimaryButton( |
| 45 | onPressed: () { |
| 46 | Navigator.of(context).pop(false); |
| 47 | }, |
| 48 | text: S.of(context).best_rate_mixed, |
| 49 | color: Theme.of(context).colorScheme.primary, |
| 50 | textColor: Theme.of(context).colorScheme.onPrimary) |
| 51 | ], |
| 52 | ), |
| 53 | SizedBox(), |
| 54 | ], |
| 55 | ), |
| 56 | ) |
| 57 | ], |
| 58 | ), |
| 59 | ), |
| 60 | ); |
| 61 | } |
| 62 | } |