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
4
import 'package:femunity/features/auth/controller/auth_controller.dart' ;
4
5
import 'package:flutter/material.dart' ;
@@ -16,19 +17,20 @@ class LoginScreen extends ConsumerWidget {
16
17
@override
17
18
Widget build (BuildContext context, WidgetRef ref) {
18
19
final isLoading = ref.watch (authControllerProvider);
20
+
19
21
return Scaffold (
20
22
body: isLoading
21
23
? const Loader ()
22
24
: SafeArea (
23
25
child: Stack (
24
26
children: [
25
27
Container (
26
- decoration: BoxDecoration (
28
+ decoration: const BoxDecoration (
27
29
gradient: LinearGradient (
28
30
colors: [
29
- Colors .black ,
30
- Colors .grey[ 800 ] ! ,
31
- Colors .grey[ 400 ] ! ,
31
+ Colors .pink ,
32
+ Colors .orange ,
33
+ Colors .yellow ,
32
34
],
33
35
begin: Alignment .topLeft,
34
36
end: Alignment .bottomRight,
@@ -92,12 +94,55 @@ class LoginScreen extends ConsumerWidget {
92
94
textAlign: TextAlign .center,
93
95
),
94
96
),
95
- const SizedBox (height: 320 ),
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 ),
96
141
Padding (
97
142
padding: const EdgeInsets .symmetric (horizontal: 20 ),
98
143
child: Column (
99
- children: [
100
- const SignInButton (),
144
+ children: const [
145
+ SignInButton (),
101
146
],
102
147
),
103
148
),
@@ -109,3 +154,61 @@ class LoginScreen extends ConsumerWidget {
109
154
);
110
155
}
111
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
+ ],
209
+ ),
210
+ ),
211
+ ),
212
+ );
213
+ }
214
+ }
0 commit comments