translation stage two

merge-requests/122/head
hussam alhababieh 6 years ago
parent b0005e72f9
commit a02fe9c83d

@ -96,4 +96,21 @@ const Map<String, Map<String, String>> localizedValues = {
'en': 'You don\'t have any lab orders', 'en': 'You don\'t have any lab orders',
'ar': 'ليس لديك اي فحوصات طبية' 'ar': 'ليس لديك اي فحوصات طبية'
}, },
'answerThePatient': {'en': 'answer the patient', 'ar': 'اجب المريض '},
'pleaseEnterAnswer': {
'en': 'please enter answer',
'ar': 'الرجاء ادخال اجابة '
},
'replay': {'en': 'Replay', 'ar': 'تاكيد'},
'progressNote': {'en': 'Progress Note', 'ar': 'ملاحظة التقدم'},
'searchNote': {'en': 'Search Note', 'ar': 'بحث عن ملاحظة'},
'errorNoProgressNote': {
'en': 'You don\'t have any Progress Note',
'ar': 'ليس لديك اي ملاحظة تقدم '
},
'invoiceNo:': {'en': 'Invoice No :', 'ar': 'رقم الفاتورة'},
'generalResult': {'en': 'General Result :', 'ar': 'النتيجة العامة'},
'description': {'en': 'Description', 'ar': 'الوصف'},
'value': {'en': 'Value', 'ar': 'القيمة'},
'range': {'en': 'range', 'ar': 'النطاق'},
}; };

@ -399,7 +399,7 @@ class _DashboardScreenState extends State<DashboardScreen> {
child: DashboardItemIconText( child: DashboardItemIconText(
widget.iconURL + 'qr-code.svg', widget.iconURL + 'qr-code.svg',
"", "",
"QR Reader", TranslationBase.of(context).qrReader,
showBorder: true, showBorder: true,
backgroundColor: Colors.white, backgroundColor: Colors.white,
valueFontColor: Colors.black, valueFontColor: Colors.black,

@ -17,7 +17,7 @@ class MyReferralPatient extends StatelessWidget {
Widget build(BuildContext context) { Widget build(BuildContext context) {
referralPatientProvider = Provider.of(context); referralPatientProvider = Provider.of(context);
return AppScaffold( return AppScaffold(
appBarTitle: 'My Referral Patient', appBarTitle: TranslationBase.of(context).myReferralPatient,
body: referralPatientProvider.isLoading body: referralPatientProvider.isLoading
? DrAppCircularProgressIndeicator() ? DrAppCircularProgressIndeicator()
: referralPatientProvider.isError : referralPatientProvider.isError
@ -43,11 +43,12 @@ class MyReferralPatient extends StatelessWidget {
children: <Widget>[ children: <Widget>[
SizedBox( SizedBox(
height: 10, height: 10,
), ),
Container( Container(
child: Column( child: Column(
children: referralPatientProvider.listMyReferralPatientModel.map((item) { children: referralPatientProvider
.listMyReferralPatientModel
.map((item) {
return MyReferralPatientWidget( return MyReferralPatientWidget(
myReferralPatientModel: item, myReferralPatientModel: item,
); );

@ -9,58 +9,59 @@ import 'package:flutter/material.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import '../../widgets/shared/app_scaffold_widget.dart'; import '../../widgets/shared/app_scaffold_widget.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
class MyReferredPatient extends StatelessWidget { class MyReferredPatient extends StatelessWidget {
MyReferredPatientProvider referredPatientProvider; MyReferredPatientProvider referredPatientProvider;
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
referredPatientProvider = Provider.of(context); referredPatientProvider = Provider.of(context);
return AppScaffold( return AppScaffold(
appBarTitle: 'My Referred Patient', appBarTitle: TranslationBase.of(context).myReferredPatient,
body: referredPatientProvider.isLoading body: referredPatientProvider.isLoading
? DrAppCircularProgressIndeicator() ? DrAppCircularProgressIndeicator()
: referredPatientProvider.isError : referredPatientProvider.isError
? Center( ? Center(
child: AppText( child: AppText(
referredPatientProvider.error, referredPatientProvider.error,
color: Theme.of(context).errorColor, color: Theme.of(context).errorColor,
),
)
: referredPatientProvider.listMyReferredPatientModel.length == 0
? Center(
child: AppText(
TranslationBase.of(context).errorNoSchedule,
color: Theme.of(context).errorColor,
),
)
: Container(
padding: EdgeInsetsDirectional.fromSTEB(20, 0, 20, 0),
child: ListView(
children: <Widget>[
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
SizedBox(
height: 10,
),
Container(
child: Column(
//children: referredPatientProvider.listMyReferralPatientModel.map((item) {
children: referredPatientProvider.listMyReferredPatientModel.map((item) {
return MyReferredPatientWidget(
myReferredPatientModel: item,
);
}).toList(),
), ),
), )
], : referredPatientProvider.listMyReferredPatientModel.length == 0
), ? Center(
], child: AppText(
), TranslationBase.of(context).errorNoSchedule,
), color: Theme.of(context).errorColor,
),
)
: Container(
padding: EdgeInsetsDirectional.fromSTEB(20, 0, 20, 0),
child: ListView(
children: <Widget>[
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
SizedBox(
height: 10,
),
Container(
child: Column(
//children: referredPatientProvider.listMyReferralPatientModel.map((item) {
children: referredPatientProvider
.listMyReferredPatientModel
.map((item) {
return MyReferredPatientWidget(
myReferredPatientModel: item,
);
}).toList(),
),
),
],
),
],
),
),
); );
} }
} }

@ -12,6 +12,7 @@ import 'package:eva_icons_flutter/eva_icons_flutter.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:doctor_app_flutter/util/translations_delegate_base.dart';
class LabResult extends StatefulWidget { class LabResult extends StatefulWidget {
final LabOrdersResModel labOrders; final LabOrdersResModel labOrders;
@ -40,13 +41,14 @@ class _LabResultState extends State<LabResult> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return AppScaffold( return AppScaffold(
appBarTitle: "Lab Orders", appBarTitle: TranslationBase.of(context).labOrders,
body: patientsProv.isLoading body: patientsProv.isLoading
? DrAppCircularProgressIndeicator() ? DrAppCircularProgressIndeicator()
: patientsProv.isError : patientsProv.isError
? DrAppEmbeddedError(error: patientsProv.error) ? DrAppEmbeddedError(error: patientsProv.error)
: patientsProv.labResultList.length == 0 : patientsProv.labResultList.length == 0
? DrAppEmbeddedError(error: 'You don\'t have any Orders') ? DrAppEmbeddedError(
error: TranslationBase.of(context).errorNoLabOrders)
: Container( : Container(
margin: EdgeInsets.fromLTRB( margin: EdgeInsets.fromLTRB(
SizeConfig.realScreenWidth * 0.05, SizeConfig.realScreenWidth * 0.05,
@ -57,25 +59,25 @@ class _LabResultState extends State<LabResult> {
children: <Widget>[ children: <Widget>[
CardWithBgWidgetNew( CardWithBgWidgetNew(
widget: Row( widget: Row(
mainAxisAlignment: mainAxisAlignment: MainAxisAlignment.start,
MainAxisAlignment.start,
children: <Widget>[ children: <Widget>[
AppText( AppText(
' Invoice No :', TranslationBase.of(context).invoiceNo,
fontSize: fontSize: 2 * SizeConfig.textMultiplier,
2 * SizeConfig.textMultiplier,
color: Colors.grey[800], color: Colors.grey[800],
), ),
AppText( AppText(
' ${widget.labOrders.invoiceNo}', ' ${widget.labOrders.invoiceNo}',
fontSize: fontSize: 2 * SizeConfig.textMultiplier,
2 * SizeConfig.textMultiplier,
color: Colors.grey[800], color: Colors.grey[800],
), ),
], ],
), ),
), ),
CardWithBgWidgetNew(widget: LabResultWidget(labResult: patientsProv.labResultList,)) CardWithBgWidgetNew(
widget: LabResultWidget(
labResult: patientsProv.labResultList,
))
], ],
), ),
), ),

@ -14,6 +14,7 @@ import '../../../util/dr_app_shared_pref.dart';
import '../../../widgets/shared/app_scaffold_widget.dart'; import '../../../widgets/shared/app_scaffold_widget.dart';
import '../../../widgets/shared/app_texts_widget.dart'; import '../../../widgets/shared/app_texts_widget.dart';
import '../../../widgets/shared/dr_app_circular_progress_Indeicator.dart'; import '../../../widgets/shared/dr_app_circular_progress_Indeicator.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
DrAppSharedPreferances sharedPref = new DrAppSharedPreferances(); DrAppSharedPreferances sharedPref = new DrAppSharedPreferances();
@ -75,14 +76,14 @@ class _ProgressNoteState extends State<ProgressNoteScreen> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return AppScaffold( return AppScaffold(
appBarTitle: "Progress Note", appBarTitle: TranslationBase.of(context).progressNote,
body: patientsProv.isLoading body: patientsProv.isLoading
? DrAppCircularProgressIndeicator() ? DrAppCircularProgressIndeicator()
: patientsProv.isError : patientsProv.isError
? DrAppEmbeddedError(error: patientsProv.error) ? DrAppEmbeddedError(error: patientsProv.error)
: notesList == null : notesList == null
? DrAppEmbeddedError( ? DrAppEmbeddedError(
error: 'You don\'t have any Progress Note') error: TranslationBase.of(context).errorNoProgressNote)
: Column( : Column(
children: <Widget>[ children: <Widget>[
Container( Container(
@ -93,8 +94,8 @@ class _ProgressNoteState extends State<ProgressNoteScreen> {
onChanged: (String str) { onChanged: (String str) {
this.searchData(str); this.searchData(str);
}, },
decoration: decoration: buildInputDecoration(context,
buildInputDecoration(context, 'Search Note'), TranslationBase.of(context).searchNote),
), ),
), ),
Expanded( Expanded(
@ -116,7 +117,8 @@ class _ProgressNoteState extends State<ProgressNoteScreen> {
ExpansionTile( ExpansionTile(
title: Container( title: Container(
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment:
CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
AppText( AppText(
notesList[index] notesList[index]
@ -138,12 +140,12 @@ class _ProgressNoteState extends State<ProgressNoteScreen> {
), ),
children: <Widget>[ children: <Widget>[
Divider( Divider(
color: Colors.black, color: Colors.black,
height: 20, height: 20,
thickness: 1, thickness: 1,
indent: 0, indent: 0,
endIndent: 0, endIndent: 0,
), ),
AppText( AppText(
notesList[index]["Notes"], notesList[index]["Notes"],
margin: 5, margin: 5,
@ -182,7 +184,7 @@ class _ProgressNoteState extends State<ProgressNoteScreen> {
if (strExist) { if (strExist) {
filteredNotesList = null; filteredNotesList = null;
filteredNotesList = patientsProv.patientProgressNoteList filteredNotesList = patientsProv.patientProgressNoteList
.where((note) => .where((note) =>
note["DoctorName"].toString().contains(str.toUpperCase())) note["DoctorName"].toString().contains(str.toUpperCase()))
.toList(); .toList();

@ -125,6 +125,22 @@ class TranslationBase {
String get labOrders => localizedValues['labOrders'][locale.languageCode]; String get labOrders => localizedValues['labOrders'][locale.languageCode];
String get errorNoLabOrders => String get errorNoLabOrders =>
localizedValues['errorNoLabOrders'][locale.languageCode]; localizedValues['errorNoLabOrders'][locale.languageCode];
String get answerThePatient =>
localizedValues['answerThePatient'][locale.languageCode];
String get pleaseEnterAnswer =>
localizedValues['pleaseEnterAnswer'][locale.languageCode];
String get replay => localizedValues['replay'][locale.languageCode];
String get progressNote =>
localizedValues['progressNote'][locale.languageCode];
String get searchNote => localizedValues['searchNote'][locale.languageCode];
String get errorNoProgressNote =>
localizedValues['errorNoProgressNote'][locale.languageCode];
String get invoiceNo => localizedValues['invoiceNo:'][locale.languageCode];
String get generalResult =>
localizedValues['generalResult'][locale.languageCode];
String get description => localizedValues['description'][locale.languageCode];
String get value => localizedValues['value'][locale.languageCode];
String get range => localizedValues['range'][locale.languageCode];
} }
class TranslationBaseDelegate extends LocalizationsDelegate<TranslationBase> { class TranslationBaseDelegate extends LocalizationsDelegate<TranslationBase> {

@ -6,6 +6,7 @@ import 'package:doctor_app_flutter/widgets/shared/card_with_bgNew_widget.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart'; import 'package:hexcolor/hexcolor.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
class LabResultWidget extends StatefulWidget { class LabResultWidget extends StatefulWidget {
final List<LabResult> labResult; final List<LabResult> labResult;
@ -30,7 +31,7 @@ class _LabResultWidgetState extends State<LabResultWidget> {
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
AppText( AppText(
'General Result', TranslationBase.of(context).generalResult,
fontSize: 2.5 * SizeConfig.textMultiplier, fontSize: 2.5 * SizeConfig.textMultiplier,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
@ -57,23 +58,18 @@ class _LabResultWidgetState extends State<LabResultWidget> {
margin: EdgeInsets.only(top: 10), margin: EdgeInsets.only(top: 10),
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(10)), borderRadius: BorderRadius.all(Radius.circular(10)),
), ),
child: Column( child: Column(
children: widget.labResult.map((result) { children: widget.labResult.map((result) {
return Container( return Container(
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: borderRadius: BorderRadius.all(Radius.circular(10)),
BorderRadius.all(Radius.circular(10)),
border: Border( border: Border(
bottom: BorderSide( bottom:
color: Colors.grey, width: 0.5), BorderSide(color: Colors.grey, width: 0.5),
top: BorderSide( top: BorderSide(color: Colors.grey, width: 0.5),
color: Colors.grey, width: 0.5), left: BorderSide(color: Colors.grey, width: 0.5),
left: BorderSide( right: BorderSide(color: Colors.grey, width: 0.5),
color: Colors.grey, width: 0.5),
right: BorderSide(
color: Colors.grey, width: 0.5),
), ),
), ),
margin: EdgeInsets.only(top: 10), margin: EdgeInsets.only(top: 10),
@ -92,7 +88,8 @@ class _LabResultWidgetState extends State<LabResultWidget> {
), ),
child: Center( child: Center(
child: Texts( child: Texts(
'Description', TranslationBase.of(context)
.description,
color: Colors.white, color: Colors.white,
), ),
), ),
@ -103,7 +100,9 @@ class _LabResultWidgetState extends State<LabResultWidget> {
child: Container( child: Container(
color: Hexcolor('#515B5D'), color: Hexcolor('#515B5D'),
child: Center( child: Center(
child: Texts('Value', color: Colors.white), child: Texts(
TranslationBase.of(context).value,
color: Colors.white),
), ),
height: 60), height: 60),
), ),
@ -116,7 +115,9 @@ class _LabResultWidgetState extends State<LabResultWidget> {
), ),
), ),
child: Center( child: Center(
child: Texts('Range', color: Colors.white), child: Texts(
TranslationBase.of(context).range,
color: Colors.white),
), ),
height: 60), height: 60),
), ),
@ -143,8 +144,7 @@ class _LabResultWidgetState extends State<LabResultWidget> {
Expanded( Expanded(
child: Container( child: Container(
child: Center( child: Center(
child: Texts( child: Texts('${result.resultValue}',
'${result.resultValue}',
color: Colors.grey[800]), color: Colors.grey[800]),
), ),
height: 60), height: 60),

@ -11,6 +11,7 @@ import 'package:doctor_app_flutter/widgets/shared/card_with_bgNew_widget.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:doctor_app_flutter/util/translations_delegate_base.dart';
class MyReferralPatientWidget extends StatefulWidget { class MyReferralPatientWidget extends StatefulWidget {
final MyReferralPatientModel myReferralPatientModel; final MyReferralPatientModel myReferralPatientModel;
@ -31,7 +32,8 @@ class _MyReferralPatientWidgetState extends State<MyReferralPatientWidget> {
@override @override
void initState() { void initState() {
answerController = new TextEditingController(text: widget.myReferralPatientModel.referredDoctorRemarks ?? ''); answerController = new TextEditingController(
text: widget.myReferralPatientModel.referredDoctorRemarks ?? '');
super.initState(); super.initState();
} }
@ -59,260 +61,285 @@ class _MyReferralPatientWidgetState extends State<MyReferralPatientWidget> {
Icon(_showDetails Icon(_showDetails
? Icons.keyboard_arrow_up ? Icons.keyboard_arrow_up
: Icons.keyboard_arrow_down), : Icons.keyboard_arrow_down),
], ],
), ),
), ),
!_showDetails !_showDetails
? Container() ? Container()
: AnimatedContainer( : AnimatedContainer(
duration: Duration(milliseconds: 200), duration: Duration(milliseconds: 200),
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
SizedBox(height: 5,), SizedBox(
Divider(color: Color(0xFF000000),height: 0.5,), height: 5,
Table( ),
border: TableBorder.symmetric(inside: BorderSide(width: 0.5),), Divider(
children: [ color: Color(0xFF000000),
TableRow( height: 0.5,
),
Table(
border: TableBorder.symmetric(
inside: BorderSide(width: 0.5),
),
children: [ children: [
Container( TableRow(children: [
margin: EdgeInsets.all(2.5), Container(
padding: EdgeInsets.all(5), margin: EdgeInsets.all(2.5),
child: Column( padding: EdgeInsets.all(5),
crossAxisAlignment: CrossAxisAlignment.start, child: Column(
children: <Widget>[ crossAxisAlignment: CrossAxisAlignment.start,
AppText( children: <Widget>[
'File No', AppText(
fontSize: TranslationBase.of(context).fileNo,
1.7 * SizeConfig.textMultiplier, fontSize: 1.7 * SizeConfig.textMultiplier,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
SizedBox(height: 5,), SizedBox(
AppText( height: 5,
'${widget.myReferralPatientModel.referringDoctor}', ),
fontSize: AppText(
1.7 * SizeConfig.textMultiplier, '${widget.myReferralPatientModel.referringDoctor}',
fontWeight: FontWeight.w300, fontSize: 1.7 * SizeConfig.textMultiplier,
) fontWeight: FontWeight.w300,
], )
],
),
), ),
), Container(
Container( margin: EdgeInsets.only(
margin: EdgeInsets.only(left: 4,top: 2.5,right: 2.5,bottom: 2.5), left: 4, top: 2.5, right: 2.5, bottom: 2.5),
padding: EdgeInsets.all(5), padding: EdgeInsets.all(5),
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
AppText( AppText(
'Referring Doctor', TranslationBase.of(context)
fontSize: .referralDoctor,
1.7 * SizeConfig.textMultiplier, fontSize: 1.7 * SizeConfig.textMultiplier,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
SizedBox(height: 5,), SizedBox(
AppText( height: 5,
widget.myReferralPatientModel ),
.referringClinicDescription, AppText(
fontSize: widget.myReferralPatientModel
1.7 * SizeConfig.textMultiplier, .referringClinicDescription,
fontWeight: FontWeight.w300, fontSize: 1.7 * SizeConfig.textMultiplier,
) fontWeight: FontWeight.w300,
], )
],
),
), ),
), ]),
] TableRow(children: [
), Container(
TableRow( margin: EdgeInsets.all(2.5),
children: [ padding: EdgeInsets.all(5),
Container( child: Column(
margin: EdgeInsets.all(2.5), crossAxisAlignment: CrossAxisAlignment.start,
padding: EdgeInsets.all(5), children: <Widget>[
child: Column( AppText(
crossAxisAlignment: TranslationBase.of(context)
CrossAxisAlignment.start, .referringClinic,
children: <Widget>[ fontSize: 1.7 * SizeConfig.textMultiplier,
AppText( fontWeight: FontWeight.bold,
'Referring Clinic', ),
fontSize: SizedBox(
1.7 * SizeConfig.textMultiplier, height: 5,
fontWeight: FontWeight.bold, ),
), AppText(
SizedBox(height: 5,), '${widget.myReferralPatientModel.referringClinicDescription}',
AppText( fontSize: 1.7 * SizeConfig.textMultiplier,
'${widget.myReferralPatientModel.referringClinicDescription}', fontWeight: FontWeight.w300,
fontSize: )
1.7 * SizeConfig.textMultiplier, ],
fontWeight: FontWeight.w300, ),
)
],
), ),
), Container(
Container( margin: EdgeInsets.only(
margin: EdgeInsets.only(left: 4,top: 2.5,right: 2.5,bottom: 2.5), left: 4, top: 2.5, right: 2.5, bottom: 2.5),
padding: EdgeInsets.all(5), padding: EdgeInsets.all(5),
child: Column( child: Column(
crossAxisAlignment: crossAxisAlignment: CrossAxisAlignment.start,
CrossAxisAlignment.start, children: <Widget>[
children: <Widget>[ AppText(
AppText( TranslationBase.of(context).frequency,
'Frequency', fontSize: 1.7 * SizeConfig.textMultiplier,
fontSize: fontWeight: FontWeight.bold,
1.7 * SizeConfig.textMultiplier, ),
fontWeight: FontWeight.bold, SizedBox(
height: 5,
),
AppText(
widget.myReferralPatientModel
.frequencyDescription,
fontSize: 1.7 * SizeConfig.textMultiplier,
fontWeight: FontWeight.w300,
)
],
),
)
]),
TableRow(
children: [
Container(
margin: EdgeInsets.all(2.5),
padding: EdgeInsets.all(5),
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: <Widget>[
AppText(
TranslationBase.of(context).priority,
fontSize:
1.7 * SizeConfig.textMultiplier,
fontWeight: FontWeight.bold,
),
SizedBox(
height: 5,
),
AppText(
'${widget.myReferralPatientModel.priorityDescription}',
fontSize:
1.7 * SizeConfig.textMultiplier,
fontWeight: FontWeight.w300,
)
],
), ),
SizedBox(height: 5,),
AppText(
widget.myReferralPatientModel
.frequencyDescription,
fontSize:
1.7 * SizeConfig.textMultiplier,
fontWeight: FontWeight.w300,
)
],
),
)
]
),
TableRow(
children: [
Container(
margin: EdgeInsets.all(2.5),
padding: EdgeInsets.all(5),
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: <Widget>[
AppText(
'Priority',
fontSize:
1.7 * SizeConfig.textMultiplier,
fontWeight: FontWeight.bold,
), ),
SizedBox(height: 5,), Container(
AppText( margin: EdgeInsets.only(
'${widget.myReferralPatientModel.priorityDescription}', left: 4,
fontSize: top: 2.5,
1.7 * SizeConfig.textMultiplier, right: 2.5,
fontWeight: FontWeight.w300, bottom: 2.5),
padding: EdgeInsets.all(5),
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: <Widget>[
AppText(
TranslationBase.of(context)
.maxResponseTime,
fontSize:
1.7 * SizeConfig.textMultiplier,
fontWeight: FontWeight.bold,
),
SizedBox(
height: 5,
),
AppText(
Helpers.getDateFormatted(widget
.myReferralPatientModel
.mAXResponseTime),
fontSize:
1.7 * SizeConfig.textMultiplier,
fontWeight: FontWeight.w300,
)
],
),
) )
], ],
), ),
), ],
Container( ),
margin: EdgeInsets.only(left: 4,top: 2.5,right: 2.5,bottom: 2.5), Divider(
padding: EdgeInsets.all(5), color: Color(0xFF000000),
child: Column( height: 0.5,
crossAxisAlignment: ),
CrossAxisAlignment.start, SizedBox(
children: <Widget>[ height: 5,
AppText( ),
'Max Response Time', Column(
fontSize: crossAxisAlignment: CrossAxisAlignment.start,
1.7 * SizeConfig.textMultiplier, children: <Widget>[
fontWeight: FontWeight.bold, AppText(
), TranslationBase.of(context)
SizedBox(height: 5,), .clinicDetailsandRemarks,
AppText( fontSize: 1.7 * SizeConfig.textMultiplier,
Helpers.getDateFormatted(widget fontWeight: FontWeight.bold,
.myReferralPatientModel textAlign: TextAlign.start,
.mAXResponseTime),
fontSize:
1.7 * SizeConfig.textMultiplier,
fontWeight: FontWeight.w300,
)
],
), ),
) Texts(
], '${widget.myReferralPatientModel.referringDoctorRemarks}',
), style: "bodyText1",
readMore: true,
], textAlign: TextAlign.start,
), maxLength: 100)
Divider(color: Color(0xFF000000),height: 0.5,), ],
SizedBox( ),
height: 5, SizedBox(
), height: 5,
Column( ),
crossAxisAlignment: CrossAxisAlignment.start, AppText(
children: <Widget>[ TranslationBase.of(context).answerSuggestions,
AppText( fontSize: 1.7 * SizeConfig.textMultiplier,
'Clinic Details and Remarks', fontWeight: FontWeight.bold,
fontSize: 1.7 * SizeConfig.textMultiplier,
fontWeight: FontWeight.bold,
textAlign: TextAlign.start,),
Texts(
'${widget.myReferralPatientModel.referringDoctorRemarks}',
style: "bodyText1",
readMore: true,
textAlign: TextAlign.start, textAlign: TextAlign.start,
maxLength: 100) ),
], SizedBox(
), height: 5,
SizedBox( ),
height: 5, Form(
), key: _formKey,
AppText( child: TextFields(
'Answer/Suggestions', maxLines: 2,
fontSize: 1.7 * SizeConfig.textMultiplier, minLines: 2,
fontWeight: FontWeight.bold, hintText:
textAlign: TextAlign.start, TranslationBase.of(context).answerThePatient,
), fontWeight: FontWeight.normal,
SizedBox( initialValue: widget.myReferralPatientModel
height: 5, .referredDoctorRemarks ??
), '',
Form( readOnly: _isLoading,
key: _formKey, validator: (value) {
child: TextFields( if (value.isEmpty)
maxLines: 2, return TranslationBase.of(context)
minLines: 2, .pleaseEnterAnswer;
hintText: 'Answer the patient', else
fontWeight: FontWeight.normal, return null;
initialValue: widget.myReferralPatientModel.referredDoctorRemarks ?? '', },
readOnly: _isLoading, ),
validator: (value) { ),
if (value.isEmpty) SizedBox(height: 10.0),
return "please enter answer"; SizedBox(height: 10.0),
else Container(
return null; width: double.infinity,
}, margin: EdgeInsets.only(left: 10, right: 10),
), child: Button(
), onTap: () async {
SizedBox(height: 10.0), final form = _formKey.currentState;
SizedBox(height: 10.0), if (form.validate()) {
Container( setState(() {
width: double.infinity, _isLoading = true;
margin: EdgeInsets.only(left: 10,right: 10), });
child: Button( try {
onTap: () async { await Provider.of<MyReferralPatientProvider>(
final form = _formKey.currentState; context,
if (form.validate()) { listen: false)
setState(() { .replay(answerController.text.toString(),
_isLoading = true; widget.myReferralPatientModel);
}); setState(() {
try { _isLoading = false;
await Provider.of<MyReferralPatientProvider>(context, listen: false).replay(answerController.text.toString(), widget.myReferralPatientModel); });
setState(() { DrAppToastMsg.showSuccesToast(
_isLoading = false; 'Reply Successfully');
}); } catch (e) {
DrAppToastMsg.showSuccesToast('Reply Successfully'); setState(() {
_isLoading = false;
} catch (e) { });
setState(() { DrAppToastMsg.showErrorToast(e);
_isLoading = false; }
}); }
DrAppToastMsg.showErrorToast(e); },
} title: TranslationBase.of(context).replay,
} loading: _isLoading,
}, ),
title: 'Reply', )
loading: _isLoading, ],
), ),
) )
],
),
)
], ],
), ),
), ),

Loading…
Cancel
Save