refactor of usecases

This commit is contained in:
2026-02-23 17:18:50 +05:30
parent 56666ece30
commit 13f8003bda
37 changed files with 1563 additions and 105 deletions

View File

@@ -19,26 +19,61 @@ class EmptyStateWidget extends StatelessWidget {
Widget build(BuildContext context) {
return Container(
width: double.infinity,
padding: const EdgeInsets.all(UiConstants.space4),
padding: const EdgeInsets.all(UiConstants.space6),
decoration: BoxDecoration(
color: UiColors.bgSecondary,
color: UiColors.bgSecondary.withValues(alpha: 0.5),
borderRadius: BorderRadius.circular(UiConstants.radiusBase),
border: Border.all(
color: UiColors.border.withValues(alpha: 0.5),
style: BorderStyle.solid,
),
),
alignment: Alignment.center,
child: Column(
children: [
Container(
padding: const EdgeInsets.all(UiConstants.space3),
decoration: BoxDecoration(
color: UiColors.white,
shape: BoxShape.circle,
boxShadow: [
BoxShadow(
color: UiColors.black.withValues(alpha: 0.05),
blurRadius: 4,
offset: const Offset(0, 2),
),
],
),
child: Icon(
UiIcons.info,
size: 20,
color: UiColors.mutedForeground.withValues(alpha: 0.5),
),
),
const SizedBox(height: UiConstants.space3),
Text(
message,
style: UiTypography.body2r.copyWith(color: UiColors.mutedForeground),
style: UiTypography.body2m.copyWith(color: UiColors.mutedForeground),
textAlign: TextAlign.center,
),
if (actionLink != null)
GestureDetector(
onTap: onAction,
child: Padding(
padding: const EdgeInsets.only(top: UiConstants.space2),
child: Text(
actionLink!,
style: UiTypography.body2m.copyWith(color: UiColors.primary),
padding: const EdgeInsets.only(top: UiConstants.space3),
child: Container(
padding: const EdgeInsets.symmetric(
horizontal: UiConstants.space4,
vertical: UiConstants.space2,
),
decoration: BoxDecoration(
color: UiColors.primary.withValues(alpha: 0.1),
borderRadius: UiConstants.radiusFull,
),
child: Text(
actionLink!,
style: UiTypography.body3m.copyWith(color: UiColors.primary),
),
),
),
),

View File

@@ -125,7 +125,7 @@ class _ShiftCardState extends State<ShiftCard> {
),
Text.rich(
TextSpan(
text: '\$${widget.shift.hourlyRate}',
text: '\$${widget.shift.hourlyRate % 1 == 0 ? widget.shift.hourlyRate.toInt() : widget.shift.hourlyRate.toStringAsFixed(2)}',
style: UiTypography.body1b.textPrimary,
children: [
TextSpan(text: '/h', style: UiTypography.body3r),
@@ -247,7 +247,7 @@ class _ShiftCardState extends State<ShiftCard> {
),
Text.rich(
TextSpan(
text: '\$${widget.shift.hourlyRate}',
text: '\$${widget.shift.hourlyRate % 1 == 0 ? widget.shift.hourlyRate.toInt() : widget.shift.hourlyRate.toStringAsFixed(2)}',
style: UiTypography.headline3m.textPrimary,
children: [
TextSpan(text: '/h', style: UiTypography.body1r),