|
|
|
@ -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);
|
|
|
|
|
// });
|
|
|
|
|
// });
|
|
|
|
|
// }
|
|
|
|
|
}
|
|
|
|
|