-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathm.dart
62 lines (57 loc) · 1.5 KB
/
m.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
import 'package:flutter/material.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
appBar: AppBar(
leading: Icon(Icons.menu),
title: Text('플러터 앱 만들기'),
centerTitle: true,
backgroundColor: Colors.blue,
),
body: const Center(
child: AppContent(),
),
),
);
}
}
class AppContent extends StatelessWidget {
const AppContent({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
// 중앙에 Button 추가
ElevatedButton(
onPressed: () {
// DEBUG CONSOLE에 출력
debugPrint('버튼이 눌렸습니다');
},
child: Text('Text'),
),
Padding(
padding: EdgeInsets.only(top: 30),
),
Stack(
alignment: Alignment.topLeft,
children: [
for (int i = 0; i < 5; i++)
Container(
width: 300 - (i * 60).toDouble(),
height: 300 - (i * 60).toDouble(),
decoration: BoxDecoration(
border: Border.all(color: Colors.blue, width: 5),
),
),
],
),
],
);
}
}