|
1 | 1 | import 'package:flutter/material.dart'; |
2 | | -import 'package:threebotlogin/widgets/wizard/common_page.dart'; |
3 | 2 |
|
4 | | -class Page2 extends StatelessWidget { |
| 3 | +class Page2 extends StatefulWidget { |
5 | 4 | const Page2({super.key}); |
6 | 5 |
|
| 6 | + @override |
| 7 | + State<Page2> createState() => _Page2State(); |
| 8 | +} |
| 9 | + |
| 10 | +class _Page2State extends State<Page2> |
| 11 | + with SingleTickerProviderStateMixin { |
| 12 | + late AnimationController _animationController; |
| 13 | + late Animation<double> _fadeAnimation; |
| 14 | + late Animation<double> _scaleAnimation; |
| 15 | + |
| 16 | + @override |
| 17 | + void initState() { |
| 18 | + super.initState(); |
| 19 | + _animationController = AnimationController( |
| 20 | + duration: const Duration(milliseconds: 800), |
| 21 | + vsync: this, |
| 22 | + ); |
| 23 | + |
| 24 | + _fadeAnimation = Tween<double>( |
| 25 | + begin: 0.0, |
| 26 | + end: 1.0, |
| 27 | + ).animate(CurvedAnimation( |
| 28 | + parent: _animationController, |
| 29 | + curve: const Interval(0.0, 0.6, curve: Curves.easeOut), |
| 30 | + )); |
| 31 | + |
| 32 | + _scaleAnimation = Tween<double>( |
| 33 | + begin: 0.8, |
| 34 | + end: 1.0, |
| 35 | + ).animate(CurvedAnimation( |
| 36 | + parent: _animationController, |
| 37 | + curve: const Interval(0.2, 1.0, curve: Curves.easeOut), |
| 38 | + )); |
| 39 | + |
| 40 | + _animationController.forward(); |
| 41 | + } |
| 42 | + |
| 43 | + @override |
| 44 | + void dispose() { |
| 45 | + _animationController.dispose(); |
| 46 | + super.dispose(); |
| 47 | + } |
| 48 | + |
7 | 49 | @override |
8 | 50 | Widget build(BuildContext context) { |
9 | | - return const CommonPage( |
10 | | - title: 'MAXIMUM', |
11 | | - subtitle: 'SECURITY', |
12 | | - imagePath: 'assets/finger_outline.png', |
13 | | - widthPercentage: 0.6, |
14 | | - heightPercentage: 0.4, |
15 | | - description: |
16 | | - 'The app provides a secure authentication mechanism that creates your virtual identity on the ThreeFold Grid.', |
| 51 | + final theme = Theme.of(context); |
| 52 | + final colorScheme = theme.colorScheme; |
| 53 | + |
| 54 | + return FadeTransition( |
| 55 | + opacity: _fadeAnimation, |
| 56 | + child: ScaleTransition( |
| 57 | + scale: _scaleAnimation, |
| 58 | + child: Padding( |
| 59 | + padding: const EdgeInsets.symmetric(horizontal: 32), |
| 60 | + child: Column( |
| 61 | + mainAxisAlignment: MainAxisAlignment.center, |
| 62 | + children: [ |
| 63 | + const Spacer(flex: 1), |
| 64 | + |
| 65 | + // Icon with background |
| 66 | + Container( |
| 67 | + width: 160, |
| 68 | + height: 160, |
| 69 | + decoration: BoxDecoration( |
| 70 | + color: colorScheme.primaryContainer.withOpacity(0.3), |
| 71 | + shape: BoxShape.circle, |
| 72 | + ), |
| 73 | + child: Icon( |
| 74 | + Icons.account_balance_wallet_rounded, |
| 75 | + size: 80, |
| 76 | + color: colorScheme.primary, |
| 77 | + ), |
| 78 | + ), |
| 79 | + SizedBox(height: MediaQuery.of(context).size.height * 0.06), |
| 80 | + |
| 81 | + // Title |
| 82 | + Text( |
| 83 | + 'Manage Your Wallet', |
| 84 | + textAlign: TextAlign.center, |
| 85 | + style: theme.textTheme.headlineMedium!.copyWith( |
| 86 | + color: colorScheme.onSurface, |
| 87 | + fontWeight: FontWeight.bold, |
| 88 | + ), |
| 89 | + ), |
| 90 | + SizedBox(height: MediaQuery.of(context).size.height * 0.03), |
| 91 | + |
| 92 | + // Description |
| 93 | + Text( |
| 94 | + 'Send and receive ThreeFold Tokens (TFT) across multiple networks. Bridge tokens between TFChain, Stellar, and Solana.', |
| 95 | + textAlign: TextAlign.center, |
| 96 | + style: theme.textTheme.bodyLarge!.copyWith( |
| 97 | + color: colorScheme.onSurface.withOpacity(0.7), |
| 98 | + height: 1.6, |
| 99 | + fontSize: 16, |
| 100 | + ), |
| 101 | + ), |
| 102 | + |
| 103 | + // Features list |
| 104 | + SizedBox(height: MediaQuery.of(context).size.height * 0.04), |
| 105 | + _buildFeatureItem( |
| 106 | + context, |
| 107 | + 'Multi-chain wallet support', |
| 108 | + Icons.link_rounded, |
| 109 | + ), |
| 110 | + const SizedBox(height: 12), |
| 111 | + _buildFeatureItem( |
| 112 | + context, |
| 113 | + 'Real-time balance tracking', |
| 114 | + Icons.trending_up_rounded, |
| 115 | + ), |
| 116 | + const SizedBox(height: 12), |
| 117 | + _buildFeatureItem( |
| 118 | + context, |
| 119 | + 'Secure transactions', |
| 120 | + Icons.shield_rounded, |
| 121 | + ), |
| 122 | + |
| 123 | + const Spacer(flex: 2), |
| 124 | + ], |
| 125 | + ), |
| 126 | + ), |
| 127 | + ), |
| 128 | + ); |
| 129 | + } |
| 130 | + |
| 131 | + Widget _buildFeatureItem(BuildContext context, String text, IconData icon) { |
| 132 | + final theme = Theme.of(context); |
| 133 | + final colorScheme = theme.colorScheme; |
| 134 | + |
| 135 | + return Row( |
| 136 | + mainAxisAlignment: MainAxisAlignment.center, |
| 137 | + children: [ |
| 138 | + Icon( |
| 139 | + icon, |
| 140 | + size: 20, |
| 141 | + color: colorScheme.primary, |
| 142 | + ), |
| 143 | + const SizedBox(width: 12), |
| 144 | + Text( |
| 145 | + text, |
| 146 | + style: theme.textTheme.bodyMedium!.copyWith( |
| 147 | + color: colorScheme.onSurface.withOpacity(0.8), |
| 148 | + ), |
| 149 | + ), |
| 150 | + ], |
17 | 151 | ); |
18 | 152 | } |
19 | 153 | } |
0 commit comments