Booking appointment Marge

merge-requests/390/head
Mirza.Shafique 3 years ago
parent 363cf78884
commit ebf293736d

@ -5,6 +5,7 @@ import 'package:diplomaticquarterapp/models/Appointments/DoctorRateDetails.dart'
import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart';
import 'package:diplomaticquarterapp/models/header_model.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/doctor_post_pre_images_page.dart';
import 'package:diplomaticquarterapp/pages/MyAppointments/SchedulePage.dart';
import 'package:diplomaticquarterapp/routes.dart';
import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart';
import 'package:diplomaticquarterapp/services/robo_search/event_provider.dart';
@ -115,7 +116,12 @@ class _DoctorProfileState extends State<DoctorProfile> with TickerProviderStateM
widget.doctor.noOfPatientsRate,
"",
),
onTap: () {},
showConfirmMessageDialog: false,
onTap: () {
if (widget.isOpenAppt) {
Navigator.push(context, FadePage(page: SchedulePage(widget.doctor)));
}
},
onRatingAndReviewTap: () {
getDoctorRatingsDetails();
},

@ -24,7 +24,7 @@ class DoctorView extends StatelessWidget {
Widget build(BuildContext context) {
return InkWell(
onTap: () {
if (isShowFlag) getDoctorsProfile(context, doctor);
if (isShowFlag) getDoctorsProfile(context, doctor,isAppo: true);
},
child: Container(
decoration: BoxDecoration(

@ -16,6 +16,7 @@ class SchedulePage extends StatefulWidget {
final DoctorList doctorList;
SchedulePage(this.doctorList);
@override
_SchedulePageState createState() => _SchedulePageState();
}
@ -27,11 +28,7 @@ class _SchedulePageState extends State<SchedulePage> {
int selectedindex = 0;
bool isLoading = true;
List<DoctorScheduleResponse> doctorScheduleResponse = [];
final List<Widget> introWidgetsList = <Widget>[
Text('Hello'),
Text('Hi'),
Text('hey')
];
final List<Widget> introWidgetsList = <Widget>[Text('Hello'), Text('Hi'), Text('hey')];
@override
void initState() {
@ -70,29 +67,13 @@ class _SchedulePageState extends State<SchedulePage> {
child: ListView.builder(
itemCount: model.getDoctorScheduleList.length,
itemBuilder: (context, index) => ClipRRect(
borderRadius: const BorderRadius.all(
Radius.circular(20.0)),
borderRadius: const BorderRadius.all(Radius.circular(20.0)),
child: Container(
padding: EdgeInsets.only(
left: 10,
right: 10,
top: 20,
bottom: 20),
margin: EdgeInsets.only(
left: 20,
right: 20,
top: 7,
bottom: 7),
decoration: BoxDecoration(
boxShadow: [
BoxShadow(
color: Colors.green,
offset: Offset(-10, 0)),
],
borderRadius:
const BorderRadius.all(
Radius.circular(10.0)),
color: Colors.white),
padding: EdgeInsets.only(left: 10, right: 10, top: 20, bottom: 20),
margin: EdgeInsets.only(left: 20, right: 20, top: 7, bottom: 7),
decoration: BoxDecoration(boxShadow: [
BoxShadow(color: Colors.green, offset: Offset(-10, 0)),
], borderRadius: const BorderRadius.all(Radius.circular(10.0)), color: Colors.white),
child: Row(
children: [
Expanded(
@ -100,26 +81,16 @@ class _SchedulePageState extends State<SchedulePage> {
Column(
children: [
Texts(
model
.getDoctorScheduleList[
index]
.dayName,
color:
HexColor('#0bb690'),
model.getDoctorScheduleList[index].dayName,
color: HexColor('#0bb690'),
),
Texts(
DateUtil
.getDayMonthYearDateFormatted(
DateUtil
.convertStringToDate(
model
.getDoctorScheduleList[
index]
.date,
DateUtil.getDayMonthYearDateFormatted(
DateUtil.convertStringToDate(
model.getDoctorScheduleList[index].date,
),
),
color:
HexColor('#0bb690'),
color: HexColor('#0bb690'),
)
],
)
@ -127,10 +98,7 @@ class _SchedulePageState extends State<SchedulePage> {
),
Expanded(
child: Texts(
model
.getDoctorScheduleList[
index]
.workingHours,
model.getDoctorScheduleList[index].workingHours,
color: HexColor('#0bb690'),
),
)
@ -147,17 +115,17 @@ class _SchedulePageState extends State<SchedulePage> {
))));
}
//getSchedule(DoctorList doctor, BuildContext context) {
//GifLoaderDialogUtils.showMyDialog(context);
//service = new DoctorsListService();
// service.getSchedule(doctor).then((value) {
// doctorScheduleResponse.clear();
// setState(() {
// value['List_DoctorWorkingHoursTable'].forEach((item) => {
// doctorScheduleResponse.add(DoctorScheduleResponse.fromJson(item))
// });
// GifLoaderDialogUtils.hideDialog(context);
// });
// });
// }
//getSchedule(DoctorList doctor, BuildContext context) {
//GifLoaderDialogUtils.showMyDialog(context);
//service = new DoctorsListService();
// service.getSchedule(doctor).then((value) {
// doctorScheduleResponse.clear();
// setState(() {
// value['List_DoctorWorkingHoursTable'].forEach((item) => {
// doctorScheduleResponse.add(DoctorScheduleResponse.fromJson(item))
// });
// GifLoaderDialogUtils.hideDialog(context);
// });
// });
// }
}

Loading…
Cancel
Save