improvement

design_3.0_TM_Module_snagsFix
Sikander Saleem 1 month ago
parent ee70ca3c2b
commit 3ac3c11b4b

@ -30,6 +30,15 @@ extension StringExtensions on String {
}
}
String get toServiceRequestDetailsFormatWithSS {
try {
DateTime dateTime = DateTime.parse(this);
return "${DateFormat('dd MMM, yyyy').format(dateTime)} ${DateFormat('hh:mm:ss a').format(dateTime)}";
} catch (e) {
return "";
}
}
String get toFirstActionFormat {
try {
DateTime dateTime = DateTime.parse(this);
@ -38,6 +47,7 @@ extension StringExtensions on String {
return "";
}
}
String get toYMDHMSA {
try {
DateTime dateTime = DateTime.parse(this);
@ -46,6 +56,7 @@ extension StringExtensions on String {
return "";
}
}
String get toMonthYearFormat {
try {
DateTime dateTime = DateTime.parse(this);

@ -29,12 +29,12 @@ class WorkingTimeTile extends StatelessWidget {
decoration: BoxDecoration(
color: AppColor.fieldBgColor(context),
borderRadius: BorderRadius.circular(10),
boxShadow: [
BoxShadow(
color: Colors.black.withOpacity(0.05),
blurRadius: 10,
)
],
// boxShadow: [
// BoxShadow(
// color: Colors.black.withOpacity(0.05),
// blurRadius: 10,
// )
// ],
),
child: Row(
children: [
@ -68,8 +68,7 @@ class WorkingTimeTile extends StatelessWidget {
borderRadius: BorderRadius.vertical(top: Radius.circular(20)),
),
clipBehavior: Clip.antiAliasWithSaveLayer,
builder: (BuildContext context) =>
TotalWorkingTimeDetailBottomSheet(timerList: timerList),
builder: (BuildContext context) => TotalWorkingTimeDetailBottomSheet(timerList: timerList),
);
});
}

@ -48,13 +48,13 @@ class TotalWorkingTimeDetailBottomSheet extends StatelessWidget {
text: TextSpan(
text: "From: ",
style: Theme.of(context).textTheme.bodySmall?.copyWith(color: context.isDark ? null : AppColor.neutral20, fontWeight: FontWeight.w500),
children: [TextSpan(text: timerList[index].startTime!.toServiceRequestDetailsFormat, style: Theme.of(context).textTheme.bodySmall)])),
children: [TextSpan(text: timerList[index].startTime!.toServiceRequestDetailsFormatWithSS, style: Theme.of(context).textTheme.bodySmall)])),
4.height,
RichText(
text: TextSpan(
text: "To: ",
style: Theme.of(context).textTheme.bodySmall?.copyWith(color: context.isDark ? null : AppColor.neutral20, fontWeight: FontWeight.w500),
children: [TextSpan(text: timerList[index].endTime!.toServiceRequestDetailsFormat, style: Theme.of(context).textTheme.bodySmall)])),
children: [TextSpan(text: timerList[index].endTime!.toServiceRequestDetailsFormatWithSS, style: Theme.of(context).textTheme.bodySmall)])),
4.height,
RichText(
text: TextSpan(

Loading…
Cancel
Save