1
- import 'package:day35/animation/FadeAnimation .dart' ;
1
+ import 'package:animate_do/animate_do .dart' ;
2
2
import 'package:day35/pages/home.dart' ;
3
3
import 'package:flutter/material.dart' ;
4
4
import 'package:scrollable_positioned_list/scrollable_positioned_list.dart' ;
@@ -148,7 +148,7 @@ class _DateAndTimeState extends State<DateAndTime> {
148
148
headerSliverBuilder: (BuildContext context, bool innerBoxIsScrolled) {
149
149
return < Widget > [
150
150
SliverToBoxAdapter (
151
- child: FadeAnimation ( 1 , Padding (
151
+ child: FadeInUp (child : Padding (
152
152
padding: EdgeInsets .only (top: 120.0 , right: 20.0 , left: 20.0 ),
153
153
child: Text (
154
154
'Select Date \n and Time' ,
@@ -168,7 +168,7 @@ class _DateAndTimeState extends State<DateAndTime> {
168
168
crossAxisAlignment: CrossAxisAlignment .start,
169
169
children: [
170
170
SizedBox (height: 30 ,),
171
- FadeAnimation ( 1 , Row (
171
+ FadeInUp (child : Row (
172
172
children: [
173
173
Text ("October 2021" ),
174
174
Spacer (),
@@ -190,7 +190,9 @@ class _DateAndTimeState extends State<DateAndTime> {
190
190
scrollDirection: Axis .horizontal,
191
191
itemCount: _days.length,
192
192
itemBuilder: (BuildContext context, int index) {
193
- return FadeAnimation ((1 + index) / 6 , GestureDetector (
193
+ return FadeInUp (
194
+ delay: Duration (milliseconds: 500 * index),
195
+ child: GestureDetector (
194
196
onTap: () {
195
197
setState (() {
196
198
_selectedDay = _days[index][0 ];
@@ -221,7 +223,7 @@ class _DateAndTimeState extends State<DateAndTime> {
221
223
),
222
224
),
223
225
SizedBox (height: 10 ,),
224
- FadeAnimation ( 1.2 , Container (
226
+ FadeInUp (child : Container (
225
227
height: 60 ,
226
228
decoration: BoxDecoration (
227
229
borderRadius: BorderRadius .circular (10 ),
@@ -262,7 +264,7 @@ class _DateAndTimeState extends State<DateAndTime> {
262
264
),
263
265
)),
264
266
SizedBox (height: 40 ,),
265
- FadeAnimation ( 1.2 , Text ("Repeat" , style: TextStyle (fontSize: 18 , fontWeight: FontWeight .w600),)),
267
+ FadeInUp (child : Text ("Repeat" , style: TextStyle (fontSize: 18 , fontWeight: FontWeight .w600),)),
266
268
SizedBox (height: 10 ,),
267
269
Container (
268
270
height: 50 ,
@@ -280,7 +282,9 @@ class _DateAndTimeState extends State<DateAndTime> {
280
282
_selectedRepeat = index;
281
283
});
282
284
},
283
- child: FadeAnimation ((1.2 + index) / 4 , Container (
285
+ child: FadeInUp (
286
+ delay: Duration (milliseconds: 500 * index),
287
+ child: Container (
284
288
padding: EdgeInsets .symmetric (horizontal: 20 ),
285
289
decoration: BoxDecoration (
286
290
borderRadius: BorderRadius .circular (15 ),
@@ -296,7 +300,7 @@ class _DateAndTimeState extends State<DateAndTime> {
296
300
)
297
301
),
298
302
SizedBox (height: 40 ,),
299
- FadeAnimation ( 1.4 , Text ("Additional Service" , style: TextStyle (fontSize: 18 , fontWeight: FontWeight .w600),)),
303
+ FadeInUp (child : Text ("Additional Service" , style: TextStyle (fontSize: 18 , fontWeight: FontWeight .w600),)),
300
304
SizedBox (height: 10 ,),
301
305
Container (
302
306
height: 120 ,
@@ -318,7 +322,9 @@ class _DateAndTimeState extends State<DateAndTime> {
318
322
}
319
323
});
320
324
},
321
- child: FadeAnimation ((1.4 + index) / 4 , Container (
325
+ child: FadeInUp (
326
+ delay: Duration (milliseconds: 500 * index),
327
+ child: Container (
322
328
width: 110 ,
323
329
decoration: BoxDecoration (
324
330
borderRadius: BorderRadius .circular (15 ),
0 commit comments