- μ§μ λ ν¨λ©μΌλ‘ νμ νλͺ©μ μ½μ
νλ μμ ―
const Padding({
Key? key,
required this.padding,
Widget? child,
}) : assert(padding != null),
super(key: key, child: child);
>> Padding μ£Όμ μμ±
- padding : childλ₯Ό μ½μ
ν 곡κ°μ μ
- child : λ¨μΌ μμ ― μ¬μ© κ°λ₯
>> EdgeInsets : ν¨λ© μΉμλ₯Ό μ€λͺ
νλ λ° μ¬μ©λλ ν΄λμ€
- EdgeInsets.all() : μ 체μ μ€μ κ°λ₯
ex) const EdgeInsets.all(8.0)
- EdgeInsets.symmetric() : vertical, horizontalμ μ€μ κ°λ₯
ex) const EdgeInsets.symmetric(vertical: 8.0)
- EdgeInsets.only : left, right, top, bottomμ μ€μ κ°λ₯
ex) const EdgeInsets.only(left: 40.0)
- Column, Row λλ Flexμ νμ νλͺ©μ νμ₯νμ¬ νμ νλͺ©μ΄ μ¬μ© κ°λ₯ν 곡κ°μ μ±μ°λλ‘ νλ μμ ―
- μ£ΌμΆμ λ°λΌ μ¬μ© κ°λ₯ν 곡κ°μ μ±μ
- νμ₯νκ³ μΆμ μμ ―μ λλ¬μΈλ©΄ λ¨
const Expanded({
Key? key,
int flex = 1,
required Widget child,
}) : super(key: key, flex: flex, fit: FlexFit.tight, child: child);