You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
222 lines
8.9 KiB
Dart
222 lines
8.9 KiB
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/widgets/patients/profile/large_avatar.dart';
|
|
import 'package:eva_icons_flutter/eva_icons_flutter.dart';
|
|
import 'package:flutter/cupertino.dart';
|
|
import 'package:flutter/material.dart';
|
|
import 'package:provider/provider.dart';
|
|
import 'Text.dart';
|
|
|
|
class DoctorCardInsurance extends StatelessWidget {
|
|
final String doctorName;
|
|
final String branch;
|
|
final DateTime appointmentDate;
|
|
final String profileUrl;
|
|
final String invoiceNO;
|
|
final String orderNo;
|
|
final Function onTap;
|
|
final bool isPrescriptions;
|
|
final String clinic;
|
|
final String approvalStatus;
|
|
final String patientOut;
|
|
final String branch2;
|
|
|
|
DoctorCardInsurance(
|
|
{this.doctorName,
|
|
this.branch,
|
|
this.profileUrl,
|
|
this.invoiceNO,
|
|
this.onTap,
|
|
this.appointmentDate,
|
|
this.orderNo,
|
|
this.isPrescriptions = false,
|
|
this.clinic,
|
|
this.approvalStatus,
|
|
this.patientOut,
|
|
this.branch2});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
ProjectViewModel projectViewModel = Provider.of(context);
|
|
return Container(
|
|
width: double.maxFinite,
|
|
height: 160,
|
|
margin: EdgeInsets.all(10),
|
|
padding: EdgeInsets.only(left: 0, right: 5, bottom: 5, top: 5),
|
|
decoration: BoxDecoration(
|
|
borderRadius: BorderRadius.circular(15),
|
|
color: Colors.white,
|
|
),
|
|
child: Container(
|
|
child: Row(
|
|
mainAxisAlignment: MainAxisAlignment.start,
|
|
children: [
|
|
Container(
|
|
height: 160,
|
|
width: 5,
|
|
decoration: BoxDecoration(
|
|
borderRadius: BorderRadius.only(
|
|
topLeft: Radius.circular(10),
|
|
bottomLeft: Radius.circular(10),
|
|
),
|
|
color: approvalStatus == "Approved"
|
|
? Color(0xff359846)
|
|
: Color(0xffD02127),
|
|
),
|
|
),
|
|
Expanded(
|
|
child: Container(
|
|
padding: EdgeInsets.only(
|
|
left: projectViewModel.isArabic ? 0 : 15,
|
|
right: projectViewModel.isArabic ? 15 : 0),
|
|
child: InkWell(
|
|
onTap: onTap,
|
|
child: Column(
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
children: <Widget>[
|
|
Row(
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
children: [
|
|
Texts(
|
|
"$approvalStatus",
|
|
color: approvalStatus == "Approved"
|
|
? 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,
|
|
fontWeight: FontWeight.w700,
|
|
)),
|
|
],
|
|
),
|
|
Row(
|
|
crossAxisAlignment: CrossAxisAlignment.center,
|
|
children: <Widget>[
|
|
Container(
|
|
child: LargeAvatar(
|
|
name: doctorName,
|
|
url: profileUrl,
|
|
),
|
|
width: 55,
|
|
height: 55,
|
|
),
|
|
Expanded(
|
|
flex: 4,
|
|
child: Container(
|
|
margin: EdgeInsets.all(10),
|
|
child: Column(
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
children: <Widget>[
|
|
if (orderNo != null && !isPrescriptions)
|
|
Row(
|
|
children: <Widget>[
|
|
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: ',
|
|
//fontWeight: FontWeight.w600,
|
|
//color: Colors.grey[500],
|
|
),
|
|
Expanded(
|
|
child: Texts(
|
|
clinic,
|
|
fontWeight: FontWeight.w700,
|
|
fontSize: 15.0,
|
|
),
|
|
)
|
|
],
|
|
),
|
|
if (branch2 != null)
|
|
Row(
|
|
children: <Widget>[
|
|
Texts(
|
|
'Branch:',
|
|
//color: Colors.grey[500],
|
|
),
|
|
Texts(
|
|
branch2,
|
|
fontWeight: FontWeight.w700,
|
|
fontSize: 15.0,
|
|
)
|
|
],
|
|
),
|
|
Row(
|
|
children: <Widget>[
|
|
Texts(
|
|
'Approval No: ',
|
|
//color: Colors.grey[500],
|
|
),
|
|
Texts(
|
|
branch,
|
|
fontWeight: FontWeight.w700,
|
|
fontSize: 15.0,
|
|
)
|
|
],
|
|
),
|
|
]),
|
|
),
|
|
),
|
|
Padding(
|
|
padding:
|
|
const EdgeInsets.symmetric(horizontal: 15.0),
|
|
child: Icon(
|
|
DoctorApp.view,
|
|
size: 22.0,
|
|
),
|
|
)
|
|
],
|
|
),
|
|
],
|
|
),
|
|
),
|
|
),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|