merge-update-with-lab-changes
haroon amjad 3 years ago
parent 7702960bb5
commit e64a91855f

@ -24,7 +24,9 @@ class MedicalReports extends StatelessWidget {
message: TranslationBase.of(context).confirmMsgReport, message: TranslationBase.of(context).confirmMsgReport,
onTap: () => reportsViewModel.insertRequestForMedicalReport(model, TranslationBase.of(context).successSendReport), onTap: () => reportsViewModel.insertRequestForMedicalReport(model, TranslationBase.of(context).successSendReport),
), ),
); ).then((value) {
Navigator.pop(context);
});
return; return;
} }

@ -50,126 +50,131 @@ class RadioSelectionDialogState extends State<RadioSelectionDialog> {
insetPadding: EdgeInsets.only(left: 21, right: 21), insetPadding: EdgeInsets.only(left: 21, right: 21),
child: Padding( child: Padding(
padding: EdgeInsets.only(left: 20, right: 20, top: 18, bottom: 28), padding: EdgeInsets.only(left: 20, right: 20, top: 18, bottom: 28),
child: Column( child: SingleChildScrollView(
crossAxisAlignment: CrossAxisAlignment.start, child: Column(
mainAxisSize: MainAxisSize.min, crossAxisAlignment: CrossAxisAlignment.start,
children: [ mainAxisSize: MainAxisSize.min,
Row( children: [
crossAxisAlignment: CrossAxisAlignment.start, Row(
children: [ crossAxisAlignment: CrossAxisAlignment.start,
Expanded( children: [
child: Padding( Expanded(
padding: const EdgeInsets.only(top: 16.0), child: Padding(
child: Text( padding: const EdgeInsets.only(top: 16.0),
TranslationBase.of(context).select, child: Text(
style: TextStyle(fontSize: 24, fontWeight: FontWeight.w600, color: Color(0xff2B353E), height: 35 / 24, letterSpacing: -0.96), TranslationBase.of(context).select,
style: TextStyle(fontSize: 24, fontWeight: FontWeight.w600, color: Color(0xff2B353E), height: 35 / 24, letterSpacing: -0.96),
),
), ),
), ),
), IconButton(
IconButton( padding: EdgeInsets.zero,
padding: EdgeInsets.zero, icon: Icon(Icons.close),
icon: Icon(Icons.close), color: Color(0xff2B353E),
color: Color(0xff2B353E), constraints: BoxConstraints(),
constraints: BoxConstraints(), onPressed: () {
onPressed: () { Navigator.pop(context);
Navigator.pop(context); },
}, )
) ],
],
),
SizedBox(height: 21),
Text(
TranslationBase.of(context).pleaseSelectFromBelowOptions,
style: TextStyle(fontSize: 14, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.56),
),
widget.isShowSearch ? Padding(
padding: const EdgeInsets.all(8.0),
child: TextField(
controller: controller,
onChanged: (v) {
if (v.length > 0) {
tempListData.clear();
for (int i = 0; i < widget.listData.length; i++) {
if (widget.listData[i].title.toLowerCase().contains(v.toLowerCase())) {
tempListData.add(widget.listData[i]);
}
}
} else {
addAllData();
}
setState(() {});
},
decoration: InputDecoration(
hintStyle: TextStyle(fontSize: 17),
hintText: 'Search Insurance',
suffixIcon: Icon(Icons.search),
border: InputBorder.none,
contentPadding: EdgeInsets.all(12),
),
), ),
) : Container(), SizedBox(height: 21),
SizedBox(height: widget.isScrollable ? 12 : 0), Text(
SizedBox( TranslationBase.of(context).pleaseSelectFromBelowOptions,
height: widget.isScrollable ? MediaQuery.of(context).size.height * .4 : null, style: TextStyle(fontSize: 14, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.56),
child: ListView.separated( ),
physics: widget.isScrollable ? BouncingScrollPhysics() : NeverScrollableScrollPhysics(), widget.isShowSearch
shrinkWrap: !widget.isScrollable, ? Padding(
padding: EdgeInsets.only(bottom: widget.isScrollable ? 21 : 42, top: 10), padding: const EdgeInsets.all(8.0),
itemBuilder: (context, index) { child: TextField(
return InkWell( controller: controller,
onTap: () { onChanged: (v) {
setState(() { if (v.length > 0) {
selectedIndex = tempListData[index].value; tempListData.clear();
}); for (int i = 0; i < widget.listData.length; i++) {
}, if (widget.listData[i].title.toLowerCase().contains(v.toLowerCase())) {
child: Row( tempListData.add(widget.listData[i]);
crossAxisAlignment: CrossAxisAlignment.start, }
children: [ }
SizedBox( } else {
width: 22, addAllData();
height: 22, }
child: Radio( setState(() {});
value: tempListData[index].value, },
groupValue: selectedIndex, decoration: InputDecoration(
onChanged: (value) { hintStyle: TextStyle(fontSize: 17),
setState(() { hintText: 'Search Insurance',
selectedIndex = value; suffixIcon: Icon(Icons.search),
}); border: InputBorder.none,
}, contentPadding: EdgeInsets.all(12),
),
),
)
: Container(),
SizedBox(height: widget.isScrollable ? 12 : 0),
SizedBox(
height: widget.isScrollable ? MediaQuery.of(context).size.height * .4 : null,
child: ListView.separated(
physics: widget.isScrollable ? BouncingScrollPhysics() : NeverScrollableScrollPhysics(),
// shrinkWrap: !widget.isScrollable,
shrinkWrap: !widget.isScrollable,
padding: EdgeInsets.only(bottom: widget.isScrollable ? 21 : 42, top: 10),
itemBuilder: (context, index) {
return InkWell(
onTap: () {
setState(() {
selectedIndex = tempListData[index].value;
});
},
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
SizedBox(
width: 22,
height: 22,
child: Radio(
value: tempListData[index].value,
groupValue: selectedIndex,
onChanged: (value) {
setState(() {
selectedIndex = value;
});
},
),
), ),
), SizedBox(width: 8),
SizedBox(width: 8), Expanded(
Expanded( child: Text(
child: Text( tempListData[index].title,
tempListData[index].title, // maxLines: 2,
// maxLines: 2, style: TextStyle(fontSize: 14, fontWeight: FontWeight.w600, color: Color(0xff575757), letterSpacing: -0.56),
style: TextStyle(fontSize: 14, fontWeight: FontWeight.w600, color: Color(0xff575757), letterSpacing: -0.56), ),
), ),
), ],
], ),
), );
);
},
separatorBuilder: (context, index) => SizedBox(height: 10),
itemCount: widget.listData.length),
),
SizedBox(height: widget.isScrollable ? 12 : 0),
Row(
mainAxisSize: MainAxisSize.min,
children: [
Expanded(
child: DefaultButton(
TranslationBase.of(context).save,
() {
Navigator.pop(context);
widget.onValueSelected(selectedIndex);
}, },
color: Color(0xff349745), separatorBuilder: (context, index) => SizedBox(height: 10),
itemCount: tempListData.length),
),
SizedBox(height: widget.isScrollable ? 12 : 0),
Row(
mainAxisSize: MainAxisSize.min,
children: [
Expanded(
child: DefaultButton(
TranslationBase.of(context).save,
() {
Navigator.pop(context);
widget.onValueSelected(selectedIndex);
},
color: Color(0xff349745),
),
), ),
), ],
], ),
), ],
], ),
), ),
), ),
); );

Loading…
Cancel
Save