fix DoctorView.dart UI issues

merge-update-with-lab-changes
Mohammad Aljammal 6 years ago
parent 91e5a20fd0
commit ef4a57223c

@ -373,5 +373,9 @@ const Map<String, Map<String, String>> localizedValues = {
"building":{"en":"Building:","ar":"المبنى"}, "building":{"en":"Building:","ar":"المبنى"},
"branch":{"en":"Branch:","ar":"الفرع"}, "branch":{"en":"Branch:","ar":"الفرع"},
"emergencyServices":{"en":"Emergency Services:","ar":"خدمات الطوارئ"}, "emergencyServices":{"en":"Emergency Services:","ar":"خدمات الطوارئ"},
"textToSpeech": {"en": "How May I Help You?", "ar": "كيف يمكنني مساعدتك؟"} "textToSpeech": {"en": "How May I Help You?", "ar": "كيف يمكنني مساعدتك؟"},
"MyAppointments": {"en": "My Appointments", "ar": "مواعيدي"},
"NoBookedAppointments": {"en": "No Booked Appointments", "ar": "لا توجد مواعيد محجوزة"},
"NoConfirmedAppointments": {"en": "No Confirmed Appointments", "ar": "لا توجد مواعيد مؤكدة"},
"noArrivedAppointments": {"en": "No Arrived Appointments", "ar": "لم تصل المواعيد"},
}; };

@ -36,9 +36,7 @@ class BaseAppClient {
body['SetupID'] = body.containsKey('SetupID') body['SetupID'] = body.containsKey('SetupID')
? body['SetupID'] != null ? body['SetupID'] : SETUP_ID ? body['SetupID'] != null ? body['SetupID'] : SETUP_ID
: SETUP_ID; : SETUP_ID;
body['VersionID'] = body.containsKey('VersionID') body['VersionID'] = VERSION_ID;
? body['VersionID'] != null ? body['VersionID'] : VERSION_ID
: VERSION_ID;
body['Channel'] = CHANNEL; body['Channel'] = CHANNEL;
body['LanguageID'] = languageID == 'ar' ? 1 : 2; body['LanguageID'] = languageID == 'ar' ? 1 : 2;
body['IPAdress'] = IP_ADDRESS; body['IPAdress'] = IP_ADDRESS;

@ -6,10 +6,12 @@ import 'package:diplomaticquarterapp/core/model/doctor/reques_patient_doctor_app
import 'package:diplomaticquarterapp/core/model/doctor/request_doctor_profile.dart'; import 'package:diplomaticquarterapp/core/model/doctor/request_doctor_profile.dart';
import 'package:diplomaticquarterapp/core/model/doctor/request_doctor_rating.dart'; import 'package:diplomaticquarterapp/core/model/doctor/request_doctor_rating.dart';
import 'package:diplomaticquarterapp/core/service/base_service.dart'; import 'package:diplomaticquarterapp/core/service/base_service.dart';
import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart';
class MyDoctorService extends BaseService { class MyDoctorService extends BaseService {
List<PatientDoctorAppointment> patientDoctorAppointmentList = List(); List<PatientDoctorAppointment> patientDoctorAppointmentList = List();
DoctorProfile doctorProfile; DoctorProfile doctorProfile;
DoctorList doctorList;
DoctorRating doctorRating = DoctorRating(); DoctorRating doctorRating = DoctorRating();
RequestPatientDoctorAppointment patientDoctorAppointmentRequest = RequestPatientDoctorAppointment patientDoctorAppointmentRequest =
@ -58,7 +60,6 @@ class MyDoctorService extends BaseService {
} }
RequestDoctorProfile _requestDoctorProfile = RequestDoctorProfile( RequestDoctorProfile _requestDoctorProfile = RequestDoctorProfile(
doctorID: 2477,
license: true, license: true,
isRegistered: true, isRegistered: true,
projectID: 12, projectID: 12,
@ -79,11 +80,18 @@ class MyDoctorService extends BaseService {
///GET DOCTOR PROFILE ///GET DOCTOR PROFILE
_requestDoctorProfile.doctorID = doctorId; _requestDoctorProfile.doctorID = doctorId;
_requestDoctorProfile.clinicID = clinicID; _requestDoctorProfile.clinicID = clinicID;
_requestDoctorProfile.patientID = projectID; _requestDoctorProfile.projectID = projectID;
hasError = false; hasError = false;
await baseAppClient.post(GET_DOCTOR_PROFILE, await baseAppClient.post(GET_DOCTOR_PROFILE,
onSuccess: (dynamic response, int statusCode) { onSuccess: (dynamic response, int statusCode) {
doctorProfile = DoctorProfile.fromJson(response['DoctorProfileList'][0]); doctorProfile = DoctorProfile.fromJson(response['DoctorProfileList'][0]);
doctorList = DoctorList.fromJson(response['DoctorProfileList'][0]);
doctorList.clinicName = doctorProfile.clinicDescription;
doctorList.doctorTitle = doctorProfile.doctorTitleForProfile;
doctorList.name = doctorProfile.doctorName;
doctorList.projectName = doctorProfile.projectName;
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
hasError = true; hasError = true;
super.error = error; super.error = error;

@ -4,6 +4,7 @@ import 'package:diplomaticquarterapp/core/model/doctor/doctor_profile.dart';
import 'package:diplomaticquarterapp/core/model/doctor/doctor_rating.dart'; import 'package:diplomaticquarterapp/core/model/doctor/doctor_rating.dart';
import 'package:diplomaticquarterapp/core/model/doctor/patient_doctor_appointment.dart'; import 'package:diplomaticquarterapp/core/model/doctor/patient_doctor_appointment.dart';
import 'package:diplomaticquarterapp/core/service/medical/my_doctor_service.dart'; import 'package:diplomaticquarterapp/core/service/medical/my_doctor_service.dart';
import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart';
import '../../../locator.dart'; import '../../../locator.dart';
import '../base_view_model.dart'; import '../base_view_model.dart';
@ -22,6 +23,9 @@ class MyDoctorViewModel extends BaseViewModel {
? _patientDoctorAppointmentListClinic ? _patientDoctorAppointmentListClinic
: _patientDoctorAppointmentListHospital; : _patientDoctorAppointmentListHospital;
DoctorList get doctorList=> _myDoctorService.doctorList;
DoctorProfile get doctorProfile => _myDoctorService.doctorProfile; DoctorProfile get doctorProfile => _myDoctorService.doctorProfile;
DoctorRating get doctorRating => _myDoctorService.doctorRating; DoctorRating get doctorRating => _myDoctorService.doctorRating;
@ -83,7 +87,7 @@ class MyDoctorViewModel extends BaseViewModel {
notifyListeners(); notifyListeners();
} }
void getDoctorProfileAndRating({int doctorId,int clinicID,int projectID }) async { Future getDoctorProfileAndRating({int doctorId,int clinicID,int projectID }) async {
setState(ViewState.Busy); setState(ViewState.Busy);
await _myDoctorService.getDoctorProfileAndRating(doctorId: doctorId,clinicID: clinicID,projectID: projectID); await _myDoctorService.getDoctorProfileAndRating(doctorId: doctorId,clinicID: clinicID,projectID: projectID);
if (_myDoctorService.hasError) { if (_myDoctorService.hasError) {

@ -1,3 +1,5 @@
import 'package:intl/intl.dart';
class DoctorList { class DoctorList {
int clinicID; int clinicID;
String clinicName; String clinicName;
@ -41,44 +43,44 @@ class DoctorList {
DoctorList( DoctorList(
{this.clinicID, {this.clinicID,
this.clinicName, this.clinicName,
this.doctorTitle, this.doctorTitle,
this.iD, this.iD,
this.name, this.name,
this.projectID, this.projectID,
this.projectName, this.projectName,
this.actualDoctorRate, this.actualDoctorRate,
this.clinicRoomNo, this.clinicRoomNo,
this.date, this.date,
this.dayName, this.dayName,
this.doctorID, this.doctorID,
this.doctorImageURL, this.doctorImageURL,
this.doctorProfile, this.doctorProfile,
this.doctorProfileInfo, this.doctorProfileInfo,
this.doctorRate, this.doctorRate,
this.gender, this.gender,
this.genderDescription, this.genderDescription,
this.isAppointmentAllowed, this.isAppointmentAllowed,
this.isDoctorAllowVedioCall, this.isDoctorAllowVedioCall,
this.isDoctorDummy, this.isDoctorDummy,
this.isLiveCare, this.isLiveCare,
this.latitude, this.latitude,
this.longitude, this.longitude,
this.nationalityFlagURL, this.nationalityFlagURL,
this.nationalityID, this.nationalityID,
this.nationalityName, this.nationalityName,
this.nearestFreeSlot, this.nearestFreeSlot,
this.noOfPatientsRate, this.noOfPatientsRate,
this.originalClinicID, this.originalClinicID,
this.personRate, this.personRate,
this.projectDistanceInKiloMeters, this.projectDistanceInKiloMeters,
this.qR, this.qR,
this.qRString, this.qRString,
this.rateNumber, this.rateNumber,
this.serviceID, this.serviceID,
this.setupID, this.setupID,
this.speciality, this.speciality,
this.workingHours}); this.workingHours});
DoctorList.fromJson(Map<String, dynamic> json) { DoctorList.fromJson(Map<String, dynamic> json) {
clinicID = json['ClinicID']; clinicID = json['ClinicID'];
@ -118,7 +120,8 @@ class DoctorList {
rateNumber = json['RateNumber']; rateNumber = json['RateNumber'];
serviceID = json['ServiceID']; serviceID = json['ServiceID'];
setupID = json['SetupID']; setupID = json['SetupID'];
speciality = json['Speciality'].cast<String>(); if (json.containsKey('Speciality'))
speciality = json['Speciality'].cast<String>();
workingHours = json['WorkingHours']; workingHours = json['WorkingHours'];
} }
@ -166,3 +169,13 @@ class DoctorList {
return data; return data;
} }
} }
class DoctorListAppointmentList {
String filterName = "";
List<DoctorList> patientDoctorAppointmentList = List();
DoctorListAppointmentList(
{this.filterName, DoctorList patientDoctorAppointment}) {
patientDoctorAppointmentList.add(patientDoctorAppointment);
}
}

@ -9,7 +9,7 @@ import 'package:smart_progress_bar/smart_progress_bar.dart';
import '../DoctorProfile.dart'; import '../DoctorProfile.dart';
class DoctorView extends StatelessWidget { class DoctorView extends StatelessWidget {
DoctorList doctor; final DoctorList doctor;
DoctorView({@required this.doctor}); DoctorView({@required this.doctor});
@ -33,69 +33,77 @@ class DoctorView extends StatelessWidget {
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
children: <Widget>[ children: <Widget>[
ClipRRect( Expanded(
borderRadius: BorderRadius.circular(100.0), flex: 1,
child: Image.network(this.doctor.doctorImageURL, child: ClipRRect(
fit: BoxFit.fill, height: 60.0, width: 60.0), borderRadius: BorderRadius.circular(100.0),
child: Image.network(this.doctor.doctorImageURL,
fit: BoxFit.fill, height: 60.0, width: 60.0),
),
), ),
Container( Expanded(
width: MediaQuery.of(context).size.width * 0.6, flex: 4,
margin: EdgeInsets.fromLTRB(20.0, 10.0, 10.0, 0.0), child: Container(
child: Column( width: MediaQuery.of(context).size.width * 0.6,
crossAxisAlignment: CrossAxisAlignment.start, margin: EdgeInsets.fromLTRB(20.0, 10.0, 10.0, 0.0),
children: <Widget>[ child: Column(
Text(this.doctor.doctorTitle + " " + this.doctor.name, crossAxisAlignment: CrossAxisAlignment.start,
style: TextStyle( children: <Widget>[
fontSize: 14.0, if(doctor.doctorTitle!=null)
color: Colors.grey[700], Text(this.doctor.doctorTitle + " " + this.doctor.name,
letterSpacing: 1.0)),
Container(
margin: EdgeInsets.only(top: 3.0),
child: Text(this.doctor.clinicName,
style: TextStyle(
fontSize: 12.0,
color: Colors.grey[600],
letterSpacing: 1.0)),
),
Container(
margin: EdgeInsets.only(top: 3.0),
child: Text(this.doctor.projectName,
style: TextStyle(
fontSize: 12.0,
color: Colors.grey[600],
letterSpacing: 1.0)),
),
Container(
margin: EdgeInsets.only(top: 3.0, bottom: 3.0),
child: Text(
getDoctorSpeciality(this.doctor.speciality).trim(),
style: TextStyle( style: TextStyle(
fontSize: 12.0, fontSize: 14.0,
color: Colors.grey[600], color: Colors.grey[700],
letterSpacing: 1.0)), letterSpacing: 1.0)),
), Container(
Row( margin: EdgeInsets.only(top: 3.0),
mainAxisAlignment: MainAxisAlignment.spaceBetween, child: Text(this.doctor.clinicName,
mainAxisSize: MainAxisSize.max, style: TextStyle(
children: <Widget>[ fontSize: 12.0,
RatingBar.readOnly( color: Colors.grey[600],
initialRating: letterSpacing: 1.0)),
this.doctor.actualDoctorRate.toDouble(), ),
size: 20.0, Container(
filledColor: Colors.yellow[700], margin: EdgeInsets.only(top: 3.0),
emptyColor: Colors.grey[500], child: Text(this.doctor.projectName,
isHalfAllowed: true, style: TextStyle(
halfFilledIcon: Icons.star_half, fontSize: 12.0,
filledIcon: Icons.star, color: Colors.grey[600],
emptyIcon: Icons.star, letterSpacing: 1.0)),
), ),
Container( if(doctor.speciality!=null)
child: Image.network(this.doctor.nationalityFlagURL, Container(
width: 25.0, height: 25.0), margin: EdgeInsets.only(top: 3.0, bottom: 3.0),
), child: Text(
], getDoctorSpeciality(this.doctor.speciality).trim(),
), style: TextStyle(
], fontSize: 12.0,
color: Colors.grey[600],
letterSpacing: 1.0)),
),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
mainAxisSize: MainAxisSize.max,
children: <Widget>[
RatingBar.readOnly(
initialRating:
this.doctor.actualDoctorRate.toDouble(),
size: 20.0,
filledColor: Colors.yellow[700],
emptyColor: Colors.grey[500],
isHalfAllowed: true,
halfFilledIcon: Icons.star_half,
filledIcon: Icons.star,
emptyIcon: Icons.star,
),
Container(
child: Image.network(this.doctor.nationalityFlagURL,
width: 25.0, height: 25.0),
),
],
),
],
),
), ),
), ),
], ],

@ -36,7 +36,7 @@ class _MyAppointmentsState extends State<MyAppointments>
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return AppScaffold( return AppScaffold(
appBarTitle: "My Appointments", appBarTitle: TranslationBase.of(context).myAppointments,
isShowAppBar: true, isShowAppBar: true,
body: Container( body: Container(
child: Column(children: [ child: Column(children: [
@ -158,7 +158,7 @@ class _MyAppointmentsState extends State<MyAppointments>
"assets/images/new-design/noAppointmentIcon.png"), "assets/images/new-design/noAppointmentIcon.png"),
Container( Container(
margin: EdgeInsets.only(top: 10.0), margin: EdgeInsets.only(top: 10.0),
child: Text("No Booked Appointments", child: Text(TranslationBase.of(context).noBookedAppointments,
style: TextStyle( style: TextStyle(
fontSize: 16.0, fontSize: 16.0,
)), )),
@ -192,7 +192,7 @@ class _MyAppointmentsState extends State<MyAppointments>
Image.asset("assets/images/new-design/noAppointmentIcon.png"), Image.asset("assets/images/new-design/noAppointmentIcon.png"),
Container( Container(
margin: EdgeInsets.only(top: 10.0), margin: EdgeInsets.only(top: 10.0),
child: Text("No Confirmed Appointments", child: Text(TranslationBase.of(context).noConfirmedAppointments ,
style: TextStyle( style: TextStyle(
fontSize: 16.0, fontSize: 16.0,
)), )),
@ -225,7 +225,7 @@ class _MyAppointmentsState extends State<MyAppointments>
Image.asset("assets/images/new-design/noAppointmentIcon.png"), Image.asset("assets/images/new-design/noAppointmentIcon.png"),
Container( Container(
margin: EdgeInsets.only(top: 10.0), margin: EdgeInsets.only(top: 10.0),
child: Text("No Arrived Appointments", child: Text(TranslationBase.of(context).noArrivedAppointments,
style: TextStyle( style: TextStyle(
fontSize: 16.0, fontSize: 16.0,
)), )),

@ -154,8 +154,8 @@ class _HomePageState extends State<HomePage> {
), ),
Align( Align(
alignment: projectViewModel.isArabic alignment: projectViewModel.isArabic
? Alignment.bottomLeft ? Alignment.bottomRight
: Alignment.bottomRight, : Alignment.bottomLeft,
child: InkWell( child: InkWell(
onTap: () { onTap: () {
widget.goToMyProfile(); widget.goToMyProfile();

@ -1,5 +1,7 @@
import 'package:diplomaticquarterapp/core/enum/filter_type.dart'; import 'package:diplomaticquarterapp/core/enum/filter_type.dart';
import 'package:diplomaticquarterapp/core/viewModels/medical/my_doctor_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/medical/my_doctor_view_model.dart';
import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/widgets/DoctorView.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/widgets/data_display/medical/doctor_card.dart'; import 'package:diplomaticquarterapp/widgets/data_display/medical/doctor_card.dart';
@ -75,16 +77,40 @@ class DoctorHomePage extends StatelessWidget {
children: model.patientDoctorAppointmentList[index] children: model.patientDoctorAppointmentList[index]
.patientDoctorAppointmentList .patientDoctorAppointmentList
.map((doctor) { .map((doctor) {
return InkWell( DoctorList doctorList = DoctorList(
onTap: () { projectID: doctor.projectID,
Navigator.push( setupID: doctor.setupID,
context, clinicID: doctor.clinicID,
FadePage( projectName: doctor.projectName,
page: DoctorProfilePage( clinicName: doctor.clinicName,
patientDoctorAppointment: doctor, actualDoctorRate: doctor.actualDoctorRate,
), doctorID: doctor.doctorID,
), doctorRate: doctor.doctorRate,
); gender: doctor.gender,
doctorTitle: doctor.doctorTitle,
name: doctor.doctorName,
doctorImageURL: doctor.doctorImageURL,
nationalityFlagURL:doctor.nationalityFlagURL
);
return DoctorView(doctor: doctorList,);/* InkWell(
onTap: () async {
model
.getDoctorProfileAndRating(
doctorId: doctor.doctorID,
clinicID: doctor.clinicID,
projectID: doctor.projectID)
.then((value) {
var asd="";
Navigator.push(
context,
FadePage(
page: DoctorView(doctor: model.doctorList,),
),
);
}).catchError((e){
var asd="";
});
}, },
child: DoctorCard( child: DoctorCard(
name: doctor.doctorName, name: doctor.doctorName,
@ -93,7 +119,7 @@ class DoctorHomePage extends StatelessWidget {
subName: DateUtil.getMonthDayYearDateFormatted( subName: DateUtil.getMonthDayYearDateFormatted(
doctor.appointmentDate), doctor.appointmentDate),
), ),
); )*/;
}).toList(), }).toList(),
)), )),
) )

@ -1,5 +1,7 @@
import 'package:diplomaticquarterapp/core/model/doctor/patient_doctor_appointment.dart'; import 'package:diplomaticquarterapp/core/model/doctor/patient_doctor_appointment.dart';
import 'package:diplomaticquarterapp/core/viewModels/medical/my_doctor_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/medical/my_doctor_view_model.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/components/DocAvailableAppointments.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/widgets/DoctorView.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
@ -35,149 +37,147 @@ class _DoctorProfilePageState extends State<DoctorProfilePage>
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return BaseView<MyDoctorViewModel>( return BaseView<MyDoctorViewModel>(
onModelReady: (model) => model.getDoctorProfileAndRating( /* onModelReady: (model) => model.getDoctorProfileAndRating(
doctorId: widget.patientDoctorAppointment.doctorID, doctorId: widget.patientDoctorAppointment.doctorID,
clinicID: widget.patientDoctorAppointment.clinicID, clinicID: widget.patientDoctorAppointment.clinicID,
projectID: widget.patientDoctorAppointment.projectID), projectID: widget.patientDoctorAppointment.projectID),*/
builder: (context, model, widget) => AppScaffold( builder: (context, model, widget) => DoctorView(doctor: model.doctorList,)/*AppScaffold(
isShowAppBar: true, isShowAppBar: true,
appBarTitle: 'Doctor Profile', appBarTitle: 'Doctor Profile',
baseViewModel: model, baseViewModel: model,
body: SingleChildScrollView( body: SingleChildScrollView(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Container(
color: Colors.white,
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
Container( Container(
color: Colors.white, margin: EdgeInsets.only(top: 20.0),
child: Column( child: Row(
crossAxisAlignment: CrossAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[ children: <Widget>[
Container( Container(
margin: EdgeInsets.only(top: 20.0), margin: EdgeInsets.all(5),
child: Row( width: 50,
mainAxisAlignment: MainAxisAlignment.spaceBetween, height: 50,
children: <Widget>[ decoration: BoxDecoration(
Container( shape: BoxShape.circle, color: Colors.grey),
margin: EdgeInsets.all(5), child: Icon(
width: 50, Icons.calendar_view_day,
height: 50, size: 25,
decoration: BoxDecoration( color: Colors.white,
shape: BoxShape.circle, )),
color: Colors.grey), ClipRRect(
child: Icon( borderRadius: BorderRadius.circular(100.0),
Icons.calendar_view_day, child: Image.network(
size: 25, patientDoctorAppointment.doctorImageURL,
color: Colors.white, fit: BoxFit.fill,
)), height: 120.0,
ClipRRect( width: 120.0),
borderRadius: BorderRadius.circular(100.0),
child: Image.network(
patientDoctorAppointment.doctorImageURL,
fit: BoxFit.fill,
height: 120.0,
width: 120.0),
),
Container(
margin: EdgeInsets.all(5),
width: 50,
height: 50,
decoration: BoxDecoration(
shape: BoxShape.circle,
color: Colors.grey),
child: Icon(
Icons.format_list_bulleted,
size: 25,
color: Colors.white,
)),
],
),
), ),
Container( Container(
margin: EdgeInsets.only(top: 10.0), margin: EdgeInsets.all(5),
alignment: Alignment.center, width: 50,
child: Text(patientDoctorAppointment.doctorName, height: 50,
style: TextStyle( decoration: BoxDecoration(
fontSize: 20.0, shape: BoxShape.circle, color: Colors.grey),
color: Colors.grey[900], child: Icon(
letterSpacing: 1.0)), Icons.format_list_bulleted,
), size: 25,
Container( color: Colors.white,
margin: EdgeInsets.only(top: 10.0), )),
alignment: Alignment.center, ],
child: Text(patientDoctorAppointment.clinicName, ),
style: TextStyle( ),
fontSize: 12.0, Container(
color: Colors.grey[900], margin: EdgeInsets.only(top: 10.0),
letterSpacing: 1.0)), alignment: Alignment.center,
), child: Text(patientDoctorAppointment.doctorName,
Container( style: TextStyle(
margin: EdgeInsets.only(top: 5.0), fontSize: 20.0,
alignment: Alignment.center, color: Colors.grey[900],
child: RatingBar.readOnly( letterSpacing: 1.0)),
initialRating: ),
model.doctorRating.doctorRate?.toDouble() ?? Container(
0.0, margin: EdgeInsets.only(top: 10.0),
size: 35.0, alignment: Alignment.center,
filledColor: Colors.yellow[700], child: Text(patientDoctorAppointment.clinicName,
emptyColor: Colors.grey[500], style: TextStyle(
isHalfAllowed: true, fontSize: 12.0,
halfFilledIcon: Icons.star_half, color: Colors.grey[900],
filledIcon: Icons.star, letterSpacing: 1.0)),
emptyIcon: Icons.star, ),
), Container(
), margin: EdgeInsets.only(top: 5.0),
Container( alignment: Alignment.center,
margin: EdgeInsets.only(top: 5.0), child: RatingBar.readOnly(
alignment: Alignment.center, initialRating:
child: Text( model.doctorRating.doctorRate?.toDouble() ?? 0.0,
"(${model.doctorRating.patientNumber ?? 0} Reviews)", size: 35.0,
style: TextStyle( filledColor: Colors.yellow[700],
fontSize: 14.0, emptyColor: Colors.grey[500],
color: Colors.blue[800], isHalfAllowed: true,
letterSpacing: 1.0, halfFilledIcon: Icons.star_half,
decoration: TextDecoration.underline, filledIcon: Icons.star,
)), emptyIcon: Icons.star,
), ),
Container( ),
margin: EdgeInsets.only(top: 10.0), Container(
child: Divider( margin: EdgeInsets.only(top: 5.0),
color: Colors.grey[500], alignment: Alignment.center,
), child: Text(
), "(${model.doctorRating.patientNumber ?? 0} Reviews)",
TabBar( style: TextStyle(
indicatorColor: Colors.red[800], fontSize: 14.0,
indicatorWeight: 3.0, color: Colors.blue[800],
tabs: [ letterSpacing: 1.0,
Tab( decoration: TextDecoration.underline,
child: Text('Doctor Information', )),
style: TextStyle(color: Colors.black))), ),
Tab( Container(
child: Text( margin: EdgeInsets.only(top: 10.0),
TranslationBase.of(context).availableAppo, child: Divider(
style: TextStyle(color: Colors.black)), color: Colors.grey[500],
) ),
], ),
controller: _tabController, TabBar(
), indicatorColor: Colors.red[800],
Container( indicatorWeight: 3.0,
height: MediaQuery.of(context).size.height * 0.8, tabs: [
child: TabBarView( Tab(
physics: BouncingScrollPhysics(), child: Text('Doctor Information',
children: [ style: TextStyle(color: Colors.black))),
DoctorInformation( Tab(
doctorProfile: model.doctorProfile, child: Text(TranslationBase.of(context).availableAppo,
), style: TextStyle(color: Colors.black)),
Container() )
], ],
controller: _tabController, controller: _tabController,
), ),
Container(
height: MediaQuery.of(context).size.height * 0.8,
child: TabBarView(
physics: BouncingScrollPhysics(),
children: [
DoctorInformation(
doctorProfile: model.doctorProfile,
), ),
Container(),
// DocAvailableAppointments(doctor: model.doctorList,)
], ],
controller: _tabController,
), ),
), ),
], ],
), ),
), ),
)); ],
),
),
)*/,
);
} }
} }

@ -450,6 +450,12 @@ class TranslationBase {
String get logs => localizedValues['logs'][locale.languageCode]; String get logs => localizedValues['logs'][locale.languageCode];
String get textToSpeech => String get textToSpeech =>
localizedValues['textToSpeech'][locale.languageCode]; localizedValues['textToSpeech'][locale.languageCode];
String get myAppointments => localizedValues['MyAppointments'][locale.languageCode];
String get noBookedAppointments => localizedValues['NoBookedAppointments'][locale.languageCode];
String get noConfirmedAppointments => localizedValues['NoConfirmedAppointments'][locale.languageCode];
String get noArrivedAppointments => localizedValues['noArrivedAppointments'][locale.languageCode];
} }
class TranslationBaseDelegate extends LocalizationsDelegate<TranslationBase> { class TranslationBaseDelegate extends LocalizationsDelegate<TranslationBase> {

Loading…
Cancel
Save