| 1 | import 'package:cake_wallet/src/screens/yat/widgets/yat_bar.dart'; |
| 2 | import 'package:cake_wallet/src/screens/yat/widgets/yat_page_indicator.dart'; |
| 3 | import 'package:cake_wallet/src/widgets/primary_button.dart'; |
| 4 | import 'package:cake_wallet/src/widgets/scrollable_with_bottom_section.dart'; |
| 5 | import 'package:flutter/cupertino.dart'; |
| 6 | import 'package:flutter/material.dart'; |
| 7 | import 'package:lottie/lottie.dart'; |
| 8 | import 'package:cake_wallet/generated/i18n.dart'; |
| 9 | |
| 10 | class ThirdIntroduction extends StatelessWidget { |
| 11 | ThirdIntroduction({required this.onGet, required this.onConnect, this.onClose}); |
| 12 | |
| 13 | final VoidCallback? onClose; |
| 14 | final VoidCallback onGet; |
| 15 | final VoidCallback onConnect; |
| 16 | final animation = Lottie.asset('assets/animation/anim3.json'); |
| 17 | |
| 18 | @override |
| 19 | Widget build(BuildContext context) { |
| 20 | final screenHeight = MediaQuery.of(context).size.height; |
| 21 | final screenWidth = MediaQuery.of(context).size.width; |
| 22 | |
| 23 | return Container( |
| 24 | height: screenHeight, |
| 25 | width: screenWidth, |
| 26 | color: Theme.of(context).colorScheme.surfaceContainer, |
| 27 | child: ScrollableWithBottomSection( |
| 28 | contentPadding: EdgeInsets.only(top: 40, bottom: 40), |
| 29 | content: Column( |
| 30 | children: [ |
| 31 | Container( |
| 32 | height: 90, |
| 33 | padding: EdgeInsets.only(left: 24, right: 24), |
| 34 | child: YatBar(onClose: onClose)), |
| 35 | animation, |
| 36 | Padding( |
| 37 | padding: EdgeInsets.only(top: 40, left: 30, right: 30), |
| 38 | child: Column(children: [ |
| 39 | Text(S.of(context).third_intro_title, |
| 40 | textAlign: TextAlign.center, |
| 41 | style: Theme.of(context).textTheme.bodyMedium!.copyWith( |
| 42 | fontSize: 24, |
| 43 | fontWeight: FontWeight.bold, |
| 44 | color: Theme.of(context).colorScheme.onSurface, |
| 45 | decoration: TextDecoration.none, |
| 46 | )), |
| 47 | Padding( |
| 48 | padding: EdgeInsets.only(top: 20), |
| 49 | child: Text(S.of(context).third_intro_content, |
| 50 | textAlign: TextAlign.center, |
| 51 | style: Theme.of(context).textTheme.bodyMedium!.copyWith( |
| 52 | fontSize: 16, |
| 53 | fontWeight: FontWeight.normal, |
| 54 | color: Theme.of(context).colorScheme.onSurface, |
| 55 | decoration: TextDecoration.none, |
| 56 | ))) |
| 57 | ])), |
| 58 | ], |
| 59 | ), |
| 60 | bottomSectionPadding: EdgeInsets.fromLTRB(24, 0, 24, 24), |
| 61 | bottomSection: Column( |
| 62 | crossAxisAlignment: CrossAxisAlignment.center, |
| 63 | children: [ |
| 64 | PrimaryIconButton( |
| 65 | text: S.of(context).get_your_yat, |
| 66 | textColor: Theme.of(context).colorScheme.onPrimary, |
| 67 | color: Theme.of(context).colorScheme.primary, |
| 68 | borderColor: Theme.of(context).colorScheme.primary, |
| 69 | iconColor: Theme.of(context).colorScheme.onPrimary, |
| 70 | iconBackgroundColor: Colors.transparent, |
| 71 | iconData: CupertinoIcons.arrow_up_right_square, |
| 72 | mainAxisAlignment: MainAxisAlignment.end, |
| 73 | onPressed: onGet, |
| 74 | ), |
| 75 | Padding( |
| 76 | padding: EdgeInsets.only(top: 12), |
| 77 | child: PrimaryIconButton( |
| 78 | text: S.of(context).connect_an_existing_yat, |
| 79 | textColor: Theme.of(context).colorScheme.onPrimary, |
| 80 | color: Theme.of(context).colorScheme.primary, |
| 81 | borderColor: Theme.of(context).colorScheme.primary, |
| 82 | iconColor: Theme.of(context).colorScheme.onPrimary, |
| 83 | iconBackgroundColor: Colors.transparent, |
| 84 | iconData: CupertinoIcons.arrow_up_right_square, |
| 85 | mainAxisAlignment: MainAxisAlignment.end, |
| 86 | onPressed: onConnect, |
| 87 | ), |
| 88 | ), |
| 89 | Padding( |
| 90 | padding: EdgeInsets.only(top: 24), |
| 91 | child: YatPageIndicator(filled: 2), |
| 92 | ) |
| 93 | ], |
| 94 | ), |
| 95 | ), |
| 96 | ); |
| 97 | } |
| 98 | } |