| 1 | import 'package:cake_wallet/src/widgets/alert_background.dart'; |
| 2 | import 'package:cake_wallet/src/widgets/alert_close_button.dart'; |
| 3 | import 'package:flutter/material.dart'; |
| 4 | |
| 5 | class HavenWalletRemovalPopup extends StatelessWidget { |
| 6 | final List<String> affectedWalletNames; |
| 7 | |
| 8 | const HavenWalletRemovalPopup(this.affectedWalletNames, {Key? key}) : super(key: key); |
| 9 | |
| 10 | @override |
| 11 | Widget build(BuildContext context) { |
| 12 | return Stack( |
| 13 | alignment: Alignment.center, |
| 14 | children: [ |
| 15 | AlertBackground( |
| 16 | child: AlertDialog( |
| 17 | insetPadding: EdgeInsets.only(left: 16, right: 16, bottom: 48), |
| 18 | elevation: 0.0, |
| 19 | contentPadding: EdgeInsets.zero, |
| 20 | shape: RoundedRectangleBorder(borderRadius: BorderRadius.all(Radius.circular(30))), |
| 21 | content: Container( |
| 22 | decoration: BoxDecoration( |
| 23 | borderRadius: BorderRadius.circular(30.0), |
| 24 | gradient: LinearGradient(colors: [ |
| 25 | Theme.of(context).colorScheme.primaryContainer, |
| 26 | Theme.of(context).colorScheme.secondaryContainer, |
| 27 | ], begin: Alignment.centerLeft, end: Alignment.centerRight)), |
| 28 | child: Padding( |
| 29 | padding: const EdgeInsets.symmetric(horizontal: 24.0), |
| 30 | child: Stack( |
| 31 | children: [ |
| 32 | SingleChildScrollView( |
| 33 | child: Padding( |
| 34 | padding: const EdgeInsets.only(top: 16.0), |
| 35 | child: Container( |
| 36 | alignment: Alignment.bottomCenter, |
| 37 | child: DefaultTextStyle( |
| 38 | style: Theme.of(context).textTheme.bodyMedium!.copyWith( |
| 39 | decoration: TextDecoration.none, |
| 40 | fontSize: 24.0, |
| 41 | fontWeight: FontWeight.bold, |
| 42 | color: Theme.of(context).colorScheme.onSurfaceVariant, |
| 43 | ), |
| 44 | child: Text("Emergency Notice"), |
| 45 | ), |
| 46 | ), |
| 47 | ), |
| 48 | ), |
| 49 | SingleChildScrollView( |
| 50 | child: Padding( |
| 51 | padding: EdgeInsets.only(top: 48, bottom: 16), |
| 52 | child: Container( |
| 53 | width: double.maxFinite, |
| 54 | child: Column( |
| 55 | children: <Widget>[ |
| 56 | ConstrainedBox( |
| 57 | constraints: BoxConstraints( |
| 58 | maxHeight: MediaQuery.of(context).size.height * 0.7, |
| 59 | ), |
| 60 | child: Text( |
| 61 | "It looks like you have Haven wallets in your list. Haven is getting removed in next release of Cake Wallet, and you currently have Haven in the following wallets:\n\n[${affectedWalletNames.join(", ")}]\n\nPlease move your funds to other wallet, as you will lose access to your Haven funds in next update.\n\nFor assistance, please use the in-app support or email support@cakewallet.com", |
| 62 | style: Theme.of(context).textTheme.bodyMedium!.copyWith( |
| 63 | decoration: TextDecoration.none, |
| 64 | fontSize: 16.0, |
| 65 | color: Theme.of(context).colorScheme.onSurfaceVariant, |
| 66 | ), |
| 67 | ), |
| 68 | ) |
| 69 | ], |
| 70 | ), |
| 71 | ), |
| 72 | ), |
| 73 | ), |
| 74 | ], |
| 75 | ), |
| 76 | ), |
| 77 | ), |
| 78 | ), |
| 79 | ), |
| 80 | AlertCloseButton(bottom: 30) |
| 81 | ], |
| 82 | ); |
| 83 | } |
| 84 | } |