바깥여백주기
안쪽여백주기
참
쉽
져?
import 'package:flutter/material.dart';
void main() {
runApp(const MyApp()); /* 앱 구동 시켜주세요 MyApp()에 메인메이지 넣어주면됨 */
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
appBar: AppBar(title: Text('상단띠'), backgroundColor: Colors.blue),
body: Align(
alignment: Alignment.bottomCenter,
child: Container(
width: double.infinity, height: 100, color: Colors.red,
/* margin: EdgeInsets.all(20), 바깥 여백 주기 */
/* padding: EdgeInsets.all(15), 안쪽 여백 주기 */
/* decoration: BoxDecoration(
border: Border.all(color: Colors.black)
박스 테두리 주기
),*/
child: Text('온도'),
),
),
),
);
}
}