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.
diplomatic-quarter/lib/pages/BookAppointment/SearchResults.dart

69 lines
2.7 KiB
Dart

import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/widgets/DoctorView.dart';
// import 'package:diplomaticquarterapp/services/robo_search/event_provider.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/others/app_expandable_notifier.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/material.dart';
class SearchResults extends StatefulWidget {
List<DoctorList> doctorsList = [];
List<PatientDoctorAppointmentList> patientDoctorAppointmentListHospital;
bool isLiveCareAppointment;
SearchResults(
{@required this.doctorsList, this.patientDoctorAppointmentListHospital, @required this.isLiveCareAppointment});
@override
_SearchResultsState createState() => _SearchResultsState();
}
class _SearchResultsState extends State<SearchResults> {
// var event = RobotProvider();
List<DoctorList> tempList = [];
@override
Widget build(BuildContext context) {
return AppScaffold(
appBarTitle: TranslationBase.of(context).bookAppo,
isShowAppBar: true,
isShowDecPage: false,
body: Container(
margin: EdgeInsets.all(10.0),
child: SingleChildScrollView(
physics: BouncingScrollPhysics(),
child: Column(
children: <Widget>[
...List.generate(
widget.patientDoctorAppointmentListHospital.length,
(index) => AppExpandableNotifier(
// isExpand: index == 0 ? true : false,
title: widget.patientDoctorAppointmentListHospital[index]
.filterName +
" - " +
widget.patientDoctorAppointmentListHospital[index]
.distanceInKMs +
" " +
TranslationBase.of(context).km,
bodyWidget: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: widget
.patientDoctorAppointmentListHospital[index]
.patientDoctorAppointmentList
.map((doctor) {
return DoctorView(
doctor: doctor,
isLiveCareAppointment: widget.isLiveCareAppointment,
);
}).toList(),
)),
)
],
),
),
),
);
}
}