|
|
|
|
@ -2,6 +2,7 @@ import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart
|
|
|
|
|
import 'package:diplomaticquarterapp/models/Appointments/DoctorProfile.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
|
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
|
import 'package:rating_bar/rating_bar.dart';
|
|
|
|
|
import 'package:smart_progress_bar/smart_progress_bar.dart';
|
|
|
|
|
@ -39,7 +40,7 @@ class DoctorView extends StatelessWidget {
|
|
|
|
|
fit: BoxFit.fill, height: 60.0, width: 60.0),
|
|
|
|
|
),
|
|
|
|
|
Container(
|
|
|
|
|
width: MediaQuery.of(context).size.width * 0.5,
|
|
|
|
|
width: MediaQuery.of(context).size.width * 0.55,
|
|
|
|
|
margin: EdgeInsets.fromLTRB(20.0, 10.0, 10.0, 0.0),
|
|
|
|
|
child: Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
@ -74,6 +75,16 @@ class DoctorView extends StatelessWidget {
|
|
|
|
|
color: Colors.grey[600],
|
|
|
|
|
letterSpacing: 1.0)),
|
|
|
|
|
),
|
|
|
|
|
this.doctor.nearestFreeSlot != null ? Container(
|
|
|
|
|
margin: EdgeInsets.only(top: 3.0, bottom: 3.0),
|
|
|
|
|
child: Text(
|
|
|
|
|
getDate(this.doctor.nearestFreeSlot),
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
fontSize: 14.0,
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
color: Colors.green[600],
|
|
|
|
|
letterSpacing: 1.0)),
|
|
|
|
|
) : Container(),
|
|
|
|
|
Row(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
|
mainAxisSize: MainAxisSize.max,
|
|
|
|
|
@ -136,6 +147,29 @@ class DoctorView extends StatelessWidget {
|
|
|
|
|
}).showProgressBar(text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
String getDate(String date) {
|
|
|
|
|
DateTime dateObj = DateUtil.convertStringToDate(date);
|
|
|
|
|
return DateUtil.getWeekDay(dateObj.weekday) +
|
|
|
|
|
", " +
|
|
|
|
|
dateObj.day.toString() +
|
|
|
|
|
" " +
|
|
|
|
|
DateUtil.getMonth(dateObj.month) +
|
|
|
|
|
" " +
|
|
|
|
|
dateObj.year.toString() +
|
|
|
|
|
" " +
|
|
|
|
|
dateObj.hour.toString() +
|
|
|
|
|
":" +
|
|
|
|
|
getMinute(dateObj);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
String getMinute(DateTime dateObj) {
|
|
|
|
|
if(dateObj.minute == 0) {
|
|
|
|
|
return dateObj.minute.toString() + "0";
|
|
|
|
|
} else {
|
|
|
|
|
return dateObj.minute.toString();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Future navigateToDoctorProfile(context, docObject, docProfile,
|
|
|
|
|
{isAppo}) async {
|
|
|
|
|
Navigator.push(
|
|
|
|
|
|