/
main.dart
112 lines (104 loc) · 2.57 KB
/
main.dart
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
import 'package:coast/coast.dart';
import 'package:flutter/material.dart';
void main() {
runApp(CoastExampleApp());
}
class CoastExampleApp extends StatefulWidget {
@override
_CoastExampleAppState createState() => _CoastExampleAppState();
}
class _CoastExampleAppState extends State<CoastExampleApp> {
final _beaches = [
Beach(builder: (context) => Cadzand()),
Beach(builder: (context) => Westkapelle()),
Beach(builder: (context) => Zoutelande()),
];
final _coastController = CoastController(initialPage: 1);
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Coast(
beaches: _beaches,
controller: _coastController,
observers: [
CrabController(),
],
),
);
}
}
class Cadzand extends StatelessWidget {
@override
Widget build(BuildContext context) => Scaffold(
appBar: AppBar(
title: Text("Cadzand"),
backgroundColor: Colors.deepOrange,
),
body: Stack(
children: [
Positioned(
top: 40,
left: 40,
child: Crab(
tag: "container",
child: Container(
color: Colors.green,
width: 80,
height: 60,
),
),
),
],
),
);
}
class Westkapelle extends StatelessWidget {
@override
Widget build(BuildContext context) => Scaffold(
appBar: AppBar(
title: Text("Westkapelle"),
backgroundColor: Colors.amber,
),
body: Stack(
children: [
Positioned(
top: 80,
right: 40,
child: Crab(
tag: "container",
child: Container(
color: Colors.green,
width: 200,
height: 100,
),
),
),
],
),
);
}
class Zoutelande extends StatelessWidget {
@override
Widget build(BuildContext context) => Scaffold(
appBar: AppBar(
title: Text("Zoutelande"),
backgroundColor: Colors.deepPurple,
),
body: Stack(
children: [
Positioned(
bottom: 40,
left: 20,
child: Crab(
tag: "container",
child: Container(
color: Colors.green,
width: 100,
height: 200,
),
),
),
],
),
);
}