|
|
|
|
import 'package:doctor_app_flutter/config/size_config.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/models/doctor/list_doctor_working_hours_table_model.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/util/helpers.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/widgets/shared/card_with_bgNew_widget.dart';
|
|
|
|
|
import 'package:flutter/cupertino.dart';
|
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
|
|
|
|
|
|
class MyScheduleWidget extends StatelessWidget {
|
|
|
|
|
final ListDoctorWorkingHoursTable workingHoursTable;
|
|
|
|
|
|
|
|
|
|
MyScheduleWidget({Key key, this.workingHoursTable});
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
|
List<WorkingHours> workingHours =
|
|
|
|
|
Helpers.getWorkingHours(workingHoursTable.workingHours);
|
|
|
|
|
return CardWithBgWidgetNew(
|
|
|
|
|
widget: Container(
|
|
|
|
|
child: Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
Column(
|
|
|
|
|
children: [Text('${workingHoursTable.date.day}')],
|
|
|
|
|
),
|
|
|
|
|
Row(
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
AppText(
|
|
|
|
|
workingHoursTable.dayName,
|
|
|
|
|
fontSize: 2.5 * SizeConfig.textMultiplier,
|
|
|
|
|
),
|
|
|
|
|
AppText(
|
|
|
|
|
' ${workingHoursTable.date.day}/${workingHoursTable.date.month}/${workingHoursTable.date.year}',
|
|
|
|
|
fontSize: 2.2 * SizeConfig.textMultiplier,
|
|
|
|
|
fontWeight: FontWeight.w300,
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 8,
|
|
|
|
|
),
|
|
|
|
|
Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: workingHours.map((work) {
|
|
|
|
|
return Container(
|
|
|
|
|
child: Column(
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
Divider(color: Colors.grey),
|
|
|
|
|
Row(
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
Expanded(
|
|
|
|
|
child: Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
AppText(
|
|
|
|
|
'From',
|
|
|
|
|
fontSize: 2.2 * SizeConfig.textMultiplier,
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 5,
|
|
|
|
|
),
|
|
|
|
|
AppText(
|
|
|
|
|
work.from,
|
|
|
|
|
fontSize: 2.2 * SizeConfig.textMultiplier,
|
|
|
|
|
fontWeight: FontWeight.w300,
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
Container(
|
|
|
|
|
height: SizeConfig.realScreenWidth * 0.1,
|
|
|
|
|
width: 0.8,
|
|
|
|
|
color: Colors.grey,
|
|
|
|
|
margin: EdgeInsets.only(left: 15, right: 15),
|
|
|
|
|
),
|
|
|
|
|
Expanded(
|
|
|
|
|
child: Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
AppText(
|
|
|
|
|
'To',
|
|
|
|
|
fontSize: 2.2 * SizeConfig.textMultiplier,
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 5,
|
|
|
|
|
),
|
|
|
|
|
AppText(
|
|
|
|
|
work.to,
|
|
|
|
|
fontSize: 2.2 * SizeConfig.textMultiplier,
|
|
|
|
|
fontWeight: FontWeight.w300,
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
}).toList(),
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
width: 8,
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
}
|