Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#1 Try! 標準ウィジェットを使ってみよう #1

Open
wants to merge 2 commits into
base: introduction
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
17 changes: 17 additions & 0 deletions lib/my_home_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,23 @@ class _MyHomePageState extends State<MyHomePage> {
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
// SizedBox で大きさ(px)を決めてあげる
const SizedBox(
height: 50,
width: 50,
// ColoredBox で色を塗ってあげる
// 色も用意してくれてる🎨
child: ColoredBox(color: Colors.amber),
// 自分で色指定もできる(丸動かすと自動で RGB 挿入してくれる🥺)
// ```
// child: ColoredBox(color: Color.fromARGB(255, 85, 170, 116)),
// ```
),
const SizedBox(
height: 100,
width: 100,
child: ColoredBox(color: Colors.pink),
),
const Text(
'You have pushed the button this many times:',
),
Expand Down