質問編集履歴
1
「動きはする」コードのサンプルを追記しました。
test
CHANGED
File without changes
|
test
CHANGED
@@ -35,3 +35,103 @@
|
|
35
35
|
|
36
36
|
|
37
37
|
![イメージ説明](72adab71e9e9afdab9ba68c65a970f29.png)
|
38
|
+
|
39
|
+
|
40
|
+
|
41
|
+
|
42
|
+
|
43
|
+
|
44
|
+
|
45
|
+
|
46
|
+
|
47
|
+
参考になるかはわかりませんが、「動きはする」コードのサンプルです
|
48
|
+
|
49
|
+
```flutter
|
50
|
+
|
51
|
+
import 'package:flutter/material.dart';
|
52
|
+
|
53
|
+
import 'next_page.dart';
|
54
|
+
|
55
|
+
|
56
|
+
|
57
|
+
void main() {
|
58
|
+
|
59
|
+
runApp(MyApp());
|
60
|
+
|
61
|
+
}
|
62
|
+
|
63
|
+
|
64
|
+
|
65
|
+
class MyApp extends StatelessWidget {
|
66
|
+
|
67
|
+
// This widget is the root of your application.
|
68
|
+
|
69
|
+
@override
|
70
|
+
|
71
|
+
Widget build(BuildContext context) {
|
72
|
+
|
73
|
+
return MaterialApp(
|
74
|
+
|
75
|
+
title: 'Flutter Demo',
|
76
|
+
|
77
|
+
theme: ThemeData(
|
78
|
+
|
79
|
+
primarySwatch: Colors.blue,
|
80
|
+
|
81
|
+
visualDensity: VisualDensity.adaptivePlatformDensity,
|
82
|
+
|
83
|
+
),
|
84
|
+
|
85
|
+
home: MyHomePage(),
|
86
|
+
|
87
|
+
);
|
88
|
+
|
89
|
+
}
|
90
|
+
|
91
|
+
}
|
92
|
+
|
93
|
+
|
94
|
+
|
95
|
+
class MyHomePage extends StatelessWidget {
|
96
|
+
|
97
|
+
@override
|
98
|
+
|
99
|
+
Widget build(BuildContext context) {
|
100
|
+
|
101
|
+
return Scaffold(
|
102
|
+
|
103
|
+
appBar: AppBar(
|
104
|
+
|
105
|
+
title: Text('Sample App'),
|
106
|
+
|
107
|
+
),
|
108
|
+
|
109
|
+
body: GestureDetector(
|
110
|
+
|
111
|
+
onTap: (){
|
112
|
+
|
113
|
+
//タップしたら次の画面へ遷移
|
114
|
+
|
115
|
+
Navigator.push(
|
116
|
+
|
117
|
+
context,
|
118
|
+
|
119
|
+
MaterialPageRoute(
|
120
|
+
|
121
|
+
builder: (context) => NextPage()
|
122
|
+
|
123
|
+
),
|
124
|
+
|
125
|
+
);
|
126
|
+
|
127
|
+
},
|
128
|
+
|
129
|
+
child: Image.asset('images/hokkaido.png')),//北海道の画像
|
130
|
+
|
131
|
+
);
|
132
|
+
|
133
|
+
}
|
134
|
+
|
135
|
+
}
|
136
|
+
|
137
|
+
```
|