| 1 | import 'package:cake_wallet/src/screens/exchange/widgets/mobile_exchange_cards_section.dart'; |
| 2 | import 'package:flutter/material.dart'; |
| 3 | |
| 4 | class DesktopExchangeCardsSection extends StatelessWidget { |
| 5 | const DesktopExchangeCardsSection({ |
| 6 | Key? key, |
| 7 | required this.firstExchangeCard, |
| 8 | required this.secondExchangeCard, |
| 9 | this.isBuySellOption = false, |
| 10 | this.onBuyTap, |
| 11 | this.onSellTap, |
| 12 | }) : super(key: key); |
| 13 | |
| 14 | final Widget firstExchangeCard; |
| 15 | final Widget secondExchangeCard; |
| 16 | final bool isBuySellOption; |
| 17 | final VoidCallback? onBuyTap; |
| 18 | final VoidCallback? onSellTap; |
| 19 | |
| 20 | @override |
| 21 | Widget build(BuildContext context) { |
| 22 | return FocusTraversalGroup( |
| 23 | policy: OrderedTraversalPolicy(), |
| 24 | child: Column( |
| 25 | children: <Widget>[ |
| 26 | Padding( |
| 27 | padding: EdgeInsets.only(top: 55, left: 24, right: 24), |
| 28 | child: Column( |
| 29 | children: [ |
| 30 | if (isBuySellOption) |
| 31 | Column( |
| 32 | children: [ |
| 33 | const SizedBox(height: 16), |
| 34 | BuySellOptionButtons(onBuyTap: onBuyTap, onSellTap: onSellTap), |
| 35 | ], |
| 36 | ), |
| 37 | firstExchangeCard, |
| 38 | ], |
| 39 | ), |
| 40 | ), |
| 41 | Padding( |
| 42 | padding: EdgeInsets.only(top: 29, left: 24, right: 24), |
| 43 | child: secondExchangeCard, |
| 44 | ), |
| 45 | ], |
| 46 | ), |
| 47 | ); |
| 48 | } |
| 49 | } |