flutter 박스정렬하는법
2024-09-11 16:27
1,638
0
0
0
본문
접기
[ ▼ 작성자 참고 Source ]
class Suse_App extends StatelessWidget {
const Suse_App({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
appBar: AppBar(
title: Text('suse_hh')
),
body: Align(
alignment: Alignment.bottomCenter,
child: Container(
width: 150, height: 50, color: Colors.red,
),
),
)
);
}
본문
alignment: Alignment.topLeft : 좌측상단
alignment: Alignment.topCenter : 중앙상단
alignment: Alignment.topRight : 우측상단
alignment: Alignment.centerLeft : 좌측중앙
alignment: Alignment.center : 정중앙
alignment: Alignment.centerRight : 우측중앙
alignment: Alignment.bottomLeft : 좌측하단
alignment: Alignment.bottomCenter : 중앙하단
alignment: Alignment.bottomRight : 우측하단
박스에 좌상단,좌하단,우상단,우하단 등 정렬하려면 Align() 안에 작성해야됩니다
0
0
로그인 후 추천 또는 비추천하실 수 있습니다.
댓글목록0