1
1
import 'package:animated_text_kit/animated_text_kit.dart' ;
2
+ import 'package:carousel_slider/carousel_slider.dart' ;
2
3
import 'package:femunity/core/common/loader.dart' ;
3
- import 'package:femunity/core/constants/constants.dart' ;
4
4
import 'package:femunity/features/auth/controller/auth_controller.dart' ;
5
5
import 'package:flutter/material.dart' ;
6
6
import 'package:flutter_riverpod/flutter_riverpod.dart' ;
7
- import 'package:carousel_slider/carousel_slider.dart' ;
8
7
9
8
import '../../../core/common/sign_in_button.dart' ;
10
9
11
10
class LoginScreen extends ConsumerWidget {
12
- const LoginScreen ({super .key});
11
+ const LoginScreen ({Key ? key});
12
+
13
13
void signInAsGuest (WidgetRef ref, BuildContext context) {
14
14
ref.read (authControllerProvider.notifier).signInAsGuest (context);
15
15
}
16
16
17
17
@override
18
18
Widget build (BuildContext context, WidgetRef ref) {
19
19
final isLoading = ref.watch (authControllerProvider);
20
+
20
21
return Scaffold (
21
22
body: isLoading
22
23
? const Loader ()
23
24
: SafeArea (
24
- child: Stack (
25
+ child: Stack (
25
26
children: [
27
+ Container (
28
+ decoration: const BoxDecoration (
29
+ gradient: LinearGradient (
30
+ colors: [
31
+ Colors .pink,
32
+ Colors .orange,
33
+ Colors .yellow,
34
+ ],
35
+ begin: Alignment .topLeft,
36
+ end: Alignment .bottomRight,
37
+ ),
38
+ ),
39
+ ),
26
40
Column (
27
41
crossAxisAlignment: CrossAxisAlignment .center,
28
42
children: [
29
- const SizedBox (
30
- height: 15 ,
31
- ),
43
+ const SizedBox (height: 40 ),
32
44
SizedBox (
33
- height: 30 ,
45
+ height: 100 ,
34
46
child: DefaultTextStyle (
35
47
style: const TextStyle (
36
48
fontFamily: 'FutureLight' ,
37
- fontSize: 29 ,
49
+ fontSize: 27 ,
50
+ fontWeight: FontWeight .bold,
38
51
color: Colors .white,
39
52
shadows: [
40
53
Shadow (
41
54
blurRadius: 7.0 ,
42
- color: Colors .white ,
55
+ color: Colors .black ,
43
56
offset: Offset (0 , 0 ),
44
57
),
45
58
],
@@ -48,29 +61,154 @@ class LoginScreen extends ConsumerWidget {
48
61
repeatForever: true ,
49
62
animatedTexts: [
50
63
FlickerAnimatedText ('Unleash your power' ),
51
- FlickerAnimatedText ('Connect with your community' ),
64
+ FlickerAnimatedText (
65
+ 'Connect with your community' ),
52
66
],
53
67
),
54
68
),
55
69
),
56
- SizedBox (
57
- width: 400.0 ,
58
- child: TextLiquidFill (
59
- text: 'Femunity' ,
60
- waveColor: const Color (0xFFff48a5 ),
61
- textStyle: const TextStyle (
70
+ const SizedBox (height: 20 ),
71
+ Image .asset (
72
+ 'assets/images/logo.png' ,
73
+ width: 200 ,
74
+ height: 100 ,
75
+ // Adjust the width and height as needed
76
+ ),
77
+ const SizedBox (
78
+ width: 300 ,
79
+ child: Text (
80
+ 'Femunity' ,
81
+ style: TextStyle (
62
82
fontFamily: 'AlBrush' ,
63
- fontSize: 79.50 ,
83
+ fontSize: 70 ,
84
+ fontWeight: FontWeight .bold,
85
+ color: Colors .white,
86
+ shadows: [
87
+ Shadow (
88
+ blurRadius: 5.0 ,
89
+ color: Colors .black,
90
+ offset: Offset (0 , 0 ),
91
+ ),
92
+ ],
64
93
),
65
- boxHeight: 150.0 ,
94
+ textAlign: TextAlign .center,
95
+ ),
96
+ ),
97
+ const SizedBox (height: 40 ),
98
+ CarouselSlider (
99
+ options: CarouselOptions (
100
+ height: 200 ,
101
+ autoPlay: true ,
102
+ autoPlayInterval: const Duration (seconds: 3 ),
103
+ autoPlayCurve: Curves .fastOutSlowIn,
104
+ enlargeCenterPage: true ,
105
+ scrollDirection: Axis .horizontal,
106
+ ),
107
+ items: const [
108
+ SliderCard (
109
+ image: 'assets/images/commu.png' ,
110
+ title: 'Discover new communities' ,
111
+ description:
112
+ 'Find communities of like-minded women to connect with and support each other.' ,
113
+ ),
114
+ SliderCard (
115
+ image: 'assets/images/idea.png' ,
116
+ title: 'Share your thoughts and ideas' ,
117
+ description:
118
+ 'Post links, text, and image-based posts to start discussions and share your thoughts and ideas with others.' ,
119
+ ),
120
+ SliderCard (
121
+ image: 'assets/images/mental.png' ,
122
+ title: 'Care for physical & mental health' ,
123
+ description:
124
+ 'Learn more about physical & mental health.' ,
125
+ ),
126
+ SliderCard (
127
+ image: 'assets/images/opport.png' ,
128
+ title: 'Get opportunities to grow' ,
129
+ description:
130
+ 'Explore opportunities for personal and professional growth.' ,
131
+ ),
132
+ SliderCard (
133
+ image: 'assets/images/digitalsec.png' ,
134
+ title: 'Stay Digitally Secure' ,
135
+ description:
136
+ 'Learn how to stay safe and secure in the digital world.' ,
137
+ ),
138
+ ],
139
+ ),
140
+ const SizedBox (height: 100 ),
141
+ Padding (
142
+ padding: const EdgeInsets .symmetric (horizontal: 20 ),
143
+ child: Column (
144
+ children: const [
145
+ SignInButton (),
146
+ ],
66
147
),
67
148
),
68
- const SignInButton (),
69
149
],
70
150
),
71
151
],
72
152
),
153
+ ),
154
+ );
155
+ }
156
+ }
157
+
158
+ class SliderCard extends StatelessWidget {
159
+ final String image;
160
+ final String title;
161
+ final String description;
162
+
163
+ const SliderCard ({
164
+ required this .image,
165
+ required this .title,
166
+ required this .description,
167
+ Key ? key,
168
+ }) : super (key: key);
169
+
170
+ @override
171
+ Widget build (BuildContext context) {
172
+ return Container (
173
+ width: 270 ,
174
+ margin: const EdgeInsets .symmetric (horizontal: 10 ),
175
+ child: Card (
176
+ elevation: 10 ,
177
+ shape: RoundedRectangleBorder (
178
+ borderRadius: BorderRadius .circular (10 ),
179
+ ),
180
+ color: Colors .white.withOpacity (0.7 ),
181
+ child: SingleChildScrollView (
182
+ child: Column (
183
+ children: [
184
+ Image .asset (
185
+ image,
186
+ height: 110 ,
187
+ width: 110 ,
188
+ ),
189
+ // const SizedBox(height: 10),
190
+ Text (
191
+ title,
192
+ style: const TextStyle (
193
+ fontWeight: FontWeight .bold,
194
+ fontSize: 16 ,
195
+ color: Colors .black,
196
+ decoration: TextDecoration .underline,
197
+ ),
198
+ ),
199
+ const SizedBox (height: 5 ),
200
+ Text (
201
+ description,
202
+ style: TextStyle (
203
+ fontSize: 12 ,
204
+ color: Colors .grey[900 ],
205
+ ),
206
+ textAlign: TextAlign .center,
207
+ ),
208
+ ],
73
209
),
210
+ ),
211
+ ),
74
212
);
75
213
}
76
- }
214
+ }
0 commit comments