memostack
article thumbnail
플러터(flutter) - Container와 SizedBox의 차이
Mobile/Flutter 2021. 1. 2. 22:49

Container와 SizedBox 위젯은 둘 다 width와 height를 가진다. 그래서 너비와 높이를 설정할 수 있다. 하지만 차이점이 존재한다. Container Container의 위젯은 width와 height를 넣지 않으면, 최대 크기로 확장해준다. import "package:flutter/material.dart"; void main() => runApp(MyApp()); class MyApp extends StatelessWidget { @override Widget build(BuildContext context) { return MaterialApp( title: "Container와 SizedBox 차이", home: Example(), ); } } class Example ext..

article thumbnail
플러터(flutter) - 기본 레이아웃 (Column, Row, Container)
Mobile/Flutter 2021. 1. 2. 22:28

Container 컨테이너는 width와 height 속성이 있어서 크기를 조절할 수 있다. import "package:flutter/material.dart"; void main() => runApp(MyApp()); class MyApp extends StatelessWidget { @override Widget build(BuildContext context) { return MaterialApp( title: "레이아웃 익히기", home: LayoutExample(), ); } } class LayoutExample extends StatelessWidget { @override Widget build(BuildContext context) { return Scaffold( body: Cont..