Skip to content

Commit bf56cf1

Browse files
UI for instructions and main page
1 parent 123e7e4 commit bf56cf1

15 files changed

Lines changed: 2060 additions & 29 deletions
744 KB
Loading

app/assets/images/performance.png

572 KB
Loading
461 KB
Loading

app/assets/images/set_up.png

1.08 MB
Loading
803 KB
Loading

app/lib/app/router.dart

Lines changed: 206 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,16 @@
1+
import 'package:flutter/cupertino.dart';
12
import 'package:go_router/go_router.dart';
23

34
import '../features/debug/gps_test_screen.dart';
45
import '../features/home/home_screen.dart';
6+
import '../features/instructions/instructions_screen_2.dart';
7+
import '../features/instructions/instructions_screen_3.dart';
8+
import '../features/instructions/instructions_screen_4.dart';
9+
import '../features/instructions/instructions_screen_5.dart';
10+
import '../features/instructions/instructions_screen_6.dart';
11+
import '../features/instructions/instructions_screen_7.dart';
512
import '../features/walk/presentation/walk_screen.dart';
13+
import '../features/instructions/instructions_screen_1.dart';
614

715
final router = GoRouter(
816
routes: [
@@ -12,5 +20,203 @@ final router = GoRouter(
1220
path: '/debug/gps',
1321
builder: (context, state) => const GpsTestScreen(),
1422
),
23+
24+
// Route + Animation - Instructions-1 Page
25+
GoRoute(
26+
path: '/instructions-1',
27+
pageBuilder: (context, state) {
28+
return CustomTransitionPage(
29+
key: state.pageKey,
30+
child: const InstructionsScreen1(),
31+
transitionsBuilder: (context, animation, secondaryAnimation, child) {
32+
return SlideTransition(
33+
position: animation.drive(
34+
Tween<Offset>(
35+
begin: const Offset(1, 0),
36+
end: Offset.zero,
37+
).chain(CurveTween(curve: Curves.easeInOut)),
38+
),
39+
child: child,
40+
);
41+
},
42+
);
43+
},
44+
),
45+
46+
// Route + Animation - Instructions-2 Page
47+
GoRoute(
48+
path: '/instructions-2',
49+
pageBuilder: (context, state) {
50+
return CustomTransitionPage(
51+
key: state.pageKey,
52+
child: const InstructionsScreen2(),
53+
transitionsBuilder: (
54+
context,
55+
animation,
56+
secondaryAnimation,
57+
child,
58+
) {
59+
return SlideTransition(
60+
position: animation.drive(
61+
Tween<Offset>(
62+
begin: const Offset(1, 0),
63+
end: Offset.zero,
64+
).chain(
65+
CurveTween(
66+
curve: Curves.easeInOut,
67+
),
68+
),
69+
),
70+
child: child,
71+
);
72+
},
73+
);
74+
},
75+
),
76+
// Route + Animation - Instructions-3 Page
77+
GoRoute(
78+
path: '/instructions-3',
79+
pageBuilder: (context, state) {
80+
return CustomTransitionPage(
81+
key: state.pageKey,
82+
child: const InstructionsScreen3(),
83+
transitionsBuilder: (context, animation, secondaryAnimation, child) {
84+
return SlideTransition(
85+
position:
86+
Tween<Offset>(
87+
begin: const Offset(1.0, 0.0),
88+
end: Offset.zero,
89+
).animate(
90+
CurvedAnimation(
91+
parent: animation,
92+
curve: Curves.easeOutCubic,
93+
),
94+
),
95+
child: child,
96+
);
97+
},
98+
);
99+
},
100+
),
101+
// Route + Animation - Instructions-4 Page
102+
GoRoute(
103+
path: '/instructions-4',
104+
pageBuilder: (context, state) {
105+
return CustomTransitionPage(
106+
key: state.pageKey,
107+
child: const InstructionsScreen4(),
108+
transitionsBuilder: (
109+
context,
110+
animation,
111+
secondaryAnimation,
112+
child,
113+
) {
114+
return SlideTransition(
115+
position: animation.drive(
116+
Tween<Offset>(
117+
begin: const Offset(1, 0),
118+
end: Offset.zero,
119+
).chain(
120+
CurveTween(
121+
curve: Curves.easeInOut,
122+
),
123+
),
124+
),
125+
child: child,
126+
);
127+
},
128+
);
129+
},
130+
),
131+
// Route + Animation - Instructions-5 Page
132+
GoRoute(
133+
path: '/instructions-5',
134+
pageBuilder: (context, state) {
135+
return CustomTransitionPage(
136+
key: state.pageKey,
137+
child: const InstructionsScreen5(),
138+
transitionsBuilder: (
139+
context,
140+
animation,
141+
secondaryAnimation,
142+
child,
143+
) {
144+
return SlideTransition(
145+
position: animation.drive(
146+
Tween<Offset>(
147+
begin: const Offset(1, 0),
148+
end: Offset.zero,
149+
).chain(
150+
CurveTween(
151+
curve: Curves.easeInOut,
152+
),
153+
),
154+
),
155+
child: child,
156+
);
157+
},
158+
);
159+
},
160+
),
161+
// Route + Animation - Instructions-6 Page
162+
GoRoute(
163+
path: '/instructions-6',
164+
pageBuilder: (context, state) {
165+
return CustomTransitionPage(
166+
key: state.pageKey,
167+
child: const InstructionsScreen6(),
168+
transitionsBuilder: (
169+
context,
170+
animation,
171+
secondaryAnimation,
172+
child,
173+
) {
174+
return SlideTransition(
175+
position: animation.drive(
176+
Tween<Offset>(
177+
begin: const Offset(1, 0),
178+
end: Offset.zero,
179+
).chain(
180+
CurveTween(
181+
curve: Curves.easeInOut,
182+
),
183+
),
184+
),
185+
child: child,
186+
);
187+
},
188+
);
189+
},
190+
),
191+
// Route + Animation - Instructions-7 Page
192+
GoRoute(
193+
path: '/instructions-7',
194+
pageBuilder: (context, state) {
195+
return CustomTransitionPage(
196+
key: state.pageKey,
197+
child: const InstructionsScreen7(),
198+
transitionsBuilder: (
199+
context,
200+
animation,
201+
secondaryAnimation,
202+
child,
203+
) {
204+
return SlideTransition(
205+
position: animation.drive(
206+
Tween<Offset>(
207+
begin: const Offset(1, 0),
208+
end: Offset.zero,
209+
).chain(
210+
CurveTween(
211+
curve: Curves.easeInOut,
212+
),
213+
),
214+
),
215+
child: child,
216+
);
217+
},
218+
);
219+
},
220+
),
15221
],
16222
);

0 commit comments

Comments
 (0)