|
|
|
|
@ -1,4 +1,5 @@
|
|
|
|
|
import 'package:diplomaticquarterapp/core/model/labs/patient_lab_orders.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/models/header_model.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
|
|
|
|
|
@ -8,6 +9,7 @@ import 'package:diplomaticquarterapp/widgets/dialogs/confirm_send_email_dialog.d
|
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/extensions/string_extensions.dart';
|
|
|
|
|
import 'package:flutter_svg/flutter_svg.dart';
|
|
|
|
|
import 'package:provider/provider.dart';
|
|
|
|
|
import 'package:rating_bar/rating_bar.dart';
|
|
|
|
|
|
|
|
|
|
class DoctorHeader extends StatelessWidget {
|
|
|
|
|
@ -30,10 +32,12 @@ class DoctorHeader extends StatelessWidget {
|
|
|
|
|
this.onRatingAndReviewTap})
|
|
|
|
|
: super(key: key);
|
|
|
|
|
|
|
|
|
|
ProjectViewModel projectViewModel;
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
|
String _speciality = (headerModel?.speciality ?? []).length > 0 ? headerModel.speciality.first : "";
|
|
|
|
|
|
|
|
|
|
projectViewModel = Provider.of(context);
|
|
|
|
|
return Container(
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
child: Column(
|
|
|
|
|
@ -62,8 +66,8 @@ class DoctorHeader extends StatelessWidget {
|
|
|
|
|
_speciality,
|
|
|
|
|
style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff2E303A), letterSpacing: -0.48, height: 18 / 12),
|
|
|
|
|
),
|
|
|
|
|
headerModel.invoiceNo.isNotEmpty ? myRichText(TranslationBase.of(context).invoiceNo + ":", headerModel.invoiceNo) : Container(),
|
|
|
|
|
myRichText(TranslationBase.of(context).branch, headerModel.projectName),
|
|
|
|
|
headerModel.invoiceNo.isNotEmpty ? myRichText(TranslationBase.of(context).invoiceNo + ":", headerModel.invoiceNo, projectViewModel.isArabic) : Container(),
|
|
|
|
|
myRichText(TranslationBase.of(context).branch, headerModel.projectName, projectViewModel.isArabic),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
@ -73,7 +77,7 @@ class DoctorHeader extends StatelessWidget {
|
|
|
|
|
children: [
|
|
|
|
|
if (headerModel.date != null)
|
|
|
|
|
Text(
|
|
|
|
|
DateUtil.formatDateToDate(headerModel.date),
|
|
|
|
|
DateUtil.formatDateToDate(headerModel.date, projectViewModel.isArabic),
|
|
|
|
|
style: TextStyle(fontSize: 14, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.48, height: 18 / 12),
|
|
|
|
|
),
|
|
|
|
|
if (headerModel.time != null)
|
|
|
|
|
@ -84,7 +88,7 @@ class DoctorHeader extends StatelessWidget {
|
|
|
|
|
if (headerModel?.nationalityFlagURL != null)
|
|
|
|
|
Padding(
|
|
|
|
|
padding: const EdgeInsets.only(top: 8.0),
|
|
|
|
|
child: Image.network(headerModel.nationalityFlagURL ?? "", height: 16),
|
|
|
|
|
child: Image.network(headerModel.nationalityFlagURL ?? "", height: 20),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
)
|
|
|
|
|
@ -139,7 +143,7 @@ class DoctorHeader extends StatelessWidget {
|
|
|
|
|
},
|
|
|
|
|
child: Container(
|
|
|
|
|
padding: EdgeInsets.only(top: 10, bottom: 10, right: 21, left: 15),
|
|
|
|
|
decoration: BoxDecoration(color: Color(0XFFD02127), borderRadius: BorderRadius.only(topLeft: Radius.circular(10))),
|
|
|
|
|
decoration: BoxDecoration(color: Color(0XFFD02127), borderRadius: projectViewModel.isArabic ? BorderRadius.only(topRight: Radius.circular(10)) : BorderRadius.only(topLeft: Radius.circular(10))),
|
|
|
|
|
child: Row(
|
|
|
|
|
mainAxisSize: MainAxisSize.min,
|
|
|
|
|
children: [
|
|
|
|
|
@ -147,7 +151,7 @@ class DoctorHeader extends StatelessWidget {
|
|
|
|
|
SizedBox(width: 6),
|
|
|
|
|
Text(
|
|
|
|
|
buttonTitle == null ? TranslationBase.of(context).sendEmail : buttonTitle,
|
|
|
|
|
style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Colors.white, letterSpacing: -0.64, height: 25 / 16),
|
|
|
|
|
style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Colors.white, letterSpacing: -0.64, height: 1),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
|