Merge branch 'refferd_page' into 'development'

fix my referred widget

See merge request Cloud_Solution/doctor_app_flutter!186
pull/188/head
Elham 5 years ago
commit 01f6f1f36b

@ -8,7 +8,7 @@ import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/shared/Text.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';
@ -35,279 +35,276 @@ class _MyReferredPatientWidgetState extends State<MyReferredPatientWidget> {
@override
Widget build(BuildContext context) {
return CardWithBgWidgetNew(
widget: Container(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[
AppText(
'${widget.myReferredPatientModel.firstName} ${widget.myReferredPatientModel.lastName}',
fontSize: 2.5 * SizeConfig.textMultiplier,
fontWeight: FontWeight.bold,
),
InkWell(
return Container(
width: double.infinity,
margin: EdgeInsets.symmetric(horizontal: 16, vertical: 10),
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: Container(
margin: EdgeInsets.all(10),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[
AppText(
'${widget.myReferredPatientModel.firstName} ${widget.myReferredPatientModel.lastName}',
fontSize: 2.5 * SizeConfig.textMultiplier,
fontWeight: FontWeight.bold,
),
InkWell(
onTap: () {
setState(() {
_showDetails = !_showDetails;
});
},
child: Icon(_showDetails
? Icons.keyboard_arrow_up
: Icons.keyboard_arrow_down)),
],
child: Image.asset(
"assets/images/ic_circle_arrow.png",
width: 25,
height: 25,
color: Colors.black,
),
),
],
),
),
!_showDetails
? Container()
: AnimatedContainer(
duration: Duration(milliseconds: 200),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
SizedBox(
height: 5,
),
Divider(
color: Color(0xFF000000),
height: 0.5,
),
Table(
border: TableBorder.symmetric(
inside: BorderSide(width: 0.5),
),
children: [
TableRow(children: [
Container(
margin: EdgeInsets.all(2.5),
padding: EdgeInsets.all(5),
decoration: BoxDecoration(),
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: <Widget>[
AppText(
TranslationBase.of(context).fileNo,
fontSize:
1.7 * SizeConfig.textMultiplier,
fontWeight: FontWeight.bold,
),
AppText(
'${widget.myReferredPatientModel.patientId}',
fontSize:
1.7 * SizeConfig.textMultiplier,
fontWeight: FontWeight.w300,
)
],
),
),
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,
),
Texts(
widget.myReferredPatientModel
.referralDoctorName,
maxLength: 80,
readMore: true,
),
],
),
),
]),
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,
),
AppText(
'${widget.myReferredPatientModel.referralClinicDescription}',
fontSize: 1.7 *
SizeConfig.textMultiplier,
fontWeight: FontWeight.w300,
)
],
),
),
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,
),
AppText(
widget.myReferredPatientModel
.frequencyDescription,
fontSize: 1.7 *
SizeConfig.textMultiplier,
fontWeight: FontWeight.w300,
)
],
),
)
],
bodyWidget: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
SizedBox(
height: 5,
),
Divider(
color: Color(0xFF000000),
height: 0.5,
),
Table(
border: TableBorder.symmetric(
inside: BorderSide(width: 0.5),
),
children: [
TableRow(children: [
Container(
margin: EdgeInsets.all(2.5),
padding: EdgeInsets.all(5),
decoration: BoxDecoration(),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
AppText(
TranslationBase.of(context).fileNo,
fontSize: 1.7 * SizeConfig.textMultiplier,
fontWeight: FontWeight.bold,
),
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,
),
AppText(
'${widget.myReferredPatientModel.priorityDescription}',
fontSize:
1.7 * SizeConfig.textMultiplier,
fontWeight: FontWeight.w300,
)
],
),
),
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,
),
AppText(
Helpers.getDateFormatted(widget
.myReferredPatientModel
.maxResponseTime),
fontSize:
1.7 * SizeConfig.textMultiplier,
fontWeight: FontWeight.w300,
)
],
),
)
])
AppText(
'${widget.myReferredPatientModel.patientId}',
fontSize: 1.7 * SizeConfig.textMultiplier,
fontWeight: FontWeight.w300,
)
],
),
Divider(
color: Color(0xFF000000),
height: 0.5,
),
SizedBox(
height: 5,
),
AppText(
TranslationBase.of(context).clinicDetailsandRemarks,
fontSize: 1.7 * SizeConfig.textMultiplier,
fontWeight: FontWeight.bold,
textAlign: TextAlign.start,
),
SizedBox(
height: 5,
),
Texts(
'${widget.myReferredPatientModel.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,
),
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,
),
Texts(
widget.myReferredPatientModel
.referralDoctorName,
maxLength: 80,
readMore: true,
),
],
),
Texts(
'${widget.myReferredPatientModel.referredDoctorRemarks}',
style: "bodyText1",
readMore: true,
textAlign: TextAlign.start,
maxLength: 100),
SizedBox(
height: 5,
),
]),
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,
),
AppText(
'${widget.myReferredPatientModel.referralClinicDescription}',
fontSize: 1.7 * SizeConfig.textMultiplier,
fontWeight: FontWeight.w300,
)
],
),
),
SizedBox(height: 10.0),
Container(
width: double.infinity,
child: Button(
onTap: () async {
try {
await widget.model.verify(widget.myReferredPatientModel);
DrAppToastMsg.showSuccesToast('Verify Successfully');
} catch (e) {
DrAppToastMsg.showErrorToast(e);
}
},
title: TranslationBase.of(context).verify,
loading: widget.model.state == ViewState.BusyLocal,
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,
),
AppText(
widget.myReferredPatientModel
.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,
),
AppText(
'${widget.myReferredPatientModel.priorityDescription}',
fontSize: 1.7 * SizeConfig.textMultiplier,
fontWeight: FontWeight.w300,
)
],
),
),
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,
),
AppText(
Helpers.getDateFormatted(widget
.myReferredPatientModel.maxResponseTime),
fontSize: 1.7 * SizeConfig.textMultiplier,
fontWeight: FontWeight.w300,
)
],
),
)
])
],
),
)
],
),
Divider(
color: Color(0xFF000000),
height: 0.5,
),
SizedBox(
height: 5,
),
Container(
margin: EdgeInsets.all(10),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
AppText(
TranslationBase.of(context).clinicDetailsandRemarks,
fontSize: 1.7 * SizeConfig.textMultiplier,
fontWeight: FontWeight.bold,
textAlign: TextAlign.start,
),
SizedBox(
height: 5,
),
Texts(
'${widget.myReferredPatientModel.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,
),
Texts(
'${widget.myReferredPatientModel.referredDoctorRemarks}',
style: "bodyText1",
readMore: true,
textAlign: TextAlign.start,
maxLength: 100),
],
),
),
SizedBox(
height: 5,
),
SizedBox(height: 10.0),
Container(
margin: EdgeInsets.all(10),
width: double.infinity,
child: Button(
onTap: () async {
try {
await widget.model
.verify(widget.myReferredPatientModel);
DrAppToastMsg.showSuccesToast(
'Verify Successfully');
} catch (e) {
DrAppToastMsg.showErrorToast(e);
}
},
title: TranslationBase.of(context).verify,
loading: widget.model.state == ViewState.BusyLocal,
),
)
],
)
],
),
isExpand: _showDetails,
)
],
),
);
}

Loading…
Cancel
Save