err:
ββββββββ Exception caught by widgets library βββββββββββββββββββββββββββββββββββ Incorrect use of ParentDataWidget.
κ³μ λ μ
곡λΆν΄μΌν
[Programming/Flutter] κΈ°λ³Έ μμ ― (Widgets)
Flutterλ‘ κ°λ°νκΈ°(01) - μμ ― μκ°
μμ μ
appBar: AppBar(
backgroundColor: Colors.transparent,
bottomOpacity: 0.0,
elevation: 0.0,
centerTitle: true,
iconTheme: IconThemeData(
color: Colors.black,
size: 100 // This isn't performing any changes
),
title: Container(
child: Expanded(
child: Text(
'곡μ§μ¬ν',
style: TextStyle(
color: Colors.black,
fontWeight: FontWeight.bold,
fontSize: 20.0,
),
),
),
),
),
Expandedκ° λ¬Έμ μμ
Expandedλ μμ 2κ°μ΄μμ΄ μμ΄μΌ μ λλ‘ μλνλλ° μμ Textνλλ§ μμ΄μ μ λλ‘ μλμ΄ μλμλκ²(μμ μ€λ₯λ₯Ό λ³Ό μ μλ κ²)
Expandedλ₯Ό μ§μ°κ±°λ Containerλ‘ λ°κΎΈκ±°λ, childrenμ΄ λ€μ΄κ°λ Columnμ΄λ Rowμμμ Expandedλ₯Ό μ¬μ©νλ©΄ ν΄κ²°λλ€.
μμ ν
appBar: AppBar(
backgroundColor: Colors.transparent,
bottomOpacity: 0.0,
elevation: 0.0,
centerTitle: true,
iconTheme: IconThemeData(
color: Colors.black,
size: 100 // This isn't performing any changes
),
title: Column(
children:[
Expanded(
child: Text(
'곡μ§μ¬ν',
style: TextStyle(
color: Colors.black,
fontWeight: FontWeight.bold,
fontSize: 20.0,
),
),
),
Text(
'곡μ§μ¬ν1',
style: TextStyle(
color: Colors.black,
fontWeight: FontWeight.bold,
fontSize: 20.0,
),
),
]
),
),