You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
83 lines
3.0 KiB
Dart
83 lines
3.0 KiB
Dart
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
|
|
import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart';
|
|
import 'package:diplomaticquarterapp/models/Appointments/OBGyneProcedureListResponse.dart';
|
|
import 'package:diplomaticquarterapp/pages/BookAppointment/widgets/DoctorView.dart';
|
|
import 'package:diplomaticquarterapp/uitl/utils_new.dart';
|
|
import 'package:flutter/material.dart';
|
|
import 'package:provider/provider.dart';
|
|
|
|
class ResultByDoctor extends StatefulWidget {
|
|
List<DoctorList> doctorsList = [];
|
|
List<DoctorList>? patientDoctorAppointmentListHospital;
|
|
final bool isLiveCareAppointment;
|
|
final bool isObGyneAppointment;
|
|
final bool isDoctorNameSearch;
|
|
final bool isDoctorSearchResult;
|
|
final OBGyneProcedureListResponse? obGyneProcedureListResponse;
|
|
ResultByDoctor(
|
|
{required this.doctorsList,
|
|
required this.patientDoctorAppointmentListHospital,
|
|
required this.isLiveCareAppointment,
|
|
required this.isObGyneAppointment,
|
|
required this.isDoctorNameSearch,
|
|
required this.isDoctorSearchResult,
|
|
this.obGyneProcedureListResponse,
|
|
});
|
|
|
|
@override
|
|
State<ResultByDoctor> createState() => _ResultByDoctorState();
|
|
}
|
|
|
|
class _ResultByDoctorState extends State<ResultByDoctor> {
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return SizedBox(
|
|
child: widget.patientDoctorAppointmentListHospital?.isNotEmpty == true
|
|
? Padding(
|
|
padding: const EdgeInsets.all(12.0),
|
|
child: ListView.separated(
|
|
addAutomaticKeepAlives: true,
|
|
physics: BouncingScrollPhysics(),
|
|
separatorBuilder: (context, index) {
|
|
return Material(
|
|
color: Color(0xFFf5f5f5),
|
|
child: SizedBox(
|
|
height: 12,
|
|
),
|
|
);
|
|
},
|
|
itemBuilder: (context, index) {
|
|
final doctor =
|
|
widget.patientDoctorAppointmentListHospital![index];
|
|
|
|
return DoctorView(
|
|
doctor: doctor,
|
|
isLiveCareAppointment: widget.isLiveCareAppointment,
|
|
isObGyneAppointment: widget.isObGyneAppointment,
|
|
isDoctorNameSearch: widget.isDoctorNameSearch,
|
|
obGyneProcedureListResponse:
|
|
widget.obGyneProcedureListResponse,
|
|
isShowDate: false,
|
|
onTap: () {
|
|
context
|
|
.read<ProjectViewModel>()
|
|
.analytics
|
|
.appointment
|
|
.book_appointment_select_doctor(
|
|
appointment_type: 'regular', doctor: doctor);
|
|
});
|
|
},
|
|
itemCount:
|
|
widget.patientDoctorAppointmentListHospital?.length ?? 0,
|
|
),
|
|
)
|
|
: getNoDataWidget(context),
|
|
);
|
|
}
|
|
|
|
@override
|
|
void dispose() {
|
|
super.dispose();
|
|
}
|
|
}
|