/* *@author: Amjad Amireh Modified Referred Patients *@Date:27/5/2020 *@desc: */ import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/expandable_item_widget.dart'; import 'package:flutter/material.dart'; class PatientReferredScreen extends StatefulWidget { PatientReferredScreen({Key key}) : super(key: key); @override _PatientReferredScreenState createState() => _PatientReferredScreenState(); } class _PatientReferredScreenState extends State { String patientType; String patientTypetitle; List>list_product; @override void initState() { super.initState(); list_product=new List(); for(var k=1;k<=5;k++) { Map map=Map(); map.putIfAbsent(getName(k), ()=>getContent()); list_product.add(map); } list_product.map((s){ }).map((list)=>list).toList();} @override Widget build(BuildContext context) { Listlist=List(); return AppScaffold( //TODO : add Translation appBarTitle: "My Referred Patients",//patientTypetitle, body: Center( child: ListView( children: [ for(final map in list_product) for(final keys in map.keys) ExpandableItem(keys,map[keys].toList()) , ], ) ), ); } String getName(int month) { switch(month) { case 1: return "Mahmoud Shrouf"; case 2: return "Mahmoud Shrouf"; case 3: return "Mahmoud Shrouf"; case 4: return "Mahmoud Shrouf"; case 5: return "Mahmoud Shrouf"; case 6: return "Mahmoud Shrouf"; case 7: return "Mahmoud Shrouf"; case 8: return "Mahmoud Shrouf"; case 9: return "Mahmoud Shrouf"; case 10: return "Mahmoud Shrouf"; case 11: return "Mahmoud Shrouf"; case 12: return "Mahmoud Shrouf"; } } List getContent() { return ["1","2","3","4","5","6"].toList(); } }