| 1 | import 'package:cake_wallet/src/screens/yat/widgets/yat_close_button.dart'; |
| 2 | import 'package:cake_wallet/src/widgets/alert_background.dart'; |
| 3 | import 'package:cake_wallet/src/widgets/primary_button.dart'; |
| 4 | import 'package:flutter/material.dart'; |
| 5 | import 'package:animate_do/animate_do.dart'; |
| 6 | |
| 7 | class YatEmojiId extends StatelessWidget { |
| 8 | YatEmojiId(this.emojiId); |
| 9 | static const durationInMilliseconds = 250; |
| 10 | |
| 11 | final String emojiId; |
| 12 | final image = Image.asset('assets/images/emoji_popup.png'); |
| 13 | |
| 14 | @override |
| 15 | Widget build(BuildContext context) { |
| 16 | final screenWidth = MediaQuery.of(context).size.width; |
| 17 | |
| 18 | return Stack( |
| 19 | clipBehavior: Clip.none, |
| 20 | alignment: Alignment.bottomCenter, |
| 21 | children: [ |
| 22 | AlertBackground(child: Container()), |
| 23 | SlideInUp( |
| 24 | from: 420, |
| 25 | duration: Duration(milliseconds: durationInMilliseconds), |
| 26 | child: ClipRRect( |
| 27 | borderRadius: |
| 28 | BorderRadius.only(topLeft: Radius.circular(24), topRight: Radius.circular(24)), |
| 29 | child: Container( |
| 30 | height: 420, |
| 31 | color: Theme.of(context).colorScheme.primaryContainer, |
| 32 | padding: EdgeInsets.fromLTRB(24, 15, 24, 24), |
| 33 | child: Column( |
| 34 | mainAxisSize: MainAxisSize.max, |
| 35 | mainAxisAlignment: MainAxisAlignment.spaceBetween, |
| 36 | children: [ |
| 37 | Column(children: [ |
| 38 | Row( |
| 39 | mainAxisSize: MainAxisSize.max, |
| 40 | mainAxisAlignment: MainAxisAlignment.end, |
| 41 | children: [YatCloseButton(onClose: () => Navigator.of(context).pop())]), |
| 42 | Row( |
| 43 | mainAxisSize: MainAxisSize.max, |
| 44 | mainAxisAlignment: MainAxisAlignment.center, |
| 45 | children: [ |
| 46 | Container( |
| 47 | padding: EdgeInsets.fromLTRB(10, 5, 10, 5), |
| 48 | decoration: BoxDecoration( |
| 49 | color: Theme.of(context).colorScheme.surfaceContainer, |
| 50 | border: Border.all( |
| 51 | color: Theme.of(context).colorScheme.outlineVariant), |
| 52 | borderRadius: BorderRadius.all(Radius.circular(50))), |
| 53 | child: Text(emojiId, |
| 54 | textAlign: TextAlign.center, |
| 55 | style: Theme.of(context).textTheme.bodyLarge?.copyWith( |
| 56 | fontSize: 46, |
| 57 | decoration: TextDecoration.none, |
| 58 | ))) |
| 59 | ]) |
| 60 | ]), |
| 61 | Container( |
| 62 | padding: EdgeInsets.only(left: 6, right: 6), |
| 63 | child: Column(children: [ |
| 64 | Text("That's one nice Yat!", |
| 65 | textAlign: TextAlign.center, |
| 66 | style: Theme.of(context).textTheme.bodyLarge?.copyWith( |
| 67 | fontSize: 32, |
| 68 | fontWeight: FontWeight.bold, |
| 69 | decoration: TextDecoration.none, |
| 70 | )), |
| 71 | Padding( |
| 72 | padding: EdgeInsets.only(top: 20), |
| 73 | child: Text( |
| 74 | 'You can manage your Yat or purchase additional Yats in your account settings', |
| 75 | textAlign: TextAlign.center, |
| 76 | style: Theme.of(context).textTheme.bodyMedium?.copyWith( |
| 77 | fontSize: 18, |
| 78 | color: Theme.of(context).colorScheme.onSurfaceVariant, |
| 79 | decoration: TextDecoration.none, |
| 80 | ))) |
| 81 | ])), |
| 82 | PrimaryButton( |
| 83 | text: 'Got it', |
| 84 | textColor: Theme.of(context).colorScheme.onPrimary, |
| 85 | color: Theme.of(context).colorScheme.primary, |
| 86 | onPressed: () => Navigator.of(context).pop()) |
| 87 | ], |
| 88 | ))), |
| 89 | ) |
| 90 | ], |
| 91 | ); |
| 92 | } |
| 93 | } |