| 1 | import 'package:cake_wallet/src/widgets/cake_image_widget.dart'; |
| 2 | import 'package:flutter/material.dart'; |
| 3 | import 'package:flutter_svg/svg.dart'; |
| 4 | |
| 5 | class ReceiveLargeAmountPreview extends StatelessWidget { |
| 6 | const ReceiveLargeAmountPreview( |
| 7 | {super.key, required this.amount, required this.currency, required this.largeQrMode}); |
| 8 | |
| 9 | final String amount; |
| 10 | final String currency; |
| 11 | final bool largeQrMode; |
| 12 | |
| 13 | @override |
| 14 | Widget build(BuildContext context) { |
| 15 | return AnimatedOpacity( |
| 16 | duration: Duration(milliseconds: 300), |
| 17 | curve: Curves.easeOutCubic, |
| 18 | opacity: largeQrMode && amount.isNotEmpty ? 1 : 0, |
| 19 | child: AnimatedContainer( |
| 20 | duration: Duration(milliseconds: 300), |
| 21 | curve: Curves.easeOutCubic, |
| 22 | transformAlignment: Alignment.bottomCenter, |
| 23 | height: largeQrMode && amount.isNotEmpty ? 52 : 0, |
| 24 | width: MediaQuery.of(context).size.width * 0.7, |
| 25 | decoration: BoxDecoration( |
| 26 | color: Theme.of(context).colorScheme.surfaceContainer, |
| 27 | borderRadius: BorderRadius.circular(16)), |
| 28 | child: Row( |
| 29 | crossAxisAlignment: CrossAxisAlignment.center, |
| 30 | mainAxisAlignment: MainAxisAlignment.center, |
| 31 | spacing: 12, |
| 32 | children: [ |
| 33 | CakeImageWidget( |
| 34 | imageUrl: "assets/new-ui/send.svg", |
| 35 | width: 24, |
| 36 | height: 24, |
| 37 | colorFilter: ColorFilter.mode( |
| 38 | Theme.of(context).colorScheme.onSurfaceVariant, BlendMode.srcIn)), |
| 39 | Row( |
| 40 | spacing: 4, |
| 41 | children: [ |
| 42 | Text( |
| 43 | amount, |
| 44 | style: TextStyle( |
| 45 | fontSize: 20, |
| 46 | fontWeight: FontWeight.w500, |
| 47 | color: Theme.of(context).colorScheme.onSurface), |
| 48 | ), |
| 49 | Text( |
| 50 | currency, |
| 51 | style: TextStyle( |
| 52 | fontSize: 20, |
| 53 | fontWeight: FontWeight.w500, |
| 54 | color: Theme.of(context).colorScheme.onSurfaceVariant), |
| 55 | ) |
| 56 | ], |
| 57 | ) |
| 58 | ], |
| 59 | )), |
| 60 | ); |
| 61 | } |
| 62 | } |