build method
레이블과 선택적 필수 별표를 빌드한다.
Implementation
@override
Widget build(BuildContext context) {
return Padding(
padding: const EdgeInsets.only(bottom: 8.0),
child: Row(
children: [
Text(
text,
style: const TextStyle(
color: Colors.black,
fontWeight: FontWeight.bold,
),
),
if (isRequired)
const Text(
'*',
style: TextStyle(
color: Colors.red,
fontWeight: FontWeight.bold,
),
),
],
),
);
}