| 1 | import 'package:auto_size_text/auto_size_text.dart'; |
| 2 | import 'package:cake_wallet/src/widgets/bottom_sheet/base_bottom_sheet_widget.dart'; |
| 3 | import 'package:flutter/material.dart'; |
| 4 | |
| 5 | class TooltipSheet extends BaseBottomSheet { |
| 6 | final String tooltip; |
| 7 | |
| 8 | const TooltipSheet({ |
| 9 | required super.titleText, |
| 10 | super.titleIconPath, |
| 11 | required this.tooltip, |
| 12 | required super.footerType, |
| 13 | super.maxHeight = 900, |
| 14 | super.singleActionButtonText, |
| 15 | super.onSingleActionButtonPressed, |
| 16 | super.singleActionButtonKey, |
| 17 | super.doubleActionLeftButtonText, |
| 18 | super.doubleActionRightButtonText, |
| 19 | super.onLeftActionButtonPressed, |
| 20 | super.onRightActionButtonPressed, |
| 21 | super.leftActionButtonKey, |
| 22 | super.rightActionButtonKey, |
| 23 | }); |
| 24 | |
| 25 | @override |
| 26 | Widget contentWidget(BuildContext context) => Container( |
| 27 | decoration: BoxDecoration( |
| 28 | borderRadius: BorderRadius.circular(10), |
| 29 | color: Theme.of(context).colorScheme.surfaceContainer), |
| 30 | margin: const EdgeInsets.all(12), |
| 31 | padding: const EdgeInsets.all(12), |
| 32 | child: AutoSizeText( |
| 33 | tooltip, |
| 34 | textAlign: TextAlign.center, |
| 35 | style: Theme.of(context).textTheme.bodyMedium!.copyWith( |
| 36 | fontSize: 16, |
| 37 | fontWeight: FontWeight.w500, |
| 38 | color: Theme.of(context).colorScheme.onSurfaceVariant, |
| 39 | decoration: TextDecoration.none, |
| 40 | ), |
| 41 | ), |
| 42 | ); |
| 43 | |
| 44 | Widget footerWidget(BuildContext context) => SizedBox.shrink(); |
| 45 | } |