Commit fa229684 authored by Uditha Prabhasha 's avatar Uditha Prabhasha

Update kidsReport.dart

parent 2d62e3f2
...@@ -192,37 +192,37 @@ class _KidsReportPageState extends State<KidsReportPage> { ...@@ -192,37 +192,37 @@ class _KidsReportPageState extends State<KidsReportPage> {
} }
Widget _buildDropdownSection({ Widget _buildDropdownSection({
required String title, required String title,
required Map<String, String?> dropdownMap, required Map<String, String?> dropdownMap,
}) { }) {
return Column( return Column(
crossAxisAlignment: CrossAxisAlignment.stretch, crossAxisAlignment: CrossAxisAlignment.stretch,
children: [ children: [
Text( Text(
title, title,
style: TextStyle( style: TextStyle(
fontSize: 18, fontSize: 18,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
),
), ),
SizedBox(height: 10), ),
...dropdownMap.keys.map((String key) { SizedBox(height: 10),
return Padding( ...dropdownMap.keys.map((String key) {
padding: const EdgeInsets.symmetric(horizontal: 8.0), return Padding(
child: Row( padding: const EdgeInsets.symmetric(horizontal: 8.0),
children: [ child: Row(
Expanded( children: [
flex: 3, Expanded(
child: Text( flex: 3,
key, child: Text(
style: TextStyle(fontSize: 16), key,
), style: TextStyle(fontSize: 16),
), ),
Expanded( ),
flex: 1, Expanded(
child: Container( flex: 1,
width: 100, child: Row(
child: DropdownButton<String>( children: [
DropdownButton<String>(
value: dropdownMap[key], value: dropdownMap[key],
icon: Icon(Icons.arrow_drop_down), icon: Icon(Icons.arrow_drop_down),
iconSize: 24, iconSize: 24,
...@@ -246,15 +246,18 @@ class _KidsReportPageState extends State<KidsReportPage> { ...@@ -246,15 +246,18 @@ class _KidsReportPageState extends State<KidsReportPage> {
}, },
).toList(), ).toList(),
), ),
), SizedBox(width: 8),
],
), ),
], ),
), ],
); ),
}).toList(), );
], }).toList(),
); ],
} );
}
postDetailsToFirestore(context) async { postDetailsToFirestore(context) async {
FirebaseFirestore firebaseFirestore = FirebaseFirestore.instance; FirebaseFirestore firebaseFirestore = FirebaseFirestore.instance;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment