| 1 | import 'package:cake_wallet/core/selectable_option.dart'; |
| 2 | import 'package:cake_wallet/generated/i18n.dart'; |
| 3 | import 'package:cake_wallet/src/screens/select_options_page.dart'; |
| 4 | import 'package:flutter/cupertino.dart'; |
| 5 | |
| 6 | class BuyOptionsPage extends SelectOptionsPage { |
| 7 | BuyOptionsPage({required this.items, this.pickAnOption, this.confirmOption}); |
| 8 | |
| 9 | final List<SelectableItem> items; |
| 10 | final Function(SelectableOption option)? pickAnOption; |
| 11 | final Function(BuildContext context)? confirmOption; |
| 12 | |
| 13 | @override |
| 14 | String get pageTitle => S.current.choose_a_provider; |
| 15 | |
| 16 | @override |
| 17 | EdgeInsets? get contentPadding => null; |
| 18 | |
| 19 | @override |
| 20 | EdgeInsets? get tilePadding => EdgeInsets.only(top: 8); |
| 21 | |
| 22 | @override |
| 23 | EdgeInsets? get innerPadding => EdgeInsets.symmetric(horizontal: 24, vertical: 8); |
| 24 | |
| 25 | @override |
| 26 | double? get imageHeight => 40; |
| 27 | |
| 28 | @override |
| 29 | double? get imageWidth => 40; |
| 30 | |
| 31 | @override |
| 32 | Color? get selectedBackgroundColor => null; |
| 33 | |
| 34 | @override |
| 35 | double? get tileBorderRadius => 30; |
| 36 | |
| 37 | @override |
| 38 | String get bottomSectionText => ''; |
| 39 | |
| 40 | @override |
| 41 | void Function(SelectableOption option)? get onOptionTap => pickAnOption; |
| 42 | |
| 43 | @override |
| 44 | String get primaryButtonText => S.current.confirm; |
| 45 | |
| 46 | @override |
| 47 | void Function(BuildContext context)? get primaryButtonAction => confirmOption; |
| 48 | } |