|
|
|
@ -1,8 +1,9 @@
|
|
|
|
|
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/date-utils.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:doctor_app_flutter/widgets/shared/card_with_bg_widget.dart';
|
|
|
|
|
import 'package:flutter/cupertino.dart';
|
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
|
|
|
|
|
@ -16,58 +17,82 @@ class MyScheduleWidget extends StatelessWidget {
|
|
|
|
|
List<WorkingHours> workingHours = Helpers.getWorkingHours(
|
|
|
|
|
workingHoursTable.workingHours,
|
|
|
|
|
);
|
|
|
|
|
return CardWithBgWidgetNew(
|
|
|
|
|
widget: Container(
|
|
|
|
|
child: Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
Column(
|
|
|
|
|
children: [
|
|
|
|
|
Divider(
|
|
|
|
|
height: 1,
|
|
|
|
|
color: Colors.grey,
|
|
|
|
|
thickness: 1.0,
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
return Row(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
Column(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 10,
|
|
|
|
|
),
|
|
|
|
|
AppText(
|
|
|
|
|
workingHoursTable.dayName,
|
|
|
|
|
fontSize: 2.5 * SizeConfig.textMultiplier,
|
|
|
|
|
fontFamily: 'Poppins',
|
|
|
|
|
// fontSize: 18
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 10,
|
|
|
|
|
),
|
|
|
|
|
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,
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
AppText(
|
|
|
|
|
' ${workingHoursTable.date.day} ${(DateUtils.getMonth(workingHoursTable.date.month).toString().substring(0, 3))}',
|
|
|
|
|
fontSize: 2.5 * SizeConfig.textMultiplier,
|
|
|
|
|
fontWeight: FontWeight.w700,
|
|
|
|
|
|
|
|
|
|
fontFamily: 'Poppins',
|
|
|
|
|
// fontSize: 18
|
|
|
|
|
),
|
|
|
|
|
Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: workingHours.map((work) {
|
|
|
|
|
return Container(
|
|
|
|
|
child: Column(
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 5,
|
|
|
|
|
),
|
|
|
|
|
AppText(
|
|
|
|
|
work.from + ' - ' + work.to,
|
|
|
|
|
fontSize: 2.0 * SizeConfig.textMultiplier,
|
|
|
|
|
fontWeight: FontWeight.w300,
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
Container(
|
|
|
|
|
width: MediaQuery.of(context).size.width * 0.55,
|
|
|
|
|
child: CardWithBgWidget(
|
|
|
|
|
bgColor: DateUtils.isToday(workingHoursTable.date)
|
|
|
|
|
? Colors.green[500]
|
|
|
|
|
: Colors.transparent,
|
|
|
|
|
hasBorder: false,
|
|
|
|
|
widget: Container(
|
|
|
|
|
child: Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
if (DateUtils.isToday(workingHoursTable.date))
|
|
|
|
|
AppText(
|
|
|
|
|
"Today",
|
|
|
|
|
fontSize: 2.5 * SizeConfig.textMultiplier,
|
|
|
|
|
fontFamily: 'Poppins',
|
|
|
|
|
color: Colors.green[500],
|
|
|
|
|
// fontSize: 18
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 10,
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
}).toList(),
|
|
|
|
|
Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: workingHours.map((work) {
|
|
|
|
|
return Container(
|
|
|
|
|
child: Column(
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 5,
|
|
|
|
|
),
|
|
|
|
|
AppText(
|
|
|
|
|
work.from + ' - ' + work.to,
|
|
|
|
|
fontSize: 2.0 * SizeConfig.textMultiplier,
|
|
|
|
|
fontWeight: FontWeight.w300,
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
}).toList(),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|