|
|
|
@ -9,11 +9,12 @@ import 'package:flutter/cupertino.dart';
|
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/extensions/string_extensions.dart';
|
|
|
|
|
import 'package:provider/provider.dart';
|
|
|
|
|
import 'package:rating_bar/rating_bar.dart';
|
|
|
|
|
|
|
|
|
|
class DoctorCard extends StatelessWidget {
|
|
|
|
|
final String name;
|
|
|
|
|
final String subName;
|
|
|
|
|
final double rat;
|
|
|
|
|
final double rating;
|
|
|
|
|
final DateTime date;
|
|
|
|
|
final String profileUrl;
|
|
|
|
|
final String billNo;
|
|
|
|
@ -22,10 +23,23 @@ class DoctorCard extends StatelessWidget {
|
|
|
|
|
final bool isInOutPatient;
|
|
|
|
|
final bool isLiveCareAppointment;
|
|
|
|
|
final bool isSortByClinic;
|
|
|
|
|
final String appoTime;
|
|
|
|
|
final String appointmentTime;
|
|
|
|
|
final bool isParentAppointment;
|
|
|
|
|
|
|
|
|
|
DoctorCard(
|
|
|
|
|
{this.name, this.subName, this.rat, this.date, this.profileUrl, this.isSortByClinic = true, this.billNo, this.onTap, this.onEmailTap, this.isInOutPatient, this.isLiveCareAppointment = false, this.appoTime});
|
|
|
|
|
{this.name,
|
|
|
|
|
this.subName,
|
|
|
|
|
this.rating,
|
|
|
|
|
this.date,
|
|
|
|
|
this.profileUrl,
|
|
|
|
|
this.isSortByClinic = true,
|
|
|
|
|
this.billNo,
|
|
|
|
|
this.onTap,
|
|
|
|
|
this.onEmailTap,
|
|
|
|
|
this.isInOutPatient,
|
|
|
|
|
this.isLiveCareAppointment = false,
|
|
|
|
|
this.appointmentTime,
|
|
|
|
|
this.isParentAppointment = false});
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
@ -108,7 +122,7 @@ class DoctorCard extends StatelessWidget {
|
|
|
|
|
),
|
|
|
|
|
Text(
|
|
|
|
|
// DateUtil.formatDateToTime(date),
|
|
|
|
|
appoTime,
|
|
|
|
|
appointmentTime,
|
|
|
|
|
style: TextStyle(fontSize: 14, fontWeight: FontWeight.w600, color: Color(0xff575757), letterSpacing: -0.48, height: 18 / 12),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
@ -132,8 +146,24 @@ class DoctorCard extends StatelessWidget {
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
myRichText(isSortByClinic ? TranslationBase.of(context).hospital : TranslationBase.of(context).clinic + ":", subName),
|
|
|
|
|
myRichText(TranslationBase.of(context).invoiceNo, billNo ?? ""),
|
|
|
|
|
//if (rat != null) StarRating(totalAverage: rat, forceStars: true),
|
|
|
|
|
if (rating == null) myRichText(TranslationBase.of(context).invoiceNo, billNo ?? ""),
|
|
|
|
|
if (rating != null)
|
|
|
|
|
Row(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
|
mainAxisSize: MainAxisSize.max,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
RatingBar.readOnly(
|
|
|
|
|
initialRating: rating,
|
|
|
|
|
size: 16.0,
|
|
|
|
|
filledColor: Color(0XFFD02127),
|
|
|
|
|
emptyColor: Color(0XFFD02127),
|
|
|
|
|
isHalfAllowed: true,
|
|
|
|
|
halfFilledIcon: Icons.star_half,
|
|
|
|
|
filledIcon: Icons.star,
|
|
|
|
|
emptyIcon: Icons.star_border,
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|