|
|
|
|
@ -8,6 +8,7 @@ import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/widgets/shared/card_with_bg_widget.dart';
|
|
|
|
|
import 'package:flutter/cupertino.dart';
|
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
|
import 'package:hexcolor/hexcolor.dart';
|
|
|
|
|
import 'package:provider/provider.dart';
|
|
|
|
|
|
|
|
|
|
class MyScheduleWidget extends StatelessWidget {
|
|
|
|
|
@ -21,102 +22,117 @@ class MyScheduleWidget extends StatelessWidget {
|
|
|
|
|
List<WorkingHours> workingHours = Helpers.getWorkingHours(
|
|
|
|
|
workingHoursTable.workingHours,
|
|
|
|
|
);
|
|
|
|
|
return Row(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
Expanded(
|
|
|
|
|
child: Column(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.start,
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 10,
|
|
|
|
|
),
|
|
|
|
|
AppText(
|
|
|
|
|
projectViewModel.isArabic
|
|
|
|
|
? AppDateUtils.getWeekDayArabic(
|
|
|
|
|
workingHoursTable.date.weekday)
|
|
|
|
|
: AppDateUtils.getWeekDay(workingHoursTable.date.weekday),
|
|
|
|
|
fontSize: 16,
|
|
|
|
|
fontFamily: 'Poppins',
|
|
|
|
|
// fontSize: 18
|
|
|
|
|
),
|
|
|
|
|
AppText(
|
|
|
|
|
' ${workingHoursTable.date.day} ${(AppDateUtils.getMonth(workingHoursTable.date.month).toString().substring(0, 3))}',
|
|
|
|
|
fontSize: 14,
|
|
|
|
|
fontWeight: FontWeight.w700,
|
|
|
|
|
fontFamily: 'Poppins',
|
|
|
|
|
// fontSize: 18
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
return Container(
|
|
|
|
|
color: HexColor("#EFEFEF"),
|
|
|
|
|
child: Row(
|
|
|
|
|
//mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
Expanded(
|
|
|
|
|
child: Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
|
|
|
|
|
children: [
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 10,
|
|
|
|
|
),
|
|
|
|
|
AppText(
|
|
|
|
|
projectViewModel.isArabic
|
|
|
|
|
? AppDateUtils.getWeekDayArabic(
|
|
|
|
|
workingHoursTable.date.weekday)
|
|
|
|
|
: AppDateUtils.getWeekDay(workingHoursTable.date.weekday),
|
|
|
|
|
fontSize: MediaQuery.of(context).size.width*0.032,
|
|
|
|
|
fontFamily: 'Poppins',
|
|
|
|
|
// fontSize: 18
|
|
|
|
|
),
|
|
|
|
|
AppText(
|
|
|
|
|
' ${workingHoursTable.date.day} ${(AppDateUtils.getMonth(workingHoursTable.date.month).toString().substring(0, 3))}',
|
|
|
|
|
fontSize: MediaQuery.of(context).size.width*0.05,
|
|
|
|
|
fontWeight: FontWeight.w700,
|
|
|
|
|
fontFamily: 'Poppins',
|
|
|
|
|
// fontSize: 18
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
Container(
|
|
|
|
|
width: MediaQuery.of(context).size.width * 0.55,
|
|
|
|
|
child: CardWithBgWidget(
|
|
|
|
|
bgColor: AppDateUtils.isToday(workingHoursTable.date)
|
|
|
|
|
? AppGlobal.appGreenColor
|
|
|
|
|
: Colors.transparent,
|
|
|
|
|
// hasBorder: false,
|
|
|
|
|
widget: Container(
|
|
|
|
|
child: Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
if (AppDateUtils.isToday(workingHoursTable.date))
|
|
|
|
|
AppText(
|
|
|
|
|
"Today",
|
|
|
|
|
fontSize: 1.8 * SizeConfig.textMultiplier,
|
|
|
|
|
fontFamily: 'Poppins',
|
|
|
|
|
color: AppGlobal.appGreenColor,
|
|
|
|
|
// fontSize: 18
|
|
|
|
|
Container(
|
|
|
|
|
width: MediaQuery.of(context).size.width * 0.65,
|
|
|
|
|
// width: SizeConfig.getWidthMultiplier()*64,
|
|
|
|
|
// height: SizeConfig.getHeightMultiplier()*18,
|
|
|
|
|
child: CardWithBgWidget(
|
|
|
|
|
marginSymmetric: 7,
|
|
|
|
|
hasBorder: false,
|
|
|
|
|
bgColor: AppDateUtils.isToday(workingHoursTable.date)
|
|
|
|
|
? AppGlobal.appGreenColor
|
|
|
|
|
: Colors.transparent,
|
|
|
|
|
// hasBorder: false,
|
|
|
|
|
widget: Container(
|
|
|
|
|
child: Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
if (AppDateUtils.isToday(workingHoursTable.date))
|
|
|
|
|
AppText(
|
|
|
|
|
"Today",
|
|
|
|
|
fontSize: 1.8 * SizeConfig.textMultiplier,
|
|
|
|
|
fontFamily: 'Poppins',
|
|
|
|
|
color: AppGlobal.appGreenColor,
|
|
|
|
|
// fontSize: 18
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 4,
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 10,
|
|
|
|
|
),
|
|
|
|
|
Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: workingHours.map((work) {
|
|
|
|
|
return Container(
|
|
|
|
|
margin: EdgeInsets.only(
|
|
|
|
|
bottom: workingHours.length > 1 ? 15 : 0),
|
|
|
|
|
child: Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 5,
|
|
|
|
|
),
|
|
|
|
|
if (workingHoursTable.clinicName != null)
|
|
|
|
|
AppText(
|
|
|
|
|
workingHoursTable.clinicName ?? "",
|
|
|
|
|
fontSize: 15,
|
|
|
|
|
fontWeight: FontWeight.w700,
|
|
|
|
|
),
|
|
|
|
|
Container(
|
|
|
|
|
width: MediaQuery.of(context).size.width * 0.55,
|
|
|
|
|
child: AppText(
|
|
|
|
|
'${work.from} - ${work.to}',
|
|
|
|
|
fontSize: 15,
|
|
|
|
|
fontWeight: FontWeight.w300,
|
|
|
|
|
Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: workingHours.map((work) {
|
|
|
|
|
return Container(
|
|
|
|
|
margin: EdgeInsets.only(
|
|
|
|
|
bottom: workingHours.length > 1 ? 15 : 0),
|
|
|
|
|
child: Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 5,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
if (workingHoursTable.projectName != null)
|
|
|
|
|
AppText(
|
|
|
|
|
workingHoursTable.projectName ?? "",
|
|
|
|
|
fontSize: 15,
|
|
|
|
|
fontWeight: FontWeight.w700,
|
|
|
|
|
if (workingHoursTable.clinicName != null)
|
|
|
|
|
Container(
|
|
|
|
|
width: MediaQuery.of(context).size.width * 0.65,
|
|
|
|
|
child: AppText(
|
|
|
|
|
Helpers
|
|
|
|
|
.convertToTitleCase(
|
|
|
|
|
workingHoursTable.clinicName ?? ""),
|
|
|
|
|
fontSize: MediaQuery.of(context).size.width*0.04,
|
|
|
|
|
fontWeight: FontWeight.w700,),
|
|
|
|
|
),
|
|
|
|
|
// AppText(
|
|
|
|
|
// workingHoursTable.clinicName ?? "",
|
|
|
|
|
// fontSize: 15,
|
|
|
|
|
// fontWeight: FontWeight.w700,
|
|
|
|
|
// ),
|
|
|
|
|
Container(
|
|
|
|
|
child: AppText(
|
|
|
|
|
'${work.from} - ${work.to}',
|
|
|
|
|
fontSize: MediaQuery.of(context).size.width*0.03,
|
|
|
|
|
fontWeight: FontWeight.w300,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
}).toList(),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
if (workingHoursTable.projectName != null)
|
|
|
|
|
AppText(
|
|
|
|
|
workingHoursTable.projectName ?? "",
|
|
|
|
|
fontSize: MediaQuery.of(context).size.width*0.04,
|
|
|
|
|
fontWeight: FontWeight.w700,
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
}).toList(),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|