|
|
|
@ -1,6 +1,7 @@
|
|
|
|
|
import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/health-calculator/Bariatrics-viewmodel.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
|
|
|
|
|
import 'package:flutter/cupertino.dart';
|
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
@ -24,106 +25,100 @@ class DoctorList extends StatelessWidget {
|
|
|
|
|
body: ListView.builder(
|
|
|
|
|
itemCount: model.doctorLists.length,
|
|
|
|
|
itemBuilder: (BuildContext context, int index) {
|
|
|
|
|
return ExpansionTile(
|
|
|
|
|
title: Text(model.doctorListByTime[index].projectName),
|
|
|
|
|
children: [
|
|
|
|
|
Card(
|
|
|
|
|
margin: EdgeInsets.fromLTRB(10.0, 16.0, 10.0, 8.0),
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
shape: RoundedRectangleBorder(
|
|
|
|
|
borderRadius: BorderRadius.circular(10),
|
|
|
|
|
return Padding(
|
|
|
|
|
padding: EdgeInsets.symmetric(horizontal: 16.0, vertical: 10.0),
|
|
|
|
|
child: Container(
|
|
|
|
|
//height: MediaQuery.of(context).size.height * 0.09,
|
|
|
|
|
decoration: BoxDecoration(color: Colors.white),
|
|
|
|
|
|
|
|
|
|
child: ExpansionTile(
|
|
|
|
|
title: Padding(
|
|
|
|
|
padding: EdgeInsets.all(21.0),
|
|
|
|
|
child: Texts(model.doctorLists[index].filterName),
|
|
|
|
|
),
|
|
|
|
|
child: Container(
|
|
|
|
|
decoration: BoxDecoration(),
|
|
|
|
|
padding: EdgeInsets.all(7.0),
|
|
|
|
|
width: MediaQuery.of(context).size.width,
|
|
|
|
|
child: Row(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.start,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
Expanded(
|
|
|
|
|
flex: 1,
|
|
|
|
|
child: ClipRRect(
|
|
|
|
|
borderRadius: BorderRadius.circular(100.0),
|
|
|
|
|
child: Image.network(model.doctorListByTime[index].doctorImageURL,
|
|
|
|
|
fit: BoxFit.fill, height: 60.0, width: 60.0),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
Expanded(
|
|
|
|
|
flex: 4,
|
|
|
|
|
child: Container(
|
|
|
|
|
width: MediaQuery.of(context).size.width * 0.55,
|
|
|
|
|
margin: EdgeInsets.fromLTRB(20.0, 10.0, 10.0, 0.0),
|
|
|
|
|
child: Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
if (model.doctorListByTime[index].doctorTitle != null)
|
|
|
|
|
Text(
|
|
|
|
|
model.doctorListByTime[index].doctorTitle +
|
|
|
|
|
" " +
|
|
|
|
|
model.doctorListByTime[index].name,
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
fontSize: 14.0, color: Colors.grey[700], letterSpacing: 1.0)),
|
|
|
|
|
Container(
|
|
|
|
|
margin: EdgeInsets.only(top: 3.0),
|
|
|
|
|
child: Text(
|
|
|
|
|
model.doctorListByTime[index].clinicName != null
|
|
|
|
|
? model.doctorListByTime[index].clinicName
|
|
|
|
|
: "",
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
fontSize: 12.0, color: Colors.grey[600], letterSpacing: 1.0)),
|
|
|
|
|
),
|
|
|
|
|
Container(
|
|
|
|
|
margin: EdgeInsets.only(top: 3.0),
|
|
|
|
|
child: Text(model.doctorListByTime[index].projectName,
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
fontSize: 12.0, color: Colors.grey[600], letterSpacing: 1.0)),
|
|
|
|
|
),
|
|
|
|
|
// if (doctor.speciality != null)
|
|
|
|
|
// Container(
|
|
|
|
|
// margin: EdgeInsets.only(top: 3.0, bottom: 3.0),
|
|
|
|
|
// child: Text(getDoctorSpeciality(this.doctor.speciality).trim(),
|
|
|
|
|
// style: TextStyle(fontSize: 12.0, 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,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
RatingBar.readOnly(
|
|
|
|
|
initialRating: model.doctorListByTime[index].actualDoctorRate.toDouble(),
|
|
|
|
|
size: 20.0,
|
|
|
|
|
filledColor: Colors.yellow[700],
|
|
|
|
|
emptyColor: Colors.grey[500],
|
|
|
|
|
isHalfAllowed: true,
|
|
|
|
|
halfFilledIcon: Icons.star_half,
|
|
|
|
|
filledIcon: Icons.star,
|
|
|
|
|
emptyIcon: Icons.star,
|
|
|
|
|
children: model.doctorLists[index].doctorsByTimeList
|
|
|
|
|
.map((doctor) => Card(
|
|
|
|
|
margin: EdgeInsets.fromLTRB(10.0, 16.0, 10.0, 8.0),
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
shape: RoundedRectangleBorder(
|
|
|
|
|
borderRadius: BorderRadius.circular(10),
|
|
|
|
|
),
|
|
|
|
|
child: Container(
|
|
|
|
|
decoration: BoxDecoration(),
|
|
|
|
|
padding: EdgeInsets.all(7.0),
|
|
|
|
|
width: MediaQuery.of(context).size.width,
|
|
|
|
|
child: Row(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.start,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
Expanded(
|
|
|
|
|
flex: 1,
|
|
|
|
|
child: ClipRRect(
|
|
|
|
|
borderRadius: BorderRadius.circular(100.0),
|
|
|
|
|
child: Image.network(doctor.doctorImageURL,
|
|
|
|
|
fit: BoxFit.fill, height: 60.0, width: 60.0),
|
|
|
|
|
),
|
|
|
|
|
Container(
|
|
|
|
|
child: Image.network(model.doctorListByTime[index].nationalityFlagURL,
|
|
|
|
|
width: 25.0, height: 25.0),
|
|
|
|
|
),
|
|
|
|
|
Expanded(
|
|
|
|
|
flex: 4,
|
|
|
|
|
child: Container(
|
|
|
|
|
width: MediaQuery.of(context).size.width * 0.55,
|
|
|
|
|
margin: EdgeInsets.fromLTRB(20.0, 10.0, 10.0, 0.0),
|
|
|
|
|
child: Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
if (doctor.doctorTitle != null)
|
|
|
|
|
Text(doctor.doctorTitle + " " + doctor.name,
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
fontSize: 14.0,
|
|
|
|
|
color: Colors.grey[700],
|
|
|
|
|
letterSpacing: 1.0)),
|
|
|
|
|
Container(
|
|
|
|
|
margin: EdgeInsets.only(top: 3.0),
|
|
|
|
|
child: Text(doctor.clinicName != null ? doctor.clinicName : "",
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
fontSize: 12.0,
|
|
|
|
|
color: Colors.grey[600],
|
|
|
|
|
letterSpacing: 1.0)),
|
|
|
|
|
),
|
|
|
|
|
Container(
|
|
|
|
|
margin: EdgeInsets.only(top: 3.0),
|
|
|
|
|
child: Text(doctor.projectName,
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
fontSize: 12.0,
|
|
|
|
|
color: Colors.grey[600],
|
|
|
|
|
letterSpacing: 1.0)),
|
|
|
|
|
),
|
|
|
|
|
Row(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
|
mainAxisSize: MainAxisSize.max,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
RatingBar.readOnly(
|
|
|
|
|
initialRating: doctor.actualDoctorRate.toDouble(),
|
|
|
|
|
size: 20.0,
|
|
|
|
|
filledColor: Colors.yellow[700],
|
|
|
|
|
emptyColor: Colors.grey[500],
|
|
|
|
|
isHalfAllowed: true,
|
|
|
|
|
halfFilledIcon: Icons.star_half,
|
|
|
|
|
filledIcon: Icons.star,
|
|
|
|
|
emptyIcon: Icons.star,
|
|
|
|
|
),
|
|
|
|
|
Container(
|
|
|
|
|
child: Image.network(doctor.nationalityFlagURL,
|
|
|
|
|
width: 25.0, height: 25.0),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
))
|
|
|
|
|
.toList(),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
}),
|
|
|
|
|
));
|
|
|
|
|