|
|
|
@ -10,13 +10,18 @@ import 'package:doctor_app_flutter/widgets/shared/TextFields.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/widgets/shared/app_button.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/widgets/shared/card_with_bgNew_widget.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/widgets/shared/expandable-widget-header-body.dart';
|
|
|
|
|
import 'package:flutter/cupertino.dart';
|
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
|
import 'package:intl/intl.dart';
|
|
|
|
|
|
|
|
|
|
class MyReferralPatientWidget extends StatefulWidget {
|
|
|
|
|
final MyReferralPatientModel myReferralPatientModel;
|
|
|
|
|
final ReferralPatientViewModel model;
|
|
|
|
|
MyReferralPatientWidget({Key key, this.myReferralPatientModel, this.model});
|
|
|
|
|
final bool isExpand;
|
|
|
|
|
final Function expandClick;
|
|
|
|
|
|
|
|
|
|
MyReferralPatientWidget({Key key, this.myReferralPatientModel, this.model, this.isExpand, this.expandClick});
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
_MyReferralPatientWidgetState createState() =>
|
|
|
|
@ -24,7 +29,6 @@ class MyReferralPatientWidget extends StatefulWidget {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
class _MyReferralPatientWidgetState extends State<MyReferralPatientWidget> {
|
|
|
|
|
bool _showDetails = false;
|
|
|
|
|
bool _isLoading = false;
|
|
|
|
|
final _formKey = GlobalKey<FormState>();
|
|
|
|
|
String error;
|
|
|
|
@ -39,299 +43,416 @@ class _MyReferralPatientWidgetState extends State<MyReferralPatientWidget> {
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
|
return CardWithBgWidgetNew(
|
|
|
|
|
widget: Container(
|
|
|
|
|
child: Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
InkWell(
|
|
|
|
|
onTap: () {
|
|
|
|
|
setState(() {
|
|
|
|
|
_showDetails = !_showDetails;
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
child: Row(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
AppText(
|
|
|
|
|
'${widget.myReferralPatientModel.firstName} ${widget.myReferralPatientModel.lastName}',
|
|
|
|
|
fontSize: 2.5 * SizeConfig.textMultiplier,
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
),
|
|
|
|
|
Icon(_showDetails
|
|
|
|
|
? Icons.keyboard_arrow_up
|
|
|
|
|
: Icons.keyboard_arrow_down),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
!_showDetails
|
|
|
|
|
? Container()
|
|
|
|
|
: AnimatedContainer(
|
|
|
|
|
duration: Duration(milliseconds: 200),
|
|
|
|
|
child: Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 5,
|
|
|
|
|
),
|
|
|
|
|
Divider(
|
|
|
|
|
color: Color(0xFF000000),
|
|
|
|
|
height: 0.5,
|
|
|
|
|
return Container(
|
|
|
|
|
width: double.infinity,
|
|
|
|
|
margin: EdgeInsets.symmetric(horizontal: 8),
|
|
|
|
|
padding: EdgeInsets.only(left: 0, top: 8, right: 0, bottom: 0),
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
shape: BoxShape.rectangle,
|
|
|
|
|
borderRadius: BorderRadius.circular(8),
|
|
|
|
|
border: Border.fromBorderSide(BorderSide(
|
|
|
|
|
color: Color(0xffCCCCCC),
|
|
|
|
|
width: 2,
|
|
|
|
|
)),
|
|
|
|
|
color: Color(0xffffffff),
|
|
|
|
|
),
|
|
|
|
|
child: Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
HeaderBodyExpandableNotifier(
|
|
|
|
|
headerWidget: Column(
|
|
|
|
|
children: [
|
|
|
|
|
Container(
|
|
|
|
|
padding:
|
|
|
|
|
EdgeInsets.only(left: 16, top: 8, right: 8, bottom: 0),
|
|
|
|
|
child: Row(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
Expanded(
|
|
|
|
|
child: Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
Container(
|
|
|
|
|
color: Color(0xFFB8382C),
|
|
|
|
|
padding: EdgeInsets.symmetric(
|
|
|
|
|
vertical: 4, horizontal: 4),
|
|
|
|
|
child: AppText(
|
|
|
|
|
'${widget.myReferralPatientModel.priorityDescription}',
|
|
|
|
|
fontSize: 1.7 * SizeConfig.textMultiplier,
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
textAlign: TextAlign.start,
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 10,
|
|
|
|
|
),
|
|
|
|
|
AppText(
|
|
|
|
|
'${widget.myReferralPatientModel.firstName} ${widget.myReferralPatientModel.middleName} ${widget.myReferralPatientModel.lastName}',
|
|
|
|
|
fontSize: 2 * SizeConfig.textMultiplier,
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
textAlign: TextAlign.start,
|
|
|
|
|
color: Colors.black,
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 10,
|
|
|
|
|
),
|
|
|
|
|
Row(
|
|
|
|
|
children: [
|
|
|
|
|
AppText(
|
|
|
|
|
TranslationBase.of(context).fileNo,
|
|
|
|
|
fontSize: 1.7 * SizeConfig.textMultiplier,
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
textAlign: TextAlign.start,
|
|
|
|
|
color: Colors.black,
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
width: 20,
|
|
|
|
|
),
|
|
|
|
|
AppText(
|
|
|
|
|
'${widget.myReferralPatientModel.referralDoctor}',
|
|
|
|
|
fontSize: 1.7 * SizeConfig.textMultiplier,
|
|
|
|
|
fontWeight: FontWeight.normal,
|
|
|
|
|
textAlign: TextAlign.start,
|
|
|
|
|
color: Colors.black,
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
Table(
|
|
|
|
|
border: TableBorder.symmetric(
|
|
|
|
|
inside: BorderSide(width: 0.5),
|
|
|
|
|
),
|
|
|
|
|
Container(
|
|
|
|
|
margin:
|
|
|
|
|
EdgeInsets.symmetric(horizontal: 8, vertical: 8),
|
|
|
|
|
child: InkWell(
|
|
|
|
|
onTap: widget.expandClick,
|
|
|
|
|
child: Image.asset(
|
|
|
|
|
"assets/images/ic_circle_arrow.png",
|
|
|
|
|
width: 25,
|
|
|
|
|
height: 25,
|
|
|
|
|
color: Colors.black,
|
|
|
|
|
),
|
|
|
|
|
children: [
|
|
|
|
|
TableRow(children: [
|
|
|
|
|
Container(
|
|
|
|
|
margin: EdgeInsets.all(2.5),
|
|
|
|
|
padding: EdgeInsets.all(5),
|
|
|
|
|
child: Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
AppText(
|
|
|
|
|
TranslationBase.of(context).fileNo,
|
|
|
|
|
fontSize: 1.7 * SizeConfig.textMultiplier,
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 5,
|
|
|
|
|
),
|
|
|
|
|
AppText(
|
|
|
|
|
'${widget.myReferralPatientModel.referringDoctor}',
|
|
|
|
|
fontSize: 1.7 * SizeConfig.textMultiplier,
|
|
|
|
|
fontWeight: FontWeight.w300,
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 10,
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
bodyWidget: Container(
|
|
|
|
|
child: Column(
|
|
|
|
|
children: [
|
|
|
|
|
const Divider(
|
|
|
|
|
color: Color(0xffCCCCCC),
|
|
|
|
|
height: 1,
|
|
|
|
|
thickness: 2,
|
|
|
|
|
indent: 0,
|
|
|
|
|
endIndent: 0,
|
|
|
|
|
),
|
|
|
|
|
Container(
|
|
|
|
|
height: 1.8 * SizeConfig.textMultiplier * 6,
|
|
|
|
|
padding:
|
|
|
|
|
EdgeInsets.only(left: 16, top: 0, right: 8, bottom: 0),
|
|
|
|
|
child: Expanded(
|
|
|
|
|
child: Row(
|
|
|
|
|
children: [
|
|
|
|
|
Expanded(
|
|
|
|
|
child: Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 8,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
Container(
|
|
|
|
|
margin: EdgeInsets.only(
|
|
|
|
|
left: 4, top: 2.5, right: 2.5, bottom: 2.5),
|
|
|
|
|
padding: EdgeInsets.all(5),
|
|
|
|
|
child: Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
AppText(
|
|
|
|
|
TranslationBase.of(context)
|
|
|
|
|
.referralDoctor,
|
|
|
|
|
fontSize: 1.7 * SizeConfig.textMultiplier,
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 5,
|
|
|
|
|
),
|
|
|
|
|
AppText(
|
|
|
|
|
widget.myReferralPatientModel
|
|
|
|
|
.referringClinicDescription,
|
|
|
|
|
fontSize: 1.7 * SizeConfig.textMultiplier,
|
|
|
|
|
fontWeight: FontWeight.w300,
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
SizedBox(
|
|
|
|
|
child: AppText(
|
|
|
|
|
TranslationBase.of(context).referralDoctor,
|
|
|
|
|
fontSize: 1.9 * SizeConfig.textMultiplier,
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
textAlign: TextAlign.start,
|
|
|
|
|
color: Colors.black,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
]),
|
|
|
|
|
TableRow(children: [
|
|
|
|
|
Container(
|
|
|
|
|
margin: EdgeInsets.all(2.5),
|
|
|
|
|
padding: EdgeInsets.all(5),
|
|
|
|
|
child: Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
AppText(
|
|
|
|
|
TranslationBase.of(context)
|
|
|
|
|
.referringClinic,
|
|
|
|
|
fontSize: 1.7 * SizeConfig.textMultiplier,
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 5,
|
|
|
|
|
),
|
|
|
|
|
AppText(
|
|
|
|
|
'${widget.myReferralPatientModel.referringClinicDescription}',
|
|
|
|
|
fontSize: 1.7 * SizeConfig.textMultiplier,
|
|
|
|
|
fontWeight: FontWeight.w300,
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 4,
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
child: AppText(
|
|
|
|
|
'${widget.myReferralPatientModel.referringDoctorName}',
|
|
|
|
|
fontSize: 1.7 * SizeConfig.textMultiplier,
|
|
|
|
|
fontWeight: FontWeight.normal,
|
|
|
|
|
textAlign: TextAlign.start,
|
|
|
|
|
color: Colors.black,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 8,
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
Padding(
|
|
|
|
|
padding: const EdgeInsets.symmetric(horizontal: 8),
|
|
|
|
|
child: SizedBox(
|
|
|
|
|
child: Container(
|
|
|
|
|
color: Color(0xffCCCCCC),
|
|
|
|
|
),
|
|
|
|
|
Container(
|
|
|
|
|
margin: EdgeInsets.only(
|
|
|
|
|
left: 4, top: 2.5, right: 2.5, bottom: 2.5),
|
|
|
|
|
padding: EdgeInsets.all(5),
|
|
|
|
|
child: Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
AppText(
|
|
|
|
|
TranslationBase.of(context).frequency,
|
|
|
|
|
fontSize: 1.7 * SizeConfig.textMultiplier,
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 5,
|
|
|
|
|
),
|
|
|
|
|
AppText(
|
|
|
|
|
widget.myReferralPatientModel
|
|
|
|
|
.frequencyDescription,
|
|
|
|
|
fontSize: 1.7 * SizeConfig.textMultiplier,
|
|
|
|
|
fontWeight: FontWeight.w300,
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
width: 1,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
Expanded(
|
|
|
|
|
child: Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 8,
|
|
|
|
|
),
|
|
|
|
|
)
|
|
|
|
|
]),
|
|
|
|
|
TableRow(
|
|
|
|
|
SizedBox(
|
|
|
|
|
child: AppText(
|
|
|
|
|
TranslationBase.of(context).referringClinic,
|
|
|
|
|
fontSize: 1.9 * SizeConfig.textMultiplier,
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
textAlign: TextAlign.start,
|
|
|
|
|
color: Colors.black,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 4,
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
child: AppText(
|
|
|
|
|
'${widget.myReferralPatientModel.referringClinicDescription}',
|
|
|
|
|
fontSize: 1.7 * SizeConfig.textMultiplier,
|
|
|
|
|
fontWeight: FontWeight.normal,
|
|
|
|
|
textAlign: TextAlign.start,
|
|
|
|
|
color: Colors.black,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 8,
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
const Divider(
|
|
|
|
|
color: Color(0xffCCCCCC),
|
|
|
|
|
height: 1,
|
|
|
|
|
thickness: 2,
|
|
|
|
|
indent: 0,
|
|
|
|
|
endIndent: 0,
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 10,
|
|
|
|
|
),
|
|
|
|
|
Container(
|
|
|
|
|
height: 1.8 * SizeConfig.textMultiplier * 6,
|
|
|
|
|
padding:
|
|
|
|
|
EdgeInsets.only(left: 16, top: 0, right: 8, bottom: 0),
|
|
|
|
|
child: Expanded(
|
|
|
|
|
child: Row(
|
|
|
|
|
children: [
|
|
|
|
|
Expanded(
|
|
|
|
|
child: Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
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: 8,
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
child: AppText(
|
|
|
|
|
TranslationBase.of(context).frequency,
|
|
|
|
|
fontSize: 1.9 * SizeConfig.textMultiplier,
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
textAlign: TextAlign.start,
|
|
|
|
|
color: Colors.black,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
Container(
|
|
|
|
|
margin: EdgeInsets.only(
|
|
|
|
|
left: 4,
|
|
|
|
|
top: 2.5,
|
|
|
|
|
right: 2.5,
|
|
|
|
|
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,
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 4,
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
child: AppText(
|
|
|
|
|
'${widget.myReferralPatientModel.frequencyDescription}',
|
|
|
|
|
fontSize: 1.7 * SizeConfig.textMultiplier,
|
|
|
|
|
fontWeight: FontWeight.normal,
|
|
|
|
|
textAlign: TextAlign.start,
|
|
|
|
|
color: Colors.black,
|
|
|
|
|
),
|
|
|
|
|
)
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 8,
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
Divider(
|
|
|
|
|
color: Color(0xFF000000),
|
|
|
|
|
height: 0.5,
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 5,
|
|
|
|
|
),
|
|
|
|
|
Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
AppText(
|
|
|
|
|
TranslationBase.of(context)
|
|
|
|
|
.clinicDetailsandRemarks,
|
|
|
|
|
fontSize: 1.7 * SizeConfig.textMultiplier,
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
textAlign: TextAlign.start,
|
|
|
|
|
),
|
|
|
|
|
Padding(
|
|
|
|
|
padding: const EdgeInsets.symmetric(horizontal: 8),
|
|
|
|
|
child: SizedBox(
|
|
|
|
|
child: Container(
|
|
|
|
|
color: Color(0xffCCCCCC),
|
|
|
|
|
),
|
|
|
|
|
width: 1,
|
|
|
|
|
),
|
|
|
|
|
Texts(
|
|
|
|
|
'${widget.myReferralPatientModel.referringDoctorRemarks}',
|
|
|
|
|
style: "bodyText1",
|
|
|
|
|
readMore: true,
|
|
|
|
|
textAlign: TextAlign.start,
|
|
|
|
|
maxLength: 100)
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 5,
|
|
|
|
|
),
|
|
|
|
|
AppText(
|
|
|
|
|
TranslationBase.of(context).answerSuggestions,
|
|
|
|
|
fontSize: 1.7 * SizeConfig.textMultiplier,
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
textAlign: TextAlign.start,
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 5,
|
|
|
|
|
),
|
|
|
|
|
Form(
|
|
|
|
|
key: _formKey,
|
|
|
|
|
child: TextFields(
|
|
|
|
|
controller:answerController,
|
|
|
|
|
|
|
|
|
|
maxLines: 2,
|
|
|
|
|
minLines: 2,
|
|
|
|
|
hintText:
|
|
|
|
|
TranslationBase.of(context).answerThePatient,
|
|
|
|
|
fontWeight: FontWeight.normal,
|
|
|
|
|
readOnly: _isLoading,
|
|
|
|
|
validator: (value) {
|
|
|
|
|
if (value.isEmpty)
|
|
|
|
|
return TranslationBase.of(context)
|
|
|
|
|
.pleaseEnterAnswer;
|
|
|
|
|
else
|
|
|
|
|
return null;
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
SizedBox(height: 10.0),
|
|
|
|
|
SizedBox(height: 10.0),
|
|
|
|
|
Container(
|
|
|
|
|
width: double.infinity,
|
|
|
|
|
margin: EdgeInsets.only(left: 10, right: 10),
|
|
|
|
|
child: Button(
|
|
|
|
|
onTap: () async {
|
|
|
|
|
final form = _formKey.currentState;
|
|
|
|
|
if (form.validate()) {
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
await widget.model
|
|
|
|
|
.replay(answerController.text.toString(),
|
|
|
|
|
widget.myReferralPatientModel);
|
|
|
|
|
// TODO: Add Translation
|
|
|
|
|
DrAppToastMsg.showSuccesToast(
|
|
|
|
|
'Reply Successfully');
|
|
|
|
|
} catch (e) {
|
|
|
|
|
DrAppToastMsg.showErrorToast(e);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
title: TranslationBase.of(context).replay,
|
|
|
|
|
loading: widget.model.state == ViewState.BusyLocal,
|
|
|
|
|
Expanded(
|
|
|
|
|
child: Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 8,
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
child: AppText(
|
|
|
|
|
TranslationBase.of(context).maxResponseTime,
|
|
|
|
|
fontSize: 1.9 * SizeConfig.textMultiplier,
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
textAlign: TextAlign.start,
|
|
|
|
|
color: Colors.black,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 4,
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
child: AppText(
|
|
|
|
|
'${DateFormat('dd/MM/yyyy').format(widget.myReferralPatientModel.mAXResponseTime)}',
|
|
|
|
|
fontSize: 1.7 * SizeConfig.textMultiplier,
|
|
|
|
|
fontWeight: FontWeight.normal,
|
|
|
|
|
textAlign: TextAlign.start,
|
|
|
|
|
color: Colors.black,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 8,
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
const Divider(
|
|
|
|
|
color: Color(0xffCCCCCC),
|
|
|
|
|
height: 1,
|
|
|
|
|
thickness: 2,
|
|
|
|
|
indent: 0,
|
|
|
|
|
endIndent: 0,
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 10,
|
|
|
|
|
),
|
|
|
|
|
Container(
|
|
|
|
|
padding:
|
|
|
|
|
EdgeInsets.only(left: 16, top: 0, right: 8, bottom: 0),
|
|
|
|
|
child: Expanded(
|
|
|
|
|
child: Row(
|
|
|
|
|
children: [
|
|
|
|
|
Expanded(
|
|
|
|
|
child: Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 8,
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
child: AppText(
|
|
|
|
|
TranslationBase.of(context)
|
|
|
|
|
.clinicDetailsandRemarks,
|
|
|
|
|
fontSize: 1.9 * SizeConfig.textMultiplier,
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
textAlign: TextAlign.start,
|
|
|
|
|
color: Colors.black,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 4,
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
child: AppText(
|
|
|
|
|
'${widget.myReferralPatientModel.referringDoctorRemarks}',
|
|
|
|
|
fontSize: 1.7 * SizeConfig.textMultiplier,
|
|
|
|
|
fontWeight: FontWeight.normal,
|
|
|
|
|
textAlign: TextAlign.start,
|
|
|
|
|
color: Colors.black,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 8,
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
const Divider(
|
|
|
|
|
color: Color(0xffCCCCCC),
|
|
|
|
|
height: 1,
|
|
|
|
|
thickness: 2,
|
|
|
|
|
indent: 0,
|
|
|
|
|
endIndent: 0,
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 10,
|
|
|
|
|
),
|
|
|
|
|
Container(
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
padding: EdgeInsets.all(8),
|
|
|
|
|
child: Form(
|
|
|
|
|
key: _formKey,
|
|
|
|
|
child: TextFields(
|
|
|
|
|
controller: answerController,
|
|
|
|
|
maxLines: 3,
|
|
|
|
|
minLines: 2,
|
|
|
|
|
hintText: TranslationBase.of(context).answerThePatient,
|
|
|
|
|
fontWeight: FontWeight.normal,
|
|
|
|
|
readOnly: _isLoading,
|
|
|
|
|
validator: (value) {
|
|
|
|
|
if (value.isEmpty)
|
|
|
|
|
return TranslationBase.of(context)
|
|
|
|
|
.pleaseEnterAnswer;
|
|
|
|
|
else
|
|
|
|
|
return null;
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
Container(
|
|
|
|
|
width: double.infinity,
|
|
|
|
|
margin: EdgeInsets.only(left: 10, right: 10),
|
|
|
|
|
child: Button(
|
|
|
|
|
onTap: () async {
|
|
|
|
|
final form = _formKey.currentState;
|
|
|
|
|
if (form.validate()) {
|
|
|
|
|
try {
|
|
|
|
|
await widget.model.replay(
|
|
|
|
|
answerController.text.toString(),
|
|
|
|
|
widget.myReferralPatientModel);
|
|
|
|
|
DrAppToastMsg.showSuccesToast(
|
|
|
|
|
TranslationBase.of(context).replySuccessfully);
|
|
|
|
|
} catch (e) {
|
|
|
|
|
DrAppToastMsg.showErrorToast(e);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
title: TranslationBase.of(context).replay,
|
|
|
|
|
loading: widget.model.state == ViewState.BusyLocal,
|
|
|
|
|
),
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
isExpand: widget.isExpand,
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|