Merge branch 'new_design_sikander' into development_new_design_2.0

merge-update-with-lab-changes
Sikander Saleem 4 years ago
commit 8cb342cb24

@ -1,10 +1,15 @@
import 'package:diplomaticquarterapp/core/model/prescriptions/prescription_report.dart'; import 'package:diplomaticquarterapp/core/model/prescriptions/prescription_report.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/models/header_model.dart';
import 'package:diplomaticquarterapp/pages/MyAppointments/widgets/reminder_dialog.dart'; import 'package:diplomaticquarterapp/pages/MyAppointments/widgets/reminder_dialog.dart';
import 'package:diplomaticquarterapp/pages/MyAppointments/widgets/reminder_dialog_prescription.dart'; import 'package:diplomaticquarterapp/pages/MyAppointments/widgets/reminder_dialog_prescription.dart';
import 'package:diplomaticquarterapp/pages/medical/prescriptions/pharmacy_for_prescriptions_page.dart'; import 'package:diplomaticquarterapp/pages/medical/prescriptions/pharmacy_for_prescriptions_page.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils.dart';
import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/new_design/doctor_header.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
@ -20,11 +25,51 @@ class PrescriptionDetailsPage extends StatelessWidget {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return AppScaffold( return AppScaffold(
isShowAppBar: true, isShowAppBar: true,
showNewAppBar: true,
backgroundColor: Color(0xffF8F8F8),
showNewAppBarTitle: true,
appBarTitle: TranslationBase.of(context).prescriptions, appBarTitle: TranslationBase.of(context).prescriptions,
body: SingleChildScrollView( body: Column(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
DoctorHeader(
headerModel: HeaderModel(
prescriptionReport?.doctorName ?? "" + "a",
"",
[],
"",
"",
DateUtil.convertStringToDate(prescriptionReport.orderDate),
DateUtil.formatDateToTime(DateUtil.convertStringToDate(prescriptionReport.orderDate)),
null,
null,
null,
null,
"",
),
isNeedToShowButton: false,
),
Expanded(
child: ListView(
physics: BouncingScrollPhysics(),
padding: EdgeInsets.all(21),
children: [
Container(
padding: EdgeInsets.all(14),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.all(Radius.circular(10.0)),
boxShadow: [
BoxShadow(
color: Color(0xff000000).withOpacity(.05),
//spreadRadius: 5,
blurRadius: 27,
offset: Offset(0, -3),
),
],
),
child: Table(children: fullData(context)),
),
Container( Container(
width: double.infinity, width: double.infinity,
margin: EdgeInsets.only(top: 10, left: 10, right: 10), margin: EdgeInsets.only(top: 10, left: 10, right: 10),
@ -51,58 +96,13 @@ class PrescriptionDetailsPage extends StatelessWidget {
child: Padding( child: Padding(
padding: const EdgeInsets.all(8.0), padding: const EdgeInsets.all(8.0),
child: Center( child: Center(
child: Texts(prescriptionReport.itemDescription.isNotEmpty child: Texts(prescriptionReport.itemDescription.isNotEmpty ? prescriptionReport.itemDescription : prescriptionReport.itemDescriptionN ?? ''),
? prescriptionReport.itemDescription
: prescriptionReport.itemDescriptionN ?? ''),
), ),
), ),
) )
], ],
), ),
), ),
Container(
margin: EdgeInsets.all(8),
child: Row(
children: [
Expanded(
child: InkWell(
onTap: () => Navigator.push(
context,
FadePage(
page: PharmacyForPrescriptionsPage(
itemID: prescriptionReport.itemID,
prescriptionReport: prescriptionReport,
),
),
),
child: Center(
child: Column(
children: <Widget>[
Container(
width: 50,
decoration: BoxDecoration(color: Colors.white, shape: BoxShape.rectangle),
child: Column(
children: <Widget>[
Icon(
Icons.pin_drop,
color: Colors.red[800],
size: 55,
),
],
),
),
SizedBox(
height: 5,
),
Texts(TranslationBase.of(context).availability)
],
),
)),
),
_addReminderButton(context)
],
),
),
Container( Container(
color: Colors.white, color: Colors.white,
margin: EdgeInsets.only(top: 10, left: 10, right: 10), margin: EdgeInsets.only(top: 10, left: 10, right: 10),
@ -152,26 +152,10 @@ class PrescriptionDetailsPage extends StatelessWidget {
), ),
TableRow( TableRow(
children: [ children: [
Container( Container(color: Colors.white, height: 50, width: double.infinity, child: Center(child: Text(prescriptionReport.routeN ?? ''))),
color: Colors.white, Container(color: Colors.white, height: 50, width: double.infinity, child: Center(child: Text(prescriptionReport.frequencyN ?? ''))),
height: 50, Container(color: Colors.white, height: 50, width: double.infinity, child: Center(child: Text('${prescriptionReport.doseDailyQuantity}'))),
width: double.infinity, Container(color: Colors.white, height: 50, width: double.infinity, child: Center(child: Text('${prescriptionReport.days}')))
child: Center(child: Text(prescriptionReport.routeN ?? ''))),
Container(
color: Colors.white,
height: 50,
width: double.infinity,
child: Center(child: Text(prescriptionReport.frequencyN ?? ''))),
Container(
color: Colors.white,
height: 50,
width: double.infinity,
child: Center(child: Text('${prescriptionReport.doseDailyQuantity}'))),
Container(
color: Colors.white,
height: 50,
width: double.infinity,
child: Center(child: Text('${prescriptionReport.days}')))
], ],
), ),
], ],
@ -200,18 +184,39 @@ class PrescriptionDetailsPage extends StatelessWidget {
], ],
), ),
), ),
) ),
], ],
), ),
), ),
Container(
color: Colors.white,
padding: EdgeInsets.only(top: 16, bottom: 16, right: 21, left: 21),
child: Row(
mainAxisSize: MainAxisSize.min,
children: [
Expanded(
child: DefaultButton(
TranslationBase.of(context).availability,
() {
Navigator.push(
context,
FadePage(
page: PharmacyForPrescriptionsPage(
itemID: prescriptionReport.itemID,
prescriptionReport: prescriptionReport,
),
),
); );
} },
iconData: Icons.location_on,
Widget _addReminderButton(BuildContext context) { color: Color(0xff359846),
ProjectViewModel projectViewModel = Provider.of(context); ),
),
return GestureDetector( SizedBox(width: 10),
onTap: () { Expanded(
child: DefaultButton(
TranslationBase.of(context).addReminder,
() {
DateTime startDate = DateTime.now(); DateTime startDate = DateTime.now();
DateTime endDate = DateTime(startDate.year, startDate.month, startDate.day + prescriptionReport.days); DateTime endDate = DateTime(startDate.year, startDate.month, startDate.day + prescriptionReport.days);
@ -227,8 +232,7 @@ class PrescriptionDetailsPage extends StatelessWidget {
child: PrescriptionReminderDialog( child: PrescriptionReminderDialog(
eventId: prescriptionReport.itemID.toString(), eventId: prescriptionReport.itemID.toString(),
title: "${prescriptionReport.itemDescriptionN} Prescription Reminder", title: "${prescriptionReport.itemDescriptionN} Prescription Reminder",
description: description: "${prescriptionReport.itemDescriptionN} ${prescriptionReport.frequencyN} ${prescriptionReport.routeN} ",
"${prescriptionReport.itemDescriptionN} ${prescriptionReport.frequencyN} ${prescriptionReport.routeN} ",
startDate: startDate, startDate: startDate,
endDate: endDate, endDate: endDate,
location: prescriptionReport.remarks, location: prescriptionReport.remarks,
@ -243,45 +247,41 @@ class PrescriptionDetailsPage extends StatelessWidget {
context: context, context: context,
pageBuilder: (context, animation1, animation2) {}); pageBuilder: (context, animation1, animation2) {});
}, },
child: Column( iconData: Icons.notifications_active,
mainAxisSize: MainAxisSize.max, color: Color(0xffEAEAEA),
children: [ textColor: Color(0xff2B353E),
Container(
// height: 100.0,
margin: EdgeInsets.all(7.0),
padding: EdgeInsets.only(bottom: 4.0),
decoration: BoxDecoration(
boxShadow: [BoxShadow(color: Colors.grey[400], blurRadius: 2.0, spreadRadius: 0.0)],
borderRadius: BorderRadius.circular(10),
color: Colors.white),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.max,
children: <Widget>[
Container(
margin: EdgeInsets.fromLTRB(5.0, 5.0, 5.0, 0.0),
child: Text("add",
overflow: TextOverflow.clip,
style: TextStyle(color: new Color(0xffB8382C), letterSpacing: 1.0, fontSize: 18.0)),
), ),
Container(
margin: EdgeInsets.fromLTRB(5.0, 0.0, 5.0, 0.0),
child: Text("reminder",
overflow: TextOverflow.clip,
style: TextStyle(color: Colors.black, letterSpacing: 1.0, fontSize: 15.0)),
), ),
Container( ],
alignment: projectViewModel.isArabic ? Alignment.bottomLeft : Alignment.bottomRight, ),
margin: projectViewModel.isArabic
? EdgeInsets.fromLTRB(10.0, 7.0, 0.0, 8.0)
: EdgeInsets.fromLTRB(0.0, 7.0, 10.0, 8.0),
child: Image.asset("assets/images/new-design/reminder_icon.png", width: 45.0, height: 45.0),
), ),
], ],
), ),
);
}
List<TableRow> fullData(context) {
List<TableRow> tableRow = [];
tableRow.add(
TableRow(
children: [
Utils.tableColumnTitle(TranslationBase.of(context).route),
Utils.tableColumnTitle(TranslationBase.of(context).frequency),
Utils.tableColumnTitle(TranslationBase.of(context).dailyDoses),
Utils.tableColumnTitle(TranslationBase.of(context).duration)
],
), ),
);
tableRow.add(
TableRow(
children: [
Utils.tableColumnValue(prescriptionReport?.routeN ?? '', isLast: true),
Utils.tableColumnValue(prescriptionReport?.frequencyN ?? '', isLast: true),
Utils.tableColumnValue(prescriptionReport?.doseDailyQuantity.toString() ?? '', isLast: true),
Utils.tableColumnValue(prescriptionReport?.days.toString() ?? '', isLast: true),
], ],
), ),
); );
return tableRow;
} }
} }

@ -10,13 +10,15 @@ import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils_new.dart'; import 'package:diplomaticquarterapp/uitl/utils_new.dart';
import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart';
import 'package:diplomaticquarterapp/widgets/data_display/medical/doctor_card.dart';
import 'package:diplomaticquarterapp/widgets/dialogs/new_confirm_send_email_dialog.dart';
import 'package:diplomaticquarterapp/widgets/new_design/doctor_header.dart'; import 'package:diplomaticquarterapp/widgets/new_design/doctor_header.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import 'package:diplomaticquarterapp/extensions/string_extensions.dart';
import '../../../widgets/dialogs/confirm_send_email_dialog.dart'; import '../../../widgets/dialogs/confirm_send_email_dialog.dart';
import 'PrescriptionIDeliveryAddressPage.dart'; import 'PrescriptionIDeliveryAddressPage.dart';
@ -59,6 +61,7 @@ class PrescriptionItemsPage extends StatelessWidget {
model.user.emailAddress, model.user.emailAddress,
), ),
isNeedToShowButton: projectViewModel.havePrivilege(13), isNeedToShowButton: projectViewModel.havePrivilege(13),
showConfirmMessageDialog: false,
onTap: () { onTap: () {
showConfirmMessage(context, model); showConfirmMessage(context, model);
}, },
@ -188,6 +191,7 @@ class PrescriptionItemsPage extends StatelessWidget {
itemCount: model.prescriptionReportListINP.length) itemCount: model.prescriptionReportListINP.length)
else else
ListView.separated( ListView.separated(
padding: EdgeInsets.all(21),
itemBuilder: (context, index) { itemBuilder: (context, index) {
return InkWell( return InkWell(
onTap: () { onTap: () {
@ -211,99 +215,73 @@ class PrescriptionItemsPage extends StatelessWidget {
), ),
); );
}, },
child: Card( child: Container(
margin: EdgeInsets.only(left: 16, right: 16, top: index == 0 ? 16 : 4, bottom: 4), decoration: BoxDecoration(
shape: cardRadius(12), color: Colors.white,
borderRadius: BorderRadius.all(
Radius.circular(10.0),
),
boxShadow: [
BoxShadow(
color: Color(0xff000000).withOpacity(.05),
blurRadius: 27,
offset: Offset(0, -3),
),
],
),
child: Padding( child: Padding(
padding: const EdgeInsets.only(top: 12, bottom: 20, left: 20, right: 20), padding: const EdgeInsets.only(top: 12, bottom: 20, left: 20, right: 20),
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Text( Text(
model.prescriptionReportEnhList[index].itemDescription.isNotEmpty (model.prescriptionReportEnhList[index].itemDescription.isNotEmpty
? model.prescriptionReportEnhList[index].itemDescription ? model.prescriptionReportEnhList[index].itemDescription
: model.prescriptionReportEnhList[index].itemDescriptionN ?? '', : model.prescriptionReportEnhList[index].itemDescriptionN ?? '')
.toLowerCase()
.capitalizeFirstofEach,
style: TextStyle( style: TextStyle(
fontSize: 16, fontSize: 16,
color: Color(0xff2E303A),
letterSpacing: -0.64, letterSpacing: -0.64,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
), ),
), ),
mHeight(10), mHeight(10),
Row( Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Container( Card(
child: Card(
child: Image.network( child: Image.network(
model.prescriptionReportEnhList[index].imageSRCUrl, model.prescriptionReportEnhList[index].imageSRCUrl,
fit: BoxFit.cover, fit: BoxFit.cover,
width: 60, width: 48,
height: 60, height: 48,
), ),
margin: EdgeInsets.zero, margin: EdgeInsets.zero,
clipBehavior: Clip.antiAlias, clipBehavior: Clip.antiAlias,
shape: cardRadius(2000), shape: cardRadius(2000),
), ),
clipBehavior: Clip.antiAlias,
decoration: containerColorRadiusBorderWidth(Colors.white, 200, Colors.grey[200], 1),
),
mWidth(12), mWidth(12),
Column( Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Row( myRichText(TranslationBase.of(context).route + ": ", model.prescriptionReportEnhList[index].route, projectViewModel.isArabic),
children: [ myRichText(
TranslationBase.of(context).dailyDoses + ": ", model.prescriptionReportEnhList[index].doseDailyQuantity.toString(), projectViewModel.isArabic),
mHeight(9),
Text( Text(
TranslationBase.of(context).route + ": ", model.prescriptionReportEnhList[index].remarks,
style: TextStyle(
color: Colors.grey,
fontSize: 10,
letterSpacing: -0.4,
fontWeight: FontWeight.w600,
),
),
Text(
model.prescriptionReportEnhList[index].route,
style: TextStyle( style: TextStyle(
color: Color(0xff575757),
fontSize: 12, fontSize: 12,
letterSpacing: -0.48,
fontWeight: FontWeight.w600,
),
),
],
),
Row(
children: [
Text(
TranslationBase.of(context).dailyDoses + ": ",
style: TextStyle(
color: Colors.grey,
fontSize: 10,
letterSpacing: -0.4, letterSpacing: -0.4,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
), ),
), ),
Text(
model.prescriptionReportEnhList[index].doseDailyQuantity.toString(),
style: TextStyle(
fontSize: 12,
letterSpacing: -0.48,
fontWeight: FontWeight.w600,
),
),
], ],
), ),
mHeight(12),
Text(
model.prescriptionReportEnhList[index].remarks,
style: TextStyle(
color: Colors.grey,
fontSize: 10,
letterSpacing: -0.4,
fontWeight: FontWeight.w600,
),
),
],
) )
], ],
), ),
@ -314,7 +292,7 @@ class PrescriptionItemsPage extends StatelessWidget {
); );
}, },
separatorBuilder: (context, index) { separatorBuilder: (context, index) {
return mHeight(8); return mHeight(12);
}, },
shrinkWrap: true, shrinkWrap: true,
physics: NeverScrollableScrollPhysics(), physics: NeverScrollableScrollPhysics(),
@ -324,10 +302,8 @@ class PrescriptionItemsPage extends StatelessWidget {
), ),
), ),
Container( Container(
width: double.infinity, color: Colors.white,
padding: EdgeInsets.only(left: 16, right: 16, top: 16, bottom: 20), padding: EdgeInsets.only(top: 16, bottom: 16, right: 21, left: 21),
child: Container(
width: MediaQuery.of(context).size.width * 0.8,
child: DefaultButton( child: DefaultButton(
TranslationBase.of(context).resendOrder, TranslationBase.of(context).resendOrder,
() { () {
@ -342,8 +318,7 @@ class PrescriptionItemsPage extends StatelessWidget {
), ),
); );
}, },
color: Colors.green[800], color: Color(0xff359846),
),
), ),
), ),
], ],
@ -355,7 +330,7 @@ class PrescriptionItemsPage extends StatelessWidget {
void showConfirmMessage(BuildContext context, PrescriptionsViewModel model) { void showConfirmMessage(BuildContext context, PrescriptionsViewModel model) {
showDialog( showDialog(
context: context, context: context,
child: ConfirmSendEmailDialog( child: NewConfirmSendEmailDialog(
email: model.user.emailAddress, email: model.user.emailAddress,
onTapSendEmail: () { onTapSendEmail: () {
model.sendPrescriptionEmail( model.sendPrescriptionEmail(

@ -42,6 +42,7 @@ class PrescriptionsPage extends StatelessWidget {
ListView.separated( ListView.separated(
physics: NeverScrollableScrollPhysics(), physics: NeverScrollableScrollPhysics(),
shrinkWrap: true, shrinkWrap: true,
padding: EdgeInsets.only(top: 12),
separatorBuilder: (context, index) { separatorBuilder: (context, index) {
return Container( return Container(
height: 12, height: 12,

@ -6,7 +6,8 @@ class DefaultButton extends StatelessWidget {
final Color textColor; final Color textColor;
final Color color; final Color color;
final Color disabledColor; final Color disabledColor;
DefaultButton(this.text, this.onPress, {this.color, this.disabledColor, this.textColor = Colors.white}); final IconData iconData;
DefaultButton(this.text, this.onPress, {this.color, this.disabledColor, this.textColor = Colors.white, this.iconData});
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
@ -15,10 +16,18 @@ class DefaultButton extends StatelessWidget {
width: double.infinity, width: double.infinity,
child: FlatButton( child: FlatButton(
onPressed: onPress, onPressed: onPress,
child: Row(
children: [
if (iconData != null) Icon(iconData, color: textColor),
Expanded(
child: Text( child: Text(
text, text,
textAlign: TextAlign.center,
style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: textColor, letterSpacing: -0.48), style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: textColor, letterSpacing: -0.48),
), ),
),
],
),
// color: Color(0xffD02127), // color: Color(0xffD02127),
color: color ?? const Color(0xffD02127), color: color ?? const Color(0xffD02127),
disabledColor: disabledColor, disabledColor: disabledColor,

@ -55,12 +55,12 @@ class DoctorCard extends StatelessWidget {
Radius.circular(10.0), Radius.circular(10.0),
), ),
border: Border.all( border: Border.all(
width: 1, // width: 1,
color: Color(0xffEFEFEF) // <--- border width here color: Color(0xffEFEFEF)
), ),
boxShadow: [ boxShadow: [
BoxShadow( BoxShadow(
color: Color(0xff000000).withOpacity(.01), color: Color(0xff000000).withOpacity(.05),
//spreadRadius: 5, //spreadRadius: 5,
blurRadius: 27, blurRadius: 27,
offset: Offset(0, -3), offset: Offset(0, -3),

@ -0,0 +1,219 @@
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/H2O/insert_user_activity_request_model.dart';
import 'package:diplomaticquarterapp/core/model/hospitals/hospitals_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/H2O_view_model.dart';
import 'package:diplomaticquarterapp/pages/settings/settings.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import '../../routes.dart';
class NewConfirmSendEmailDialog extends StatefulWidget {
final String email;
final GestureTapCallback onTapSendEmail;
NewConfirmSendEmailDialog({this.email, this.onTapSendEmail});
@override
_NewConfirmSendEmailDialogState createState() => _NewConfirmSendEmailDialogState();
}
class _NewConfirmSendEmailDialogState extends State<NewConfirmSendEmailDialog> {
@override
void initState() {
super.initState();
}
@override
Widget build(BuildContext context) {
return Dialog(
backgroundColor: Colors.white,
shape: RoundedRectangleBorder(),
insetPadding: EdgeInsets.only(left: 21, right: 21),
child: Container(
padding: EdgeInsets.only(left: 20, right: 20, top: 36, bottom: 36),
child: Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Expanded(
child: Text(
TranslationBase.of(context).confirm,
style: TextStyle(fontSize: 24, fontWeight: FontWeight.w600, color: Color(0xff2B353E), height: 35 / 24, letterSpacing: -0.96),
),
),
IconButton(
padding: EdgeInsets.zero,
icon: Icon(Icons.close),
constraints: BoxConstraints(),
onPressed: () {
Navigator.pop(context);
},
)
],
),
Text(
TranslationBase.of(context).sendConfEmail,
style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xff808080), letterSpacing: -0.48),
),
SizedBox(height: 18),
Container(
padding: EdgeInsets.symmetric(vertical: 16, horizontal: 11),
decoration: BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(10.0)),
color: Color(0xffEAEAEA),
),
child: Row(
children: [
Expanded(
child: Text(
widget.email,
style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.48),
),
),
IconButton(
padding: EdgeInsets.zero,
icon: Icon(Icons.edit),
iconSize: 16,
constraints: BoxConstraints(),
onPressed: () {
Navigator.pop(context);
Navigator.push(
context,
FadePage(
page: Settings(
type: 1,
),
),
);
},
)
],
),
),
SizedBox(height: 18),
Row(
mainAxisSize: MainAxisSize.min,
children: [
Expanded(
child: DefaultButton(
TranslationBase.of(context).cancel,
() {
Navigator.pop(context);
},
textColor: Color(0xff2B353E),
color: Color(0xffEAEAEA),
),
),
SizedBox(width: 10),
Expanded(
child: DefaultButton(
TranslationBase.of(context).send,
() {
Navigator.pop(context);
widget.onTapSendEmail();
},
),
),
],
),
],
),
),
);
return SimpleDialog(
// contentPadding: EdgeInsets.fromLTRB(28.0, 24.0, 28.0, 0.0),
title: Center(
child: Texts(
TranslationBase.of(context).confirm,
color: Colors.black,
),
),
children: [
Column(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Center(
child: Texts(
TranslationBase.of(context).sendConfEmail,
fontSize: 14,
color: Colors.grey,
),
),
Texts(
widget.email,
color: Colors.grey,
),
SizedBox(
height: 5,
),
Divider(),
SizedBox(
height: 5.0,
),
InkWell(
onTap: () {
Navigator.pop(context);
},
child: Container(
width: double.maxFinite,
child: Center(
child: Texts(
TranslationBase.of(context).cancel,
color: Colors.red,
),
),
),
),
SizedBox(
height: 15.0,
),
InkWell(
onTap: () {
Navigator.pop(context);
widget.onTapSendEmail();
},
child: Container(
width: double.maxFinite,
child: Center(
child: Texts(TranslationBase.of(context).sendEmail),
),
),
),
SizedBox(
height: 15.0,
),
InkWell(
onTap: () {
Navigator.pop(context);
Navigator.push(
context,
FadePage(
page: Settings(
type: 1,
),
),
);
},
child: Container(
width: double.maxFinite,
child: Center(
child: Texts(TranslationBase.of(context).updateEmail),
),
),
),
SizedBox(
height: 20.0,
),
],
)
],
);
}
}
Loading…
Cancel
Save