Commit 4019eb83 authored by Uditha Prabhasha 's avatar Uditha Prabhasha

Update kidsReport.dart

parent fa229684
...@@ -198,17 +198,19 @@ class _KidsReportPageState extends State<KidsReportPage> { ...@@ -198,17 +198,19 @@ class _KidsReportPageState extends State<KidsReportPage> {
return Column( return Column(
crossAxisAlignment: CrossAxisAlignment.stretch, crossAxisAlignment: CrossAxisAlignment.stretch,
children: [ children: [
Text( Padding(
title, padding: const EdgeInsets.symmetric(vertical: 8.0),
style: TextStyle( child: Text(
fontSize: 18, title,
fontWeight: FontWeight.bold, style: TextStyle(
fontSize: 18,
fontWeight: FontWeight.bold,
),
), ),
), ),
SizedBox(height: 10),
...dropdownMap.keys.map((String key) { ...dropdownMap.keys.map((String key) {
return Padding( return Padding(
padding: const EdgeInsets.symmetric(horizontal: 8.0), padding: const EdgeInsets.symmetric(horizontal: 8.0, vertical: 4.0),
child: Row( child: Row(
children: [ children: [
Expanded( Expanded(
...@@ -220,34 +222,32 @@ class _KidsReportPageState extends State<KidsReportPage> { ...@@ -220,34 +222,32 @@ class _KidsReportPageState extends State<KidsReportPage> {
), ),
Expanded( Expanded(
flex: 1, flex: 1,
child: Row( child: Align(
children: [ alignment: Alignment.centerRight,
DropdownButton<String>( child: DropdownButton<String>(
value: dropdownMap[key], value: dropdownMap[key],
icon: Icon(Icons.arrow_drop_down), icon: Icon(Icons.arrow_drop_down),
iconSize: 24, iconSize: 24,
elevation: 16, elevation: 16,
style: TextStyle(color: Colors.black), style: TextStyle(color: Colors.black),
underline: Container( underline: Container(
height: 1, height: 1,
color: Colors.green, color: Colors.green,
),
onChanged: (String? value) {
setState(() {
dropdownMap[key] = value;
});
},
items: dropdownValues.map<DropdownMenuItem<String>>(
(String value) {
return DropdownMenuItem<String>(
value: value,
child: Text(value),
);
},
).toList(),
), ),
SizedBox(width: 8), onChanged: (String? value) {
], setState(() {
dropdownMap[key] = value;
});
},
items: dropdownValues.map<DropdownMenuItem<String>>(
(String value) {
return DropdownMenuItem<String>(
value: value,
child: Text(value),
);
},
).toList(),
),
), ),
), ),
], ],
...@@ -259,6 +259,7 @@ class _KidsReportPageState extends State<KidsReportPage> { ...@@ -259,6 +259,7 @@ class _KidsReportPageState extends State<KidsReportPage> {
} }
postDetailsToFirestore(context) async { postDetailsToFirestore(context) async {
FirebaseFirestore firebaseFirestore = FirebaseFirestore.instance; FirebaseFirestore firebaseFirestore = FirebaseFirestore.instance;
var user = _auth.currentUser; var user = _auth.currentUser;
......
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