1
1
import 'package:day35/animation/FadeAnimation.dart' ;
2
2
import 'package:day35/models/service.dart' ;
3
+ import 'package:day35/pages/cleaning.dart' ;
3
4
import 'package:flutter/material.dart' ;
4
5
5
6
void main () {
@@ -37,7 +38,14 @@ class _HomePageState extends State<HomePage> {
37
38
return Scaffold (
38
39
backgroundColor: Colors .white,
39
40
floatingActionButton: selectedService >= 0 ? FloatingActionButton (
40
- onPressed: () {},
41
+ onPressed: () {
42
+ Navigator .push (
43
+ context,
44
+ MaterialPageRoute (
45
+ builder: (context) => CleaningPage (),
46
+ ),
47
+ );
48
+ },
41
49
child: Icon (Icons .arrow_forward_ios, size: 20 ,),
42
50
backgroundColor: Colors .blue,
43
51
) : null ,
@@ -75,7 +83,7 @@ class _HomePageState extends State<HomePage> {
75
83
physics: NeverScrollableScrollPhysics (),
76
84
itemCount: services.length,
77
85
itemBuilder: (BuildContext context, int index) {
78
- return FadeAnimation ((1.0 + index) / 4 , serviceCard (services[index].imageURL, services[index].name, index));
86
+ return FadeAnimation ((1.0 + index) / 4 , serviceContainer (services[index].imageURL, services[index].name, index));
79
87
}
80
88
),
81
89
),
@@ -86,7 +94,7 @@ class _HomePageState extends State<HomePage> {
86
94
);
87
95
}
88
96
89
- serviceCard (String image, String name, int index) {
97
+ serviceContainer (String image, String name, int index) {
90
98
return GestureDetector (
91
99
onTap: () {
92
100
setState (() {
0 commit comments