|
|
|
@ -1,13 +1,11 @@
|
|
|
|
|
import 'package:doctor_app_flutter/config/config.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/widgets/shared/card_with_bg_widget.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/widgets/shared/user-guid/CusomRow.dart';
|
|
|
|
|
import 'package:flutter/cupertino.dart';
|
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
|
import 'package:provider/provider.dart';
|
|
|
|
|
import '../../util/helpers.dart';
|
|
|
|
|
|
|
|
|
|
class PatientReferralItemWidget extends StatelessWidget {
|
|
|
|
|
final String referralStatus;
|
|
|
|
@ -51,7 +49,6 @@ class PatientReferralItemWidget extends StatelessWidget {
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
|
ProjectViewModel projectViewModel = Provider.of(context);
|
|
|
|
|
|
|
|
|
|
return Container(
|
|
|
|
|
margin: EdgeInsets.only(left: 16.0, right: 16.0, top: 0.0),
|
|
|
|
@ -60,7 +57,8 @@ class PatientReferralItemWidget extends StatelessWidget {
|
|
|
|
|
Container(
|
|
|
|
|
child: CardWithBgWidget(
|
|
|
|
|
bgColor: referralStatusCode == 1
|
|
|
|
|
? Color(0xffc4aa54)
|
|
|
|
|
? AppGlobal.inProgressColor
|
|
|
|
|
//Color(0xffc4aa54)
|
|
|
|
|
: referralStatusCode == 2
|
|
|
|
|
? AppGlobal.appGreenColor
|
|
|
|
|
: referralStatusCode == 46
|
|
|
|
@ -81,11 +79,11 @@ class PatientReferralItemWidget extends StatelessWidget {
|
|
|
|
|
AppText(
|
|
|
|
|
referralStatus != null ? referralStatus : "",
|
|
|
|
|
fontFamily: 'Poppins',
|
|
|
|
|
fontSize: 10.0,
|
|
|
|
|
letterSpacing: -0.4,
|
|
|
|
|
fontSize: 12.0,
|
|
|
|
|
letterSpacing: -0.48,
|
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
|
color: referralStatusCode == 1
|
|
|
|
|
? Color(0xffc4aa54)
|
|
|
|
|
? AppGlobal.inProgressColor
|
|
|
|
|
: referralStatusCode == 2
|
|
|
|
|
? AppGlobal.appGreenColor
|
|
|
|
|
: referralStatusCode == 46
|
|
|
|
@ -104,11 +102,14 @@ class PatientReferralItemWidget extends StatelessWidget {
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 7,
|
|
|
|
|
),
|
|
|
|
|
Row(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
AppText(
|
|
|
|
|
patientName ?? "",
|
|
|
|
|
Helpers.convertToTitleCase(patientName ?? ""),
|
|
|
|
|
fontSize: 16.0,
|
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
|
color: Color(0xff2E303A),
|
|
|
|
@ -126,7 +127,7 @@ class PatientReferralItemWidget extends StatelessWidget {
|
|
|
|
|
: Icon(DoctorApp.female_1,
|
|
|
|
|
color: Color(0xffF0448D)),
|
|
|
|
|
SizedBox(
|
|
|
|
|
width: 4,
|
|
|
|
|
width: 50,
|
|
|
|
|
),
|
|
|
|
|
AppText(
|
|
|
|
|
referredTime ?? "",
|
|
|
|
@ -134,13 +135,12 @@ class PatientReferralItemWidget extends StatelessWidget {
|
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
|
fontSize: 12.0,
|
|
|
|
|
color: Color(0XFF575757),
|
|
|
|
|
letterSpacing: 0.48,
|
|
|
|
|
)
|
|
|
|
|
letterSpacing: -0.48,
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
Row(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.center,
|
|
|
|
|
children: [
|
|
|
|
|
Expanded(
|
|
|
|
|
child: Column(
|
|
|
|
@ -163,30 +163,34 @@ class PatientReferralItemWidget extends StatelessWidget {
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
Row(
|
|
|
|
|
children: [
|
|
|
|
|
AppText(
|
|
|
|
|
nationality != null ? nationality : "",
|
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
|
color: Color(0xFF2E303A),
|
|
|
|
|
fontSize: 10.0,
|
|
|
|
|
letterSpacing: -0.4,
|
|
|
|
|
),
|
|
|
|
|
nationalityFlag != null
|
|
|
|
|
? ClipRRect(
|
|
|
|
|
borderRadius: BorderRadius.circular(20.0),
|
|
|
|
|
child: Image.network(
|
|
|
|
|
nationalityFlag,
|
|
|
|
|
height: 25,
|
|
|
|
|
width: 30,
|
|
|
|
|
errorBuilder: (BuildContext context,
|
|
|
|
|
Object exception,
|
|
|
|
|
StackTrace stackTrace) {
|
|
|
|
|
return Text('');
|
|
|
|
|
},
|
|
|
|
|
))
|
|
|
|
|
: SizedBox()
|
|
|
|
|
],
|
|
|
|
|
Padding(
|
|
|
|
|
padding: const EdgeInsets.only(right: 0.1),
|
|
|
|
|
child: Row(
|
|
|
|
|
children: [
|
|
|
|
|
AppText(
|
|
|
|
|
nationality != null ? nationality : "",
|
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
|
color: Color(0xFF2E303A),
|
|
|
|
|
fontSize: 10.0,
|
|
|
|
|
letterSpacing: -0.4,
|
|
|
|
|
),
|
|
|
|
|
nationalityFlag != null
|
|
|
|
|
? ClipRRect(
|
|
|
|
|
borderRadius: BorderRadius.circular(20.0),
|
|
|
|
|
child: Image.network(
|
|
|
|
|
nationalityFlag,
|
|
|
|
|
height: 25,
|
|
|
|
|
width: 30,
|
|
|
|
|
errorBuilder: (BuildContext context,
|
|
|
|
|
Object exception,
|
|
|
|
|
StackTrace stackTrace) {
|
|
|
|
|
return Text('');
|
|
|
|
|
},
|
|
|
|
|
)
|
|
|
|
|
)
|
|
|
|
|
: SizedBox()
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
@ -198,7 +202,7 @@ class PatientReferralItemWidget extends StatelessWidget {
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
Container(
|
|
|
|
|
margin: EdgeInsets.only(left: 10, right: 0),
|
|
|
|
|
margin: EdgeInsets.only(left: 3, right: 0, top: 0.1),
|
|
|
|
|
child: Image.asset(
|
|
|
|
|
isReferral
|
|
|
|
|
? 'assets/images/patient/ic_ref_arrow_up.png'
|
|
|
|
@ -209,8 +213,8 @@ class PatientReferralItemWidget extends StatelessWidget {
|
|
|
|
|
),
|
|
|
|
|
Container(
|
|
|
|
|
margin: EdgeInsets.only(
|
|
|
|
|
left: 0, top: 25, right: 0, bottom: 0),
|
|
|
|
|
padding: EdgeInsets.only(left: 4.0, right: 4.0),
|
|
|
|
|
left: 0, top: 18, right: 0, bottom: 0),
|
|
|
|
|
padding: EdgeInsets.only(left: 4.0, right: 1.0),
|
|
|
|
|
child: Container(
|
|
|
|
|
width: 40,
|
|
|
|
|
height: 40,
|
|
|
|
@ -219,8 +223,8 @@ class PatientReferralItemWidget extends StatelessWidget {
|
|
|
|
|
borderRadius: BorderRadius.circular(20.0),
|
|
|
|
|
child: Image.network(
|
|
|
|
|
doctorAvatar,
|
|
|
|
|
height: 25,
|
|
|
|
|
width: 30,
|
|
|
|
|
height: 28,
|
|
|
|
|
width: 28,
|
|
|
|
|
errorBuilder: (BuildContext context,
|
|
|
|
|
Object exception,
|
|
|
|
|
StackTrace stackTrace) {
|
|
|
|
@ -241,7 +245,7 @@ class PatientReferralItemWidget extends StatelessWidget {
|
|
|
|
|
flex: 4,
|
|
|
|
|
child: Container(
|
|
|
|
|
margin: EdgeInsets.only(
|
|
|
|
|
left: 10, top: 25, right: 10, bottom: 0),
|
|
|
|
|
left: 10, top: 17, bottom: 0),
|
|
|
|
|
child: Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|