@@ -34,36 +34,59 @@ class AuthLayoutTemplate extends StatelessWidget {
3434
3535 @override
3636 Widget build (BuildContext context) {
37+ final isDark = Theme .of (context).brightness == Brightness .dark;
38+
3739 return Scaffold (
3840 backgroundColor: Theme .of (context).scaffoldBackgroundColor,
3941 appBar: AppBar (
4042 backgroundColor: Colors .transparent,
4143 elevation: 0 ,
4244 leading: Navigator .canPop (context)
4345 ? IconButton (
44- icon: Icon (
45- Icons .arrow_back,
46- color: Theme .of (context).colorScheme.primary,
46+ icon: Container (
47+ width: 40 ,
48+ height: 40 ,
49+ decoration: BoxDecoration (
50+ shape: BoxShape .circle,
51+ color: isDark
52+ ? const Color (0xFF172744 )
53+ : Theme .of (context).colorScheme.surface,
54+ ),
55+ child: Icon (
56+ Icons .arrow_back,
57+ color: Theme .of (context).colorScheme.primary,
58+ ),
4759 ),
4860 onPressed: () => Navigator .pop (context),
4961 )
5062 : null ,
5163 ),
52- body: SafeArea (
53- child: Center (
54- child: SingleChildScrollView (
55- padding: const EdgeInsets .fromLTRB (24.0 , 16.0 , 24.0 , 48.0 ),
56- child: Column (
57- mainAxisAlignment: MainAxisAlignment .center,
58- children: [
59- _buildHeader (context),
60- const SizedBox (height: 32 ),
61- useCard
62- ? _buildCardContainer (context)
63- : _buildTransparentContainer (context),
64- const SizedBox (height: 32 ),
65- if (footerContent != null ) footerContent! ,
66- ],
64+ body: Container (
65+ decoration: BoxDecoration (
66+ gradient: isDark
67+ ? const LinearGradient (
68+ begin: Alignment .topCenter,
69+ end: Alignment .bottomCenter,
70+ colors: [Color (0xFF08142D ), Color (0xFF0B1A38 ), Color (0xFF0A1834 )],
71+ )
72+ : null ,
73+ ),
74+ child: SafeArea (
75+ child: Center (
76+ child: SingleChildScrollView (
77+ padding: const EdgeInsets .fromLTRB (24.0 , 16.0 , 24.0 , 48.0 ),
78+ child: Column (
79+ mainAxisAlignment: MainAxisAlignment .center,
80+ children: [
81+ _buildHeader (context),
82+ const SizedBox (height: 32 ),
83+ useCard
84+ ? _buildCardContainer (context)
85+ : _buildTransparentContainer (context),
86+ const SizedBox (height: 32 ),
87+ if (footerContent != null ) footerContent! ,
88+ ],
89+ ),
6790 ),
6891 ),
6992 ),
@@ -72,18 +95,20 @@ class AuthLayoutTemplate extends StatelessWidget {
7295 }
7396
7497 Widget _buildHeader (BuildContext context) {
98+ final isDark = Theme .of (context).brightness == Brightness .dark;
99+
75100 return Column (
76101 children: [
77102 customHeaderIcon ??
78103 Container (
79104 width: 80 ,
80105 height: 80 ,
81106 decoration: BoxDecoration (
82- color: Theme .of (context).colorScheme.surface,
107+ color: isDark ? const Color ( 0xFF1E2B47 ) : Theme .of (context).colorScheme.surface,
83108 borderRadius: BorderRadius .circular (24 ),
84109 boxShadow: [
85110 BoxShadow (
86- color: Theme .of (context).colorScheme.primary.withOpacity ( 0.1 ),
111+ color: Theme .of (context).colorScheme.primary.withValues (alpha : 0.14 ),
87112 blurRadius: 20 ,
88113 offset: const Offset (0 , 10 ),
89114 ),
@@ -122,14 +147,17 @@ class AuthLayoutTemplate extends StatelessWidget {
122147 }
123148
124149 Widget _buildCardContainer (BuildContext context) {
150+ final isDark = Theme .of (context).brightness == Brightness .dark;
151+
125152 return Container (
126153 padding: const EdgeInsets .all (32 ),
127154 decoration: BoxDecoration (
128- color: Theme .of (context).colorScheme.surface,
155+ color: isDark ? const Color ( 0xFF1A2945 ) : Theme .of (context).colorScheme.surface,
129156 borderRadius: BorderRadius .circular (32 ),
157+ border: isDark ? Border .all (color: const Color (0xFF2A3E62 ), width: 1 ) : null ,
130158 boxShadow: [
131159 BoxShadow (
132- color: Theme .of (context).colorScheme.primary.withOpacity ( 0.08 ),
160+ color: Theme .of (context).colorScheme.primary.withValues (alpha : 0.12 ),
133161 blurRadius: 30 ,
134162 offset: const Offset (0 , 10 ),
135163 ),
@@ -143,6 +171,8 @@ class AuthLayoutTemplate extends StatelessWidget {
143171 _buildFormElements (context);
144172
145173 Widget _buildFormElements (BuildContext context) {
174+ final isDark = Theme .of (context).brightness == Brightness .dark;
175+
146176 return Column (
147177 crossAxisAlignment: CrossAxisAlignment .stretch,
148178 children: [
@@ -154,12 +184,15 @@ class AuthLayoutTemplate extends StatelessWidget {
154184 style: ElevatedButton .styleFrom (
155185 backgroundColor: Theme .of (context).colorScheme.primary,
156186 disabledBackgroundColor:
157- Theme .of (context).colorScheme.primary.withOpacity ( 0.6 ),
187+ Theme .of (context).colorScheme.primary.withValues (alpha : 0.6 ),
158188 padding: const EdgeInsets .symmetric (vertical: 20 ),
159189 shape: RoundedRectangleBorder (
160190 borderRadius: BorderRadius .circular (16 ),
161191 ),
162- elevation: isLoading ? 0 : 4 ,
192+ elevation: isLoading ? 0 : (isDark ? 8 : 4 ),
193+ shadowColor: isDark
194+ ? Theme .of (context).colorScheme.primary.withValues (alpha: 0.35 )
195+ : null ,
163196 ),
164197 child: isLoading
165198 ? SizedBox (
@@ -197,11 +230,15 @@ class AuthLayoutTemplate extends StatelessWidget {
197230 Expanded (
198231 child: Divider (color: Theme .of (context).colorScheme.outline),
199232 ),
200- const Padding (
233+ Padding (
201234 padding: EdgeInsets .symmetric (horizontal: 16 ),
202235 child: Text (
203236 'OR' ,
204- style: TextStyle (fontSize: 10 , fontWeight: FontWeight .bold),
237+ style: TextStyle (
238+ fontSize: 10 ,
239+ fontWeight: FontWeight .bold,
240+ color: Theme .of (context).colorScheme.onSurfaceVariant,
241+ ),
205242 ),
206243 ),
207244 Expanded (
@@ -214,6 +251,16 @@ class AuthLayoutTemplate extends StatelessWidget {
214251 children: [
215252 Expanded (
216253 child: OutlinedButton .icon (
254+ style: OutlinedButton .styleFrom (
255+ foregroundColor: Theme .of (context).colorScheme.onSurface,
256+ side: BorderSide (color: Theme .of (context).colorScheme.outline),
257+ backgroundColor:
258+ isDark ? const Color (0xFF1A2945 ) : Theme .of (context).colorScheme.surface,
259+ shape: RoundedRectangleBorder (
260+ borderRadius: BorderRadius .circular (16 ),
261+ ),
262+ padding: const EdgeInsets .symmetric (vertical: 14 ),
263+ ),
217264 onPressed: onGoogleTap,
218265 icon: const Icon (
219266 Icons .g_mobiledata,
@@ -226,6 +273,16 @@ class AuthLayoutTemplate extends StatelessWidget {
226273 const SizedBox (width: 16 ),
227274 Expanded (
228275 child: OutlinedButton .icon (
276+ style: OutlinedButton .styleFrom (
277+ foregroundColor: Theme .of (context).colorScheme.onSurface,
278+ side: BorderSide (color: Theme .of (context).colorScheme.outline),
279+ backgroundColor:
280+ isDark ? const Color (0xFF1A2945 ) : Theme .of (context).colorScheme.surface,
281+ shape: RoundedRectangleBorder (
282+ borderRadius: BorderRadius .circular (16 ),
283+ ),
284+ padding: const EdgeInsets .symmetric (vertical: 14 ),
285+ ),
229286 onPressed: onFacebookTap,
230287 icon: const Icon (Icons .facebook, color: Color (0xFF1877F2 )),
231288 label: const Text ('Facebook' ),
0 commit comments