Merge branch 'development_new_design_2.0' into zik_new_design_2.0
* development_new_design_2.0: LiveCare Schedule fixes improvements. live care design 3.0 dialog ui changes in wallet & improvements. LiveCare Schedule API fix live care design 2.0 Health converters UI done Health Calculators APIs updated Translation updates SessionID update live care design 1.0 Updates & fixes blood sugar dialog improvement. # Conflicts: Rseloved # lib/config/localized_values.dart # lib/core/service/client/base_app_client.dart # lib/uitl/translations_delegate_base.dartmerge-requests/467/head
commit
94a5cac27d
@ -0,0 +1,12 @@
|
||||
<svg id="calendar" xmlns="http://www.w3.org/2000/svg" width="16.407" height="16.407" viewBox="0 0 16.407 16.407">
|
||||
<g id="Group_8220" data-name="Group 8220">
|
||||
<g id="Group_8219" data-name="Group 8219">
|
||||
<path id="Path_4987" data-name="Path 4987" d="M14.767,1.641h-.82V.82a.82.82,0,1,0-1.641,0v.82H4.1V.82A.775.775,0,0,0,3.281,0a.775.775,0,0,0-.82.82v.82H.82a.822.822,0,0,0-.82.82V13.946a.822.822,0,0,0,.82.82h5A6.53,6.53,0,0,1,15.587,6.4V2.461A.882.882,0,0,0,14.767,1.641Z" fill="#2e303a"/>
|
||||
</g>
|
||||
</g>
|
||||
<g id="Group_8222" data-name="Group 8222" transform="translate(6.563 6.563)">
|
||||
<g id="Group_8221" data-name="Group 8221">
|
||||
<path id="Path_4988" data-name="Path 4988" d="M209.722,204.8a4.922,4.922,0,1,0,4.922,4.922A4.937,4.937,0,0,0,209.722,204.8Zm1.641,5.743h-1.641a.775.775,0,0,1-.82-.82v-2.461a.82.82,0,0,1,1.641,0V208.9h.82a.82.82,0,1,1,0,1.641Z" transform="translate(-204.8 -204.8)" fill="#2e303a"/>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 953 B |
Binary file not shown.
|
After Width: | Height: | Size: 59 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 56 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 59 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 56 KiB |
@ -1,139 +0,0 @@
|
||||
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/EReferral/search_criteria_model.dart';
|
||||
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
|
||||
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
|
||||
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
// ignore: must_be_immutable
|
||||
class SelectSearchCriteriaDialog extends StatefulWidget {
|
||||
List<SearchCriteriaModel> searchCriteria = [
|
||||
SearchCriteriaModel(name: "Identification Number",nameAr:"رقم الهوية",value: 1),
|
||||
SearchCriteriaModel(name: "Referral Number",nameAr:"رقم الإحالة",value: 2),
|
||||
];
|
||||
final Function(SearchCriteriaModel) onValueSelected;
|
||||
SearchCriteriaModel selectedCriteria;
|
||||
ProjectViewModel projectViewModel;
|
||||
|
||||
SelectSearchCriteriaDialog(
|
||||
{Key key, this.onValueSelected, this.selectedCriteria, this.projectViewModel});
|
||||
|
||||
@override
|
||||
_SelectSearchCriteriaDialogState createState() => _SelectSearchCriteriaDialogState();
|
||||
}
|
||||
|
||||
class _SelectSearchCriteriaDialogState extends State<SelectSearchCriteriaDialog> {
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
widget.selectedCriteria = widget.selectedCriteria ?? widget.searchCriteria[0];
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return SimpleDialog(
|
||||
children: [
|
||||
Column(
|
||||
children: [
|
||||
Text(TranslationBase.of(context).searchCriteria),
|
||||
Divider(),
|
||||
...List.generate(
|
||||
widget.searchCriteria.length,
|
||||
(index) => Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
SizedBox(
|
||||
height: 2,
|
||||
),
|
||||
Row(
|
||||
children: <Widget>[
|
||||
Expanded(
|
||||
flex: 1,
|
||||
child: InkWell(
|
||||
onTap: () {
|
||||
setState(() {
|
||||
widget.selectedCriteria = widget.searchCriteria[index];
|
||||
});
|
||||
},
|
||||
child: ListTile(
|
||||
title: Text(widget.projectViewModel.isArabic ? widget.searchCriteria[index].nameAr : widget.searchCriteria[index].name),
|
||||
leading: Radio(
|
||||
value: widget.searchCriteria[index],
|
||||
groupValue: widget.selectedCriteria,
|
||||
activeColor: Colors.red[800],
|
||||
onChanged: (value) {
|
||||
setState(() {
|
||||
widget.selectedCriteria = value;
|
||||
});
|
||||
},
|
||||
),
|
||||
),
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
SizedBox(
|
||||
height: 5.0,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
height: 5.0,
|
||||
),
|
||||
Row(
|
||||
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: <Widget>[
|
||||
Expanded(
|
||||
flex: 1,
|
||||
child: InkWell(
|
||||
onTap: () {
|
||||
Navigator.pop(context);
|
||||
},
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: Container(
|
||||
child: Center(
|
||||
child: Texts(
|
||||
TranslationBase.of(context).cancel.toUpperCase(),
|
||||
color: Colors.red,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
Container(
|
||||
width: 1,
|
||||
height: 30,
|
||||
color: Colors.grey[500],
|
||||
),
|
||||
Expanded(
|
||||
flex: 1,
|
||||
child: InkWell(
|
||||
onTap: () {
|
||||
widget.onValueSelected(widget.selectedCriteria);
|
||||
Navigator.pop(context);
|
||||
},
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: Center(
|
||||
child: Texts(
|
||||
TranslationBase.of(context).ok,
|
||||
fontWeight: FontWeight.w400,
|
||||
)),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
)
|
||||
],
|
||||
)
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@ -1,328 +0,0 @@
|
||||
import 'package:diplomaticquarterapp/pages/Blood/blood_donation.dart';
|
||||
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
|
||||
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
|
||||
class SelectBloodDialog extends StatefulWidget {
|
||||
|
||||
final Blood bloodType;
|
||||
final Function(Blood) onValueSelected;
|
||||
|
||||
SelectBloodDialog({Key key, this.bloodType, this.onValueSelected});
|
||||
|
||||
|
||||
|
||||
@override
|
||||
_SelectBloodDialogState createState() => _SelectBloodDialogState(this.bloodType);
|
||||
}
|
||||
|
||||
class _SelectBloodDialogState extends State<SelectBloodDialog> {
|
||||
_SelectBloodDialogState(this.bloodType);
|
||||
Blood bloodType;
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return SimpleDialog(
|
||||
children: [
|
||||
Container(
|
||||
child: Column(
|
||||
children: [
|
||||
Divider(),
|
||||
Row(
|
||||
children: <Widget>[
|
||||
Expanded(
|
||||
flex: 1,
|
||||
child: InkWell(
|
||||
onTap: () {
|
||||
setState(() {
|
||||
bloodType = Blood.Oplus;
|
||||
});
|
||||
},
|
||||
child: ListTile(
|
||||
title: Text("O+"),
|
||||
leading: Radio(
|
||||
value: Blood.Oplus,
|
||||
groupValue: bloodType,
|
||||
activeColor: Colors.red[800],
|
||||
onChanged: (Blood value) {
|
||||
setState(() {
|
||||
bloodType = value;
|
||||
});
|
||||
},
|
||||
),
|
||||
),
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
SizedBox(
|
||||
height: 5.0,
|
||||
),
|
||||
Row(
|
||||
children: <Widget>[
|
||||
Expanded(
|
||||
flex: 1,
|
||||
child: InkWell(
|
||||
onTap: () {
|
||||
setState(() {
|
||||
bloodType = Blood.Ominus;
|
||||
});
|
||||
},
|
||||
child: ListTile(
|
||||
title: Text("O-"),
|
||||
leading: Radio(
|
||||
value: Blood.Ominus,
|
||||
groupValue: bloodType,
|
||||
activeColor: Colors.red[800],
|
||||
onChanged: (Blood value) {
|
||||
setState(() {
|
||||
bloodType = value;
|
||||
});
|
||||
},
|
||||
),
|
||||
),
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
SizedBox(
|
||||
height: 5.0,
|
||||
),
|
||||
Row(
|
||||
children: <Widget>[
|
||||
Expanded(
|
||||
flex: 1,
|
||||
child: InkWell(
|
||||
onTap: () {
|
||||
setState(() {
|
||||
bloodType = Blood.ABminus;
|
||||
});
|
||||
},
|
||||
child: ListTile(
|
||||
title: Text("AB-"),
|
||||
leading: Radio(
|
||||
value: Blood.ABminus,
|
||||
groupValue: bloodType,
|
||||
activeColor: Colors.red[800],
|
||||
onChanged: (Blood value) {
|
||||
setState(() {
|
||||
bloodType = value;
|
||||
});
|
||||
},
|
||||
),
|
||||
),
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
SizedBox(
|
||||
height: 5.0,
|
||||
),
|
||||
Row(
|
||||
children: <Widget>[
|
||||
Expanded(
|
||||
flex: 1,
|
||||
child: InkWell(
|
||||
onTap: () {
|
||||
setState(() {
|
||||
bloodType = Blood.ABplus;
|
||||
});
|
||||
},
|
||||
child: ListTile(
|
||||
title: Text("AB+"),
|
||||
leading: Radio(
|
||||
value: Blood.ABplus,
|
||||
groupValue: bloodType,
|
||||
activeColor: Colors.red[800],
|
||||
onChanged: (Blood value) {
|
||||
setState(() {
|
||||
bloodType = value;
|
||||
});
|
||||
},
|
||||
),
|
||||
),
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
SizedBox(
|
||||
height: 5.0,
|
||||
),
|
||||
Row(
|
||||
children: <Widget>[
|
||||
Expanded(
|
||||
flex: 1,
|
||||
child: InkWell(
|
||||
onTap: () {
|
||||
setState(() {
|
||||
bloodType = Blood.Aplus;
|
||||
});
|
||||
},
|
||||
child: ListTile(
|
||||
title: Text("A+"),
|
||||
leading: Radio(
|
||||
value: Blood.Aplus,
|
||||
groupValue: bloodType,
|
||||
activeColor: Colors.red[800],
|
||||
onChanged: (Blood value) {
|
||||
setState(() {
|
||||
bloodType = value;
|
||||
});
|
||||
},
|
||||
),
|
||||
),
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
SizedBox(
|
||||
height: 5.0,
|
||||
),
|
||||
Row(
|
||||
children: <Widget>[
|
||||
Expanded(
|
||||
flex: 1,
|
||||
child: InkWell(
|
||||
onTap: () {
|
||||
setState(() {
|
||||
bloodType = Blood.Aminus;
|
||||
});
|
||||
},
|
||||
child: ListTile(
|
||||
title: Text("A-"),
|
||||
leading: Radio(
|
||||
value: Blood.Aminus,
|
||||
groupValue: bloodType,
|
||||
activeColor: Colors.red[800],
|
||||
onChanged: (Blood value) {
|
||||
setState(() {
|
||||
bloodType = value;
|
||||
});
|
||||
},
|
||||
),
|
||||
),
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
SizedBox(
|
||||
height: 5.0,
|
||||
),
|
||||
Row(
|
||||
children: <Widget>[
|
||||
Expanded(
|
||||
flex: 1,
|
||||
child: InkWell(
|
||||
onTap: () {
|
||||
setState(() {
|
||||
bloodType = Blood.Bplus;
|
||||
});
|
||||
},
|
||||
child: ListTile(
|
||||
title: Text("B+"),
|
||||
leading: Radio(
|
||||
value: Blood.Bplus,
|
||||
groupValue: bloodType,
|
||||
activeColor: Colors.red[800],
|
||||
onChanged: (Blood value) {
|
||||
setState(() {
|
||||
bloodType = value;
|
||||
});
|
||||
},
|
||||
),
|
||||
),
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
SizedBox(
|
||||
height: 5.0,
|
||||
),
|
||||
Row(
|
||||
children: <Widget>[
|
||||
Expanded(
|
||||
flex: 1,
|
||||
child: InkWell(
|
||||
onTap: () {
|
||||
setState(() {
|
||||
bloodType = Blood.Bminus;
|
||||
});
|
||||
},
|
||||
child: ListTile(
|
||||
title: Text("B-"),
|
||||
leading: Radio(
|
||||
value: Blood.Bminus,
|
||||
groupValue: bloodType,
|
||||
activeColor: Colors.red[800],
|
||||
onChanged: (Blood value) {
|
||||
setState(() {
|
||||
bloodType = value;
|
||||
});
|
||||
},
|
||||
),
|
||||
),
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
SizedBox(
|
||||
height: 5.0,
|
||||
),
|
||||
SizedBox(
|
||||
height: 5.0,
|
||||
),
|
||||
Row(
|
||||
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: <Widget>[
|
||||
Expanded(
|
||||
flex: 1,
|
||||
child: InkWell(
|
||||
onTap: () {
|
||||
Navigator.pop(context);
|
||||
},
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: Container(
|
||||
child: Center(
|
||||
child: Texts(
|
||||
TranslationBase.of(context).cancel.toUpperCase(),
|
||||
color: Colors.red,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
Container(
|
||||
width: 1,
|
||||
height: 30,
|
||||
color: Colors.grey[500],
|
||||
),
|
||||
Expanded(
|
||||
flex: 1,
|
||||
child: InkWell(
|
||||
onTap: () {
|
||||
widget.onValueSelected(bloodType);
|
||||
Navigator.pop(context);
|
||||
},
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: Center(
|
||||
child: Texts(
|
||||
TranslationBase.of(context).ok,
|
||||
fontWeight: FontWeight.w400,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
)
|
||||
],
|
||||
),
|
||||
)
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,118 @@
|
||||
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
|
||||
import 'package:diplomaticquarterapp/models/LiveCare/ClinicsServiceTimingsResponse.dart';
|
||||
import 'package:diplomaticquarterapp/models/LiveCare/ERAppointmentFeesResponse.dart';
|
||||
import 'package:diplomaticquarterapp/theme/colors.dart';
|
||||
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
|
||||
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
|
||||
import 'package:diplomaticquarterapp/uitl/utils_new.dart';
|
||||
import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart';
|
||||
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_svg/flutter_svg.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
|
||||
class ClinicTimingsPage extends StatefulWidget {
|
||||
final clinicName;
|
||||
final List<PatientERGetClinicsServiceTimingsList> patientERGetClinicsServiceTimingsList;
|
||||
|
||||
ClinicTimingsPage({@required this.clinicName, @required this.patientERGetClinicsServiceTimingsList});
|
||||
|
||||
@override
|
||||
_LiveCarePatmentPageState createState() => _LiveCarePatmentPageState();
|
||||
}
|
||||
|
||||
class _LiveCarePatmentPageState extends State<ClinicTimingsPage> {
|
||||
ProjectViewModel projectViewModel;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
projectViewModel = Provider.of(context);
|
||||
return AppScaffold(
|
||||
appBarTitle: TranslationBase.of(context).clinicSchedule,
|
||||
isShowAppBar: true,
|
||||
showNewAppBarTitle: true,
|
||||
showNewAppBar: true,
|
||||
description: TranslationBase.of(context).erConsultation,
|
||||
body: Container(
|
||||
width: double.infinity,
|
||||
height: double.infinity,
|
||||
child: Column(
|
||||
children: [
|
||||
Expanded(
|
||||
child: ListView.separated(
|
||||
itemBuilder: (context, index) {
|
||||
return Padding(
|
||||
padding: EdgeInsets.only(top: index == 0 ? 12 : 0, bottom: (index == widget.patientERGetClinicsServiceTimingsList.length - 1) ? 12 : 0),
|
||||
child: showItem(widget.patientERGetClinicsServiceTimingsList[index]),
|
||||
);
|
||||
},
|
||||
separatorBuilder: (context, index) {
|
||||
return mHeight(12);
|
||||
},
|
||||
itemCount: widget.patientERGetClinicsServiceTimingsList.length,
|
||||
),
|
||||
),
|
||||
Container(
|
||||
width: double.infinity,
|
||||
padding: EdgeInsets.all(12),
|
||||
color: Colors.white,
|
||||
child: DefaultButton(
|
||||
TranslationBase.of(context).back,
|
||||
() {
|
||||
Navigator.pop(context);
|
||||
},
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Widget showItem(PatientERGetClinicsServiceTimingsList item) {
|
||||
return Container(
|
||||
width: double.infinity,
|
||||
padding: EdgeInsets.only(left: 12, right: 12),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
Expanded(
|
||||
flex: 1,
|
||||
child: Text(
|
||||
item.dayOfWeekStr,
|
||||
style: TextStyle(
|
||||
fontSize: 13,
|
||||
letterSpacing: -0.42,
|
||||
fontWeight: FontWeight.w600,
|
||||
),
|
||||
),
|
||||
),
|
||||
Expanded(
|
||||
flex: 3,
|
||||
child: Container(
|
||||
width: double.infinity,
|
||||
decoration: cardRadius(12),
|
||||
padding: EdgeInsets.all(12),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
for (int i = 0; i < item.shiftTimings.length; i++)
|
||||
Text(
|
||||
TranslationBase.of(context).from + " " + item.shiftTimings[i].startTime + " " + TranslationBase.of(context).to + " " + item.shiftTimings[i].endTime,
|
||||
style: TextStyle(
|
||||
fontSize: 13,
|
||||
letterSpacing: -0.42,
|
||||
fontWeight: FontWeight.w600,
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,316 @@
|
||||
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
|
||||
import 'package:diplomaticquarterapp/models/LiveCare/ERAppointmentFeesResponse.dart';
|
||||
import 'package:diplomaticquarterapp/theme/colors.dart';
|
||||
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
|
||||
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
|
||||
import 'package:diplomaticquarterapp/uitl/utils_new.dart';
|
||||
import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart';
|
||||
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_svg/flutter_svg.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
|
||||
class LiveCarePatmentPage extends StatefulWidget {
|
||||
GetERAppointmentFeesList getERAppointmentFeesList;
|
||||
int waitingTime;
|
||||
String clinicName;
|
||||
|
||||
LiveCarePatmentPage({@required this.getERAppointmentFeesList, @required this.waitingTime, @required this.clinicName});
|
||||
|
||||
@override
|
||||
_LiveCarePatmentPageState createState() => _LiveCarePatmentPageState();
|
||||
}
|
||||
|
||||
class _LiveCarePatmentPageState extends State<LiveCarePatmentPage> {
|
||||
int _selected = 0;
|
||||
|
||||
ProjectViewModel projectViewModel;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
var size = MediaQuery.of(context).size;
|
||||
final double itemHeight = ((size.height - kToolbarHeight - 24) * 0.42) / 2;
|
||||
final double itemWidth = size.width / 2;
|
||||
projectViewModel = Provider.of(context);
|
||||
return AppScaffold(
|
||||
appBarTitle: TranslationBase.of(context).livecare,
|
||||
isShowAppBar: true,
|
||||
showNewAppBarTitle: true,
|
||||
showNewAppBar: true,
|
||||
description: TranslationBase.of(context).erConsultation,
|
||||
body: Container(
|
||||
width: double.infinity,
|
||||
|
||||
height: double.infinity,
|
||||
child: Column(
|
||||
children: [
|
||||
Expanded(
|
||||
child: Padding(
|
||||
padding: EdgeInsets.all(21),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: <Widget>[
|
||||
Text(
|
||||
widget.clinicName,
|
||||
style: TextStyle(
|
||||
fontSize: 19.0,
|
||||
fontWeight: FontWeight.bold,
|
||||
letterSpacing: -1.44,
|
||||
),
|
||||
),
|
||||
mHeight(8),
|
||||
Text(
|
||||
TranslationBase.of(context).expectedWaiting,
|
||||
textAlign: TextAlign.end,
|
||||
style: TextStyle(
|
||||
fontSize: 14.0,
|
||||
fontWeight: FontWeight.w600,
|
||||
letterSpacing: -0.56,
|
||||
color: CustomColors.textColor,
|
||||
),
|
||||
),
|
||||
Text(
|
||||
widget.waitingTime.toString() + " " + TranslationBase.of(context).minute,
|
||||
textAlign: TextAlign.start,
|
||||
style: TextStyle(
|
||||
fontSize: 16.0,
|
||||
fontWeight: FontWeight.bold,
|
||||
color: CustomColors.accentColor,
|
||||
letterSpacing: -0.66,
|
||||
),
|
||||
),
|
||||
mHeight(16),
|
||||
Container(
|
||||
decoration: cardRadius(12),
|
||||
padding: EdgeInsets.all(12),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
TranslationBase.of(context).erConsultFee,
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
fontSize: 16.0,
|
||||
fontWeight: FontWeight.w600,
|
||||
letterSpacing: -0.64,
|
||||
),
|
||||
),
|
||||
mHeight(10),
|
||||
Row(
|
||||
children: [
|
||||
Expanded(
|
||||
child: Text(
|
||||
TranslationBase.of(context).patientShareToDo,
|
||||
style: TextStyle(
|
||||
fontSize: 10,
|
||||
letterSpacing: -0.4,
|
||||
color: CustomColors.textColor,
|
||||
fontWeight: FontWeight.w600,
|
||||
),
|
||||
),
|
||||
),
|
||||
Expanded(
|
||||
child: Text(
|
||||
widget.getERAppointmentFeesList.amount + " " + widget.getERAppointmentFeesList.currency,
|
||||
style: TextStyle(
|
||||
fontSize: 12,
|
||||
letterSpacing: -0.48,
|
||||
fontWeight: FontWeight.w600,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
mHeight(4),
|
||||
mDivider(CustomColors.lightGreyColor),
|
||||
mHeight(4),
|
||||
Row(
|
||||
children: [
|
||||
Expanded(
|
||||
child: Text(
|
||||
TranslationBase.of(context).patientTaxToDo,
|
||||
style: TextStyle(
|
||||
fontSize: 10,
|
||||
letterSpacing: -0.4,
|
||||
color: CustomColors.textColor,
|
||||
fontWeight: FontWeight.w600,
|
||||
),
|
||||
),
|
||||
),
|
||||
Expanded(
|
||||
child: Text(
|
||||
widget.getERAppointmentFeesList.tax + " " + widget.getERAppointmentFeesList.currency,
|
||||
style: TextStyle(
|
||||
fontSize: 12,
|
||||
letterSpacing: -0.48,
|
||||
fontWeight: FontWeight.w600,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
mHeight(4),
|
||||
mDivider(CustomColors.lightGreyColor),
|
||||
mHeight(4),
|
||||
Row(
|
||||
children: [
|
||||
Expanded(
|
||||
child: Text(
|
||||
TranslationBase.of(context).patientShareTotalToDo,
|
||||
style: TextStyle(
|
||||
fontSize: 10,
|
||||
letterSpacing: -0.4,
|
||||
color: CustomColors.textColor,
|
||||
fontWeight: FontWeight.w600,
|
||||
),
|
||||
),
|
||||
),
|
||||
Expanded(
|
||||
child: Text(
|
||||
widget.getERAppointmentFeesList.total + " " + widget.getERAppointmentFeesList.currency,
|
||||
style: TextStyle(
|
||||
fontSize: 12,
|
||||
letterSpacing: -0.48,
|
||||
fontWeight: FontWeight.w600,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
mHeight(12),
|
||||
Container(
|
||||
padding: EdgeInsets.all(12),
|
||||
decoration: cardRadius(12),
|
||||
child: Row(
|
||||
children: <Widget>[
|
||||
SvgPicture.asset(
|
||||
"assets/images/new/services/raise_comp.svg",
|
||||
color: CustomColors.green,
|
||||
width: 18,
|
||||
height: 18,
|
||||
),
|
||||
mWidth(10),
|
||||
Expanded(
|
||||
child: Text(
|
||||
TranslationBase.of(context).insuredPatient,
|
||||
style: TextStyle(
|
||||
fontSize: 10.0,
|
||||
letterSpacing: -0.4,
|
||||
fontWeight: FontWeight.w600,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
Container(
|
||||
margin: EdgeInsets.only(top: 10.0),
|
||||
child: Row(
|
||||
children: <Widget>[
|
||||
Radio(
|
||||
value: 1,
|
||||
groupValue: _selected,
|
||||
onChanged: onRadioChanged,
|
||||
),
|
||||
Text(
|
||||
TranslationBase.of(context).agreeTo,
|
||||
style: new TextStyle(
|
||||
fontSize: 12.0,
|
||||
fontWeight: FontWeight.w600,
|
||||
letterSpacing: -0.48,
|
||||
color: CustomColors.textColor,
|
||||
),
|
||||
),
|
||||
mWidth(4),
|
||||
Text(
|
||||
TranslationBase.of(context).termsConditoins,
|
||||
style: new TextStyle(
|
||||
fontSize: 12.0,
|
||||
fontWeight: FontWeight.w600,
|
||||
letterSpacing: -0.48,
|
||||
color: CustomColors.accentColor,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
mFlex(1),
|
||||
Text(
|
||||
TranslationBase.of(context).upComingPayOption,
|
||||
style: new TextStyle(
|
||||
fontSize: 12.0,
|
||||
letterSpacing: -0.36,
|
||||
fontWeight: FontWeight.w600,
|
||||
),
|
||||
),
|
||||
Container(
|
||||
margin: EdgeInsets.fromLTRB(10.0, 5.0, 10.0, 5.0),
|
||||
child: getPaymentMethods(),
|
||||
),
|
||||
|
||||
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
Container(
|
||||
padding: EdgeInsets.all(12),
|
||||
color: Colors.white,
|
||||
child: Flex(
|
||||
direction: Axis.horizontal,
|
||||
children: <Widget>[
|
||||
Expanded(
|
||||
child: DefaultButton(
|
||||
TranslationBase.of(context).cancel,
|
||||
() {
|
||||
Navigator.pop(context, false);
|
||||
},
|
||||
),
|
||||
),
|
||||
mWidth(12),
|
||||
Expanded(
|
||||
child: DefaultButton(
|
||||
TranslationBase.of(context).next,
|
||||
() {
|
||||
if (_selected == 0) {
|
||||
AppToast.showErrorToast(message: TranslationBase.of(context).pleaseAcceptTerms);
|
||||
} else {
|
||||
Navigator.pop(context, true);
|
||||
}
|
||||
},
|
||||
color: CustomColors.green,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
void onRadioChanged(int value) {
|
||||
setState(() {
|
||||
_selected = value;
|
||||
});
|
||||
}
|
||||
|
||||
_getNormalText(text) {
|
||||
return Container(
|
||||
margin: EdgeInsets.only(top: 10.0, right: 10.0),
|
||||
child: Text(text, textAlign: TextAlign.start, style: TextStyle(fontSize: 14, letterSpacing: 0.5, color: Colors.black)),
|
||||
);
|
||||
}
|
||||
|
||||
_getMarginText(text) {
|
||||
return Container(
|
||||
margin: EdgeInsets.only(top: 10.0, right: 10.0, bottom: 10.0),
|
||||
child: Text(text, textAlign: TextAlign.start, style: TextStyle(fontSize: 14, letterSpacing: 0.5, fontWeight: FontWeight.bold, color: Colors.black)),
|
||||
);
|
||||
}
|
||||
}
|
||||
@ -1,204 +0,0 @@
|
||||
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import '../../../../Constants.dart';
|
||||
import '../advance_payment_page.dart';
|
||||
|
||||
class SelectBeneficiaryDialog extends StatefulWidget {
|
||||
final BeneficiaryType beneficiaryType;
|
||||
final Function(BeneficiaryType) onValueSelected;
|
||||
|
||||
SelectBeneficiaryDialog({Key key, this.beneficiaryType, this.onValueSelected});
|
||||
|
||||
@override
|
||||
_SelectBeneficiaryDialogState createState() => _SelectBeneficiaryDialogState(this.beneficiaryType);
|
||||
}
|
||||
|
||||
class _SelectBeneficiaryDialogState extends State<SelectBeneficiaryDialog> {
|
||||
_SelectBeneficiaryDialogState(this.beneficiaryType);
|
||||
|
||||
BeneficiaryType beneficiaryType;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return SimpleDialog(
|
||||
children: [
|
||||
Container(
|
||||
child: Column(
|
||||
children: [
|
||||
Divider(),
|
||||
Row(
|
||||
children: <Widget>[
|
||||
Expanded(
|
||||
flex: 1,
|
||||
child: InkWell(
|
||||
onTap: () {
|
||||
setState(() {
|
||||
beneficiaryType = BeneficiaryType.MyAccount;
|
||||
});
|
||||
},
|
||||
child: ListTile(
|
||||
title: Text(
|
||||
TranslationBase.of(context).myAccount,
|
||||
style: TextStyle(
|
||||
fontSize: 14,
|
||||
fontWeight: FontWeight.w600,
|
||||
letterSpacing: -0.46,
|
||||
),
|
||||
),
|
||||
leading: Radio(
|
||||
value: BeneficiaryType.MyAccount,
|
||||
groupValue: beneficiaryType,
|
||||
activeColor: secondaryColor,
|
||||
onChanged: (BeneficiaryType value) {
|
||||
setState(() {
|
||||
beneficiaryType = value;
|
||||
});
|
||||
},
|
||||
),
|
||||
),
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
SizedBox(
|
||||
height: 5.0,
|
||||
),
|
||||
Row(
|
||||
children: <Widget>[
|
||||
Expanded(
|
||||
flex: 1,
|
||||
child: InkWell(
|
||||
onTap: () {
|
||||
setState(() {
|
||||
beneficiaryType = BeneficiaryType.MyFamilyFiles;
|
||||
});
|
||||
},
|
||||
child: ListTile(
|
||||
title: Text(
|
||||
TranslationBase.of(context).myFamilyFiles,
|
||||
style: TextStyle(
|
||||
fontSize: 14,
|
||||
fontWeight: FontWeight.w600,
|
||||
letterSpacing: -0.46,
|
||||
),
|
||||
),
|
||||
leading: Radio(
|
||||
value: BeneficiaryType.MyFamilyFiles,
|
||||
groupValue: beneficiaryType,
|
||||
activeColor: Color(0xffC5272D),
|
||||
onChanged: (BeneficiaryType value) {
|
||||
setState(() {
|
||||
beneficiaryType = value;
|
||||
});
|
||||
},
|
||||
),
|
||||
),
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
SizedBox(
|
||||
height: 5.0,
|
||||
),
|
||||
Row(
|
||||
children: <Widget>[
|
||||
Expanded(
|
||||
flex: 1,
|
||||
child: InkWell(
|
||||
onTap: () {
|
||||
setState(() {
|
||||
beneficiaryType = BeneficiaryType.OtherAccount;
|
||||
});
|
||||
},
|
||||
child: ListTile(
|
||||
title: Text(
|
||||
TranslationBase.of(context).otherAccount,
|
||||
style: TextStyle(
|
||||
fontSize: 14,
|
||||
fontWeight: FontWeight.w600,
|
||||
letterSpacing: -0.46,
|
||||
),
|
||||
),
|
||||
leading: Radio(
|
||||
value: BeneficiaryType.OtherAccount,
|
||||
groupValue: beneficiaryType,
|
||||
activeColor: Color(0xffC5272D),
|
||||
onChanged: (BeneficiaryType value) {
|
||||
setState(() {
|
||||
beneficiaryType = value;
|
||||
});
|
||||
},
|
||||
),
|
||||
),
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
SizedBox(
|
||||
height: 5.0,
|
||||
),
|
||||
Row(
|
||||
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: <Widget>[
|
||||
Expanded(
|
||||
flex: 1,
|
||||
child: InkWell(
|
||||
onTap: () {
|
||||
Navigator.pop(context);
|
||||
},
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: Container(
|
||||
child: Center(
|
||||
child: Text(
|
||||
TranslationBase.of(context).cancel.toUpperCase(),
|
||||
style: TextStyle(
|
||||
fontSize: 14,
|
||||
fontWeight: FontWeight.w600,
|
||||
letterSpacing: -0.46,
|
||||
color: Color(0xffC5272D),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
Container(
|
||||
width: 1,
|
||||
height: 30,
|
||||
color: Colors.grey[500],
|
||||
),
|
||||
Expanded(
|
||||
flex: 1,
|
||||
child: InkWell(
|
||||
onTap: () {
|
||||
widget.onValueSelected(beneficiaryType);
|
||||
Navigator.pop(context);
|
||||
},
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: Center(
|
||||
child: Text(
|
||||
TranslationBase.of(context).ok.toUpperCase(),
|
||||
style: TextStyle(
|
||||
fontSize: 14,
|
||||
fontWeight: FontWeight.w600,
|
||||
letterSpacing: -0.46,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
)
|
||||
],
|
||||
),
|
||||
)
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
||||
@ -1,145 +0,0 @@
|
||||
import 'package:diplomaticquarterapp/core/model/hospitals/hospitals_model.dart';
|
||||
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import '../../../../Constants.dart';
|
||||
|
||||
class SelectHospitalDialog extends StatefulWidget {
|
||||
final List<HospitalsModel> hospitals;
|
||||
final Function(HospitalsModel) onValueSelected;
|
||||
HospitalsModel selectedHospital;
|
||||
|
||||
SelectHospitalDialog({Key key, this.hospitals, this.onValueSelected, this.selectedHospital});
|
||||
|
||||
@override
|
||||
_SelectHospitalDialogState createState() => _SelectHospitalDialogState();
|
||||
}
|
||||
|
||||
class _SelectHospitalDialogState extends State<SelectHospitalDialog> {
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
widget.selectedHospital = widget.selectedHospital ?? widget.hospitals[0];
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return SimpleDialog(
|
||||
children: [
|
||||
Column(
|
||||
children: [
|
||||
Divider(),
|
||||
...List.generate(
|
||||
widget.hospitals.length,
|
||||
(index) => Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
SizedBox(
|
||||
height: 2,
|
||||
),
|
||||
Row(
|
||||
children: <Widget>[
|
||||
Expanded(
|
||||
flex: 1,
|
||||
child: InkWell(
|
||||
onTap: () {
|
||||
setState(() {
|
||||
widget.selectedHospital = widget.hospitals[index];
|
||||
});
|
||||
},
|
||||
child: ListTile(
|
||||
title: Text(
|
||||
widget.hospitals[index].name + ' ${widget.hospitals[index].distanceInKilometers} ' + TranslationBase.of(context).km,
|
||||
style: TextStyle(
|
||||
fontSize: 14,
|
||||
fontWeight: FontWeight.w600,
|
||||
letterSpacing: -0.46,
|
||||
),
|
||||
),
|
||||
leading: Radio(
|
||||
value: widget.hospitals[index],
|
||||
groupValue: widget.selectedHospital,
|
||||
activeColor: secondaryColor,
|
||||
onChanged: (value) {
|
||||
setState(() {
|
||||
widget.selectedHospital = value;
|
||||
});
|
||||
},
|
||||
),
|
||||
),
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
SizedBox(
|
||||
height: 5.0,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
height: 5.0,
|
||||
),
|
||||
Row(
|
||||
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: <Widget>[
|
||||
Expanded(
|
||||
flex: 1,
|
||||
child: InkWell(
|
||||
onTap: () {
|
||||
Navigator.pop(context);
|
||||
},
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: Container(
|
||||
child: Center(
|
||||
child: Text(
|
||||
TranslationBase.of(context).cancel.toUpperCase(),
|
||||
style: TextStyle(
|
||||
fontSize: 14,
|
||||
fontWeight: FontWeight.w600,
|
||||
letterSpacing: -0.46,
|
||||
color: Colors.red
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
Container(
|
||||
width: 1,
|
||||
height: 30,
|
||||
color: Colors.grey[500],
|
||||
),
|
||||
Expanded(
|
||||
flex: 1,
|
||||
child: InkWell(
|
||||
onTap: () {
|
||||
widget.onValueSelected(widget.selectedHospital);
|
||||
Navigator.pop(context);
|
||||
},
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: Center(
|
||||
child: Text(
|
||||
TranslationBase.of(context).ok,
|
||||
style: TextStyle(
|
||||
fontSize: 14,
|
||||
fontWeight: FontWeight.w600,
|
||||
letterSpacing: -0.46,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
)
|
||||
],
|
||||
)
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
||||
@ -1,152 +0,0 @@
|
||||
import 'package:diplomaticquarterapp/models/FamilyFiles/GetAllSharedRecordByStatusResponse.dart';
|
||||
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import '../../../../Constants.dart';
|
||||
|
||||
class SelectPatientFamilyDialog extends StatefulWidget {
|
||||
final List<GetAllSharedRecordsByStatusList> getAllSharedRecordsByStatusList;
|
||||
final Function(GetAllSharedRecordsByStatusList) onValueSelected;
|
||||
GetAllSharedRecordsByStatusList selectedPatientFamily;
|
||||
|
||||
List<GetAllSharedRecordsByStatusList> getAllSharedRecordsByStatusApprovedList = new List();
|
||||
|
||||
SelectPatientFamilyDialog({Key key, this.getAllSharedRecordsByStatusList, this.onValueSelected, this.selectedPatientFamily});
|
||||
|
||||
@override
|
||||
_SelectPatientFamilyDialogState createState() => _SelectPatientFamilyDialogState();
|
||||
}
|
||||
|
||||
class _SelectPatientFamilyDialogState extends State<SelectPatientFamilyDialog> {
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
widget.selectedPatientFamily = widget.selectedPatientFamily ?? widget.getAllSharedRecordsByStatusList[0];
|
||||
|
||||
if (widget.getAllSharedRecordsByStatusList.isNotEmpty)
|
||||
widget.getAllSharedRecordsByStatusList.forEach((element) {
|
||||
if (element.status == 3) widget.getAllSharedRecordsByStatusApprovedList.add(element);
|
||||
});
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return SimpleDialog(
|
||||
children: [
|
||||
Column(
|
||||
children: [
|
||||
Divider(),
|
||||
...List.generate(
|
||||
widget.getAllSharedRecordsByStatusApprovedList.length,
|
||||
(index) => Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
SizedBox(
|
||||
height: 2,
|
||||
),
|
||||
Row(
|
||||
children: <Widget>[
|
||||
Expanded(
|
||||
flex: 1,
|
||||
child: InkWell(
|
||||
onTap: () {
|
||||
setState(() {
|
||||
widget.selectedPatientFamily = widget.getAllSharedRecordsByStatusApprovedList[index];
|
||||
});
|
||||
},
|
||||
child: ListTile(
|
||||
title: Text(
|
||||
widget.getAllSharedRecordsByStatusApprovedList[index].patientName,
|
||||
style: TextStyle(
|
||||
fontSize: 14,
|
||||
fontWeight: FontWeight.w600,
|
||||
letterSpacing: -0.46,
|
||||
),
|
||||
),
|
||||
leading: Radio(
|
||||
value: widget.getAllSharedRecordsByStatusApprovedList[index],
|
||||
groupValue: widget.selectedPatientFamily,
|
||||
activeColor: secondaryColor,
|
||||
onChanged: (value) {
|
||||
setState(() {
|
||||
widget.selectedPatientFamily = value;
|
||||
});
|
||||
},
|
||||
),
|
||||
),
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
SizedBox(
|
||||
height: 5.0,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
height: 5.0,
|
||||
),
|
||||
Row(
|
||||
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: <Widget>[
|
||||
Expanded(
|
||||
flex: 1,
|
||||
child: InkWell(
|
||||
onTap: () {
|
||||
Navigator.pop(context);
|
||||
},
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: Container(
|
||||
child: Center(
|
||||
child: Text(
|
||||
TranslationBase.of(context).cancel.toUpperCase(),
|
||||
style: TextStyle(
|
||||
fontSize: 14,
|
||||
fontWeight: FontWeight.w600,
|
||||
letterSpacing: -0.46,
|
||||
color: Colors.red,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
Container(
|
||||
width: 1,
|
||||
height: 30,
|
||||
color: Colors.grey[500],
|
||||
),
|
||||
Expanded(
|
||||
flex: 1,
|
||||
child: InkWell(
|
||||
onTap: () {
|
||||
widget.onValueSelected(widget.selectedPatientFamily);
|
||||
Navigator.pop(context);
|
||||
},
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: Center(
|
||||
child: Text(
|
||||
TranslationBase.of(context).ok,
|
||||
style: TextStyle(
|
||||
fontSize: 14,
|
||||
fontWeight: FontWeight.w600,
|
||||
letterSpacing: -0.46,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
)
|
||||
],
|
||||
)
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
||||
@ -1,146 +0,0 @@
|
||||
import 'package:diplomaticquarterapp/core/model/my_balance/patient_info.dart';
|
||||
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import '../../../../Constants.dart';
|
||||
|
||||
class SelectPatientInfoDialog extends StatefulWidget {
|
||||
final List<PatientInfo> patientInfoList;
|
||||
|
||||
final Function(PatientInfo) onValueSelected;
|
||||
PatientInfo selectedPatientInfo;
|
||||
|
||||
SelectPatientInfoDialog({Key key, this.patientInfoList, this.onValueSelected, this.selectedPatientInfo});
|
||||
|
||||
@override
|
||||
_SelectPatientInfoDialogState createState() => _SelectPatientInfoDialogState();
|
||||
}
|
||||
|
||||
class _SelectPatientInfoDialogState extends State<SelectPatientInfoDialog> {
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
widget.selectedPatientInfo = widget.selectedPatientInfo ?? widget.patientInfoList[0];
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return SimpleDialog(
|
||||
children: [
|
||||
Column(
|
||||
children: [
|
||||
Divider(),
|
||||
...List.generate(
|
||||
widget.patientInfoList.length,
|
||||
(index) => Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
SizedBox(
|
||||
height: 2,
|
||||
),
|
||||
Row(
|
||||
children: <Widget>[
|
||||
Expanded(
|
||||
flex: 1,
|
||||
child: InkWell(
|
||||
onTap: () {
|
||||
setState(() {
|
||||
widget.selectedPatientInfo = widget.patientInfoList[index];
|
||||
});
|
||||
},
|
||||
child: ListTile(
|
||||
title: Text(
|
||||
widget.patientInfoList[index].fullName,
|
||||
style: TextStyle(
|
||||
fontSize: 14,
|
||||
fontWeight: FontWeight.w600,
|
||||
letterSpacing: -0.46,
|
||||
),
|
||||
),
|
||||
leading: Radio(
|
||||
value: widget.patientInfoList[index],
|
||||
groupValue: widget.selectedPatientInfo,
|
||||
activeColor: secondaryColor,
|
||||
onChanged: (value) {
|
||||
setState(() {
|
||||
widget.selectedPatientInfo = value;
|
||||
});
|
||||
},
|
||||
),
|
||||
),
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
SizedBox(
|
||||
height: 5.0,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
height: 5.0,
|
||||
),
|
||||
Row(
|
||||
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: <Widget>[
|
||||
Expanded(
|
||||
flex: 1,
|
||||
child: InkWell(
|
||||
onTap: () {
|
||||
Navigator.pop(context);
|
||||
},
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: Container(
|
||||
child: Center(
|
||||
child: Text(
|
||||
TranslationBase.of(context).cancel.toUpperCase(),
|
||||
style: TextStyle(
|
||||
fontSize: 14,
|
||||
fontWeight: FontWeight.w600,
|
||||
letterSpacing: -0.46,
|
||||
color: Colors.red,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
Container(
|
||||
width: 1,
|
||||
height: 30,
|
||||
color: Colors.grey[500],
|
||||
),
|
||||
Expanded(
|
||||
flex: 1,
|
||||
child: InkWell(
|
||||
onTap: () {
|
||||
widget.onValueSelected(widget.selectedPatientInfo);
|
||||
Navigator.pop(context);
|
||||
},
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: Center(
|
||||
child: Text(
|
||||
TranslationBase.of(context).ok.toUpperCase(),
|
||||
style: TextStyle(
|
||||
fontSize: 14,
|
||||
fontWeight: FontWeight.w600,
|
||||
letterSpacing: -0.46,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
)
|
||||
],
|
||||
)
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@ -1,139 +0,0 @@
|
||||
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
|
||||
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class RadioStringDialog extends StatefulWidget {
|
||||
final List<String> radioList;
|
||||
final Function(String) onValueSelected;
|
||||
final String title;
|
||||
String selectedValue;
|
||||
|
||||
RadioStringDialog({Key key, this.radioList, this.onValueSelected, this.selectedValue, this.title});
|
||||
|
||||
@override
|
||||
_RadioStringDialogState createState() => _RadioStringDialogState();
|
||||
}
|
||||
|
||||
class _RadioStringDialogState extends State<RadioStringDialog> {
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
widget.selectedValue = widget.selectedValue ?? widget.radioList[0];
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return SimpleDialog(
|
||||
title: Container(
|
||||
width: double.infinity,
|
||||
child: Center(
|
||||
child: Texts(
|
||||
widget.title,
|
||||
textAlign: TextAlign.center,
|
||||
))),
|
||||
children: [
|
||||
Container(
|
||||
height: widget.radioList.length > 3 ? MediaQuery.of(context).size.height * 0.6 : null,
|
||||
child: SingleChildScrollView(
|
||||
child: Column(
|
||||
children: [
|
||||
Divider(),
|
||||
...List.generate(
|
||||
widget.radioList.length,
|
||||
(index) => Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
// SizedBox(
|
||||
// height: 2,
|
||||
// ),
|
||||
Row(
|
||||
children: <Widget>[
|
||||
Expanded(
|
||||
flex: 1,
|
||||
child: InkWell(
|
||||
onTap: () {
|
||||
setState(() {
|
||||
widget.selectedValue = widget.radioList[index];
|
||||
});
|
||||
},
|
||||
child: ListTile(
|
||||
title: Texts(
|
||||
widget.radioList[index],
|
||||
fontSize: 14,
|
||||
),
|
||||
leading: Radio(
|
||||
value: widget.radioList[index],
|
||||
groupValue: widget.selectedValue,
|
||||
activeColor: Colors.red[800],
|
||||
onChanged: (value) {
|
||||
setState(() {
|
||||
widget.selectedValue = value;
|
||||
});
|
||||
},
|
||||
),
|
||||
),
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
height: 5.0,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
Row(
|
||||
children: <Widget>[
|
||||
Expanded(
|
||||
flex: 1,
|
||||
child: InkWell(
|
||||
onTap: () {
|
||||
Navigator.pop(context);
|
||||
},
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: Container(
|
||||
child: Center(
|
||||
child: Texts(
|
||||
TranslationBase.of(context).cancel.toUpperCase(),
|
||||
color: Colors.red,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
Container(
|
||||
width: 1,
|
||||
height: 30,
|
||||
color: Colors.grey[500],
|
||||
),
|
||||
Expanded(
|
||||
flex: 1,
|
||||
child: InkWell(
|
||||
onTap: () {
|
||||
widget.onValueSelected(widget.selectedValue);
|
||||
Navigator.pop(context);
|
||||
},
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: Center(
|
||||
child: Texts(
|
||||
TranslationBase.of(context).ok,
|
||||
fontWeight: FontWeight.w400,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
)
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue