Row နှင့် Column က Flutter layout ရဲ့ အခြေခံအကျဆုံး tools ဖြစ်ပါတယ်။ Row က child widgets တွေကို ဘေးတိုက်စီပြီး Column က အပေါ်အောက်စီပါတယ်။ UI ရေးတဲ့အခါ ဘာကို horizontal စီမလဲ၊ ဘာကို vertical စီမလဲဆိုတာဆုံးဖြတ်တာက layout thinking ရဲ့အစပါ။
dart
Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
const Text('Rate this lesson'),
const SizedBox(height: 12),
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: const [
Icon(Icons.star, color: Colors.amber, size: 36),
Icon(Icons.star, color: Colors.amber, size: 36),
Icon(Icons.star, color: Colors.amber, size: 36),
],
),
],
)You should see
Screen အလယ်မှာ Rate this lesson စာသားပေါ်ပြီး အောက်မှာ ကြယ် icon ၃ ခု ဘေးတိုက်စီနေပါမယ်။နောက်တစ်ဆင့်
Layout ပြီးရင် user နှိပ်နိုင်တဲ့ buttons တွေကိုစတင်သုံးကြည့်ပါ။