|
|
|
@ -1,14 +1,9 @@
|
|
|
|
import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart';
|
|
|
|
import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart';
|
|
|
|
import 'package:doctor_app_flutter/util/date-utils.dart';
|
|
|
|
|
|
|
|
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
|
|
|
|
|
|
|
|
import 'package:doctor_app_flutter/widgets/patients/profile/large_avatar.dart';
|
|
|
|
import 'package:doctor_app_flutter/widgets/patients/profile/large_avatar.dart';
|
|
|
|
import 'package:eva_icons_flutter/eva_icons_flutter.dart';
|
|
|
|
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:font_awesome_flutter/font_awesome_flutter.dart';
|
|
|
|
|
|
|
|
import 'package:provider/provider.dart';
|
|
|
|
import 'package:provider/provider.dart';
|
|
|
|
|
|
|
|
|
|
|
|
import 'StarRating.dart';
|
|
|
|
|
|
|
|
import 'Text.dart';
|
|
|
|
import 'Text.dart';
|
|
|
|
|
|
|
|
|
|
|
|
class DoctorCardInsurance extends StatelessWidget {
|
|
|
|
class DoctorCardInsurance extends StatelessWidget {
|
|
|
|
@ -41,141 +36,157 @@ class DoctorCardInsurance extends StatelessWidget {
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
ProjectViewModel projectViewModel = Provider.of(context);
|
|
|
|
ProjectViewModel projectViewModel = Provider.of(context);
|
|
|
|
return Container(
|
|
|
|
return Container(
|
|
|
|
|
|
|
|
width: double.maxFinite,
|
|
|
|
|
|
|
|
height: 160,
|
|
|
|
margin: EdgeInsets.all(10),
|
|
|
|
margin: EdgeInsets.all(10),
|
|
|
|
|
|
|
|
padding: EdgeInsets.only(left: 0, right: 5, bottom: 5, top: 5),
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
border: Border(
|
|
|
|
borderRadius: BorderRadius.circular(15),
|
|
|
|
left: BorderSide(
|
|
|
|
|
|
|
|
color: approvalStatus == "Approved"
|
|
|
|
|
|
|
|
? Color(0xff359846)
|
|
|
|
|
|
|
|
: Color(0xffD02127),
|
|
|
|
|
|
|
|
width: 3.5),
|
|
|
|
|
|
|
|
top: BorderSide(color: Colors.white, width: 0.5),
|
|
|
|
|
|
|
|
bottom: BorderSide(color: Colors.white, width: 0.5),
|
|
|
|
|
|
|
|
right: BorderSide(color: Colors.white, width: 0.5),
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
color: Colors.white,
|
|
|
|
color: Colors.white,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
child: Padding(
|
|
|
|
child: Container(
|
|
|
|
padding: const EdgeInsets.all(15.0),
|
|
|
|
child: Row(
|
|
|
|
child: InkWell(
|
|
|
|
mainAxisAlignment: MainAxisAlignment.start,
|
|
|
|
onTap: onTap,
|
|
|
|
children: [
|
|
|
|
child: Column(
|
|
|
|
Container(
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
height: 160,
|
|
|
|
children: <Widget>[
|
|
|
|
width: 5,
|
|
|
|
Row(
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
borderRadius: BorderRadius.only(
|
|
|
|
children: [
|
|
|
|
topLeft: Radius.circular(10),
|
|
|
|
Texts(
|
|
|
|
bottomLeft: Radius.circular(10),
|
|
|
|
"$approvalStatus",
|
|
|
|
),
|
|
|
|
color: approvalStatus == "Approved"
|
|
|
|
color: approvalStatus == "Approved" ? Color(0xff359846) : Color(0xffD02127),
|
|
|
|
? Color(0xff359846)
|
|
|
|
|
|
|
|
: Color(0xffD02127),
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
Container(
|
|
|
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
|
|
|
borderRadius: BorderRadius.all(
|
|
|
|
|
|
|
|
Radius.circular(25.0),
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
color: Color(0xff2E303A)),
|
|
|
|
|
|
|
|
child: Padding(
|
|
|
|
|
|
|
|
padding: const EdgeInsets.all(5.0),
|
|
|
|
|
|
|
|
child: Texts(
|
|
|
|
|
|
|
|
'$patientOut'.replaceAll(" ", ""),
|
|
|
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
|
|
|
fontSize: 13.0,
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
Row(
|
|
|
|
|
|
|
|
children: [
|
|
|
|
|
|
|
|
Expanded(
|
|
|
|
|
|
|
|
child: Texts(
|
|
|
|
|
|
|
|
doctorName,
|
|
|
|
|
|
|
|
bold: true,
|
|
|
|
|
|
|
|
)),
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Row(
|
|
|
|
),
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.end,
|
|
|
|
Expanded(
|
|
|
|
children: <Widget>[
|
|
|
|
child: Container(
|
|
|
|
Container(
|
|
|
|
padding: EdgeInsets.only(
|
|
|
|
child: LargeAvatar(
|
|
|
|
left: projectViewModel.isArabic ? 0 : 15,
|
|
|
|
name: doctorName,
|
|
|
|
right: projectViewModel.isArabic ? 15 : 0),
|
|
|
|
url: profileUrl,
|
|
|
|
child: InkWell(
|
|
|
|
),
|
|
|
|
onTap: onTap,
|
|
|
|
width: 55,
|
|
|
|
child: Column(
|
|
|
|
height: 55,
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
),
|
|
|
|
children: <Widget>[
|
|
|
|
Expanded(
|
|
|
|
Row(
|
|
|
|
flex: 4,
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
child: Container(
|
|
|
|
children: [
|
|
|
|
margin: EdgeInsets.all(10),
|
|
|
|
Texts(
|
|
|
|
child: Column(
|
|
|
|
"$approvalStatus",
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
color: approvalStatus == "Approved"
|
|
|
|
children: <Widget>[
|
|
|
|
? Color(0xff359846)
|
|
|
|
if (orderNo != null && !isPrescriptions)
|
|
|
|
: Color(0xffD02127),
|
|
|
|
Row(
|
|
|
|
),
|
|
|
|
children: <Widget>[
|
|
|
|
Container(
|
|
|
|
Texts(
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
'order No:',
|
|
|
|
borderRadius: BorderRadius.all(
|
|
|
|
color: Colors.grey[500],
|
|
|
|
Radius.circular(25.0),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Texts(
|
|
|
|
color: Color(0xff2E303A)),
|
|
|
|
orderNo ?? '',
|
|
|
|
child: Padding(
|
|
|
|
)
|
|
|
|
padding: const EdgeInsets.all(5.0),
|
|
|
|
],
|
|
|
|
child: Texts(
|
|
|
|
|
|
|
|
'$patientOut',
|
|
|
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
|
|
|
fontSize: 13.0,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
if (invoiceNO != null && !isPrescriptions)
|
|
|
|
),
|
|
|
|
Row(
|
|
|
|
)
|
|
|
|
children: <Widget>[
|
|
|
|
],
|
|
|
|
Texts(
|
|
|
|
),
|
|
|
|
'Invoice:',
|
|
|
|
Row(
|
|
|
|
color: Colors.grey[500],
|
|
|
|
children: [
|
|
|
|
),
|
|
|
|
Expanded(
|
|
|
|
Texts(
|
|
|
|
child: Texts(
|
|
|
|
invoiceNO,
|
|
|
|
doctorName,
|
|
|
|
)
|
|
|
|
bold: true,
|
|
|
|
],
|
|
|
|
)),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
if (isPrescriptions)
|
|
|
|
),
|
|
|
|
Row(
|
|
|
|
Row(
|
|
|
|
children: <Widget>[
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.end,
|
|
|
|
Texts(
|
|
|
|
children: <Widget>[
|
|
|
|
'Clinic: ',
|
|
|
|
Container(
|
|
|
|
color: Colors.grey[500],
|
|
|
|
child: LargeAvatar(
|
|
|
|
),
|
|
|
|
name: doctorName,
|
|
|
|
Expanded(
|
|
|
|
url: profileUrl,
|
|
|
|
child: Texts(
|
|
|
|
),
|
|
|
|
clinic,
|
|
|
|
width: 55,
|
|
|
|
),
|
|
|
|
height: 55,
|
|
|
|
)
|
|
|
|
),
|
|
|
|
],
|
|
|
|
Expanded(
|
|
|
|
),
|
|
|
|
flex: 4,
|
|
|
|
if (branch != null)
|
|
|
|
child: Container(
|
|
|
|
Row(
|
|
|
|
margin: EdgeInsets.all(10),
|
|
|
|
children: <Widget>[
|
|
|
|
child: Column(
|
|
|
|
Texts(
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
'Approval No: ',
|
|
|
|
children: <Widget>[
|
|
|
|
color: Colors.grey[500],
|
|
|
|
if (orderNo != null && !isPrescriptions)
|
|
|
|
),
|
|
|
|
Row(
|
|
|
|
Texts(
|
|
|
|
children: <Widget>[
|
|
|
|
branch,
|
|
|
|
Texts(
|
|
|
|
)
|
|
|
|
'order No:',
|
|
|
|
],
|
|
|
|
color: Colors.grey[500],
|
|
|
|
)
|
|
|
|
),
|
|
|
|
]),
|
|
|
|
Texts(
|
|
|
|
),
|
|
|
|
orderNo ?? '',
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
if (invoiceNO != null && !isPrescriptions)
|
|
|
|
|
|
|
|
Row(
|
|
|
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
|
|
|
Texts(
|
|
|
|
|
|
|
|
'Invoice:',
|
|
|
|
|
|
|
|
color: Colors.grey[500],
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
Texts(
|
|
|
|
|
|
|
|
invoiceNO,
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
if (isPrescriptions)
|
|
|
|
|
|
|
|
Row(
|
|
|
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
|
|
|
Texts(
|
|
|
|
|
|
|
|
'Clinic: ',
|
|
|
|
|
|
|
|
color: Colors.grey[500],
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
Expanded(
|
|
|
|
|
|
|
|
child: Texts(
|
|
|
|
|
|
|
|
clinic,
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
if (branch != null)
|
|
|
|
|
|
|
|
Row(
|
|
|
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
|
|
|
Texts(
|
|
|
|
|
|
|
|
'Approval No: ',
|
|
|
|
|
|
|
|
color: Colors.grey[500],
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
Texts(
|
|
|
|
|
|
|
|
branch,
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
]),
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
Icon(
|
|
|
|
|
|
|
|
EvaIcons.eye,
|
|
|
|
|
|
|
|
size: 38.0,
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Icon(
|
|
|
|
),
|
|
|
|
EvaIcons.eye,
|
|
|
|
|
|
|
|
size: 38.0,
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
);
|
|
|
|
);
|
|
|
|
|