chore: refactor UI consistency using design system tokens and remove LucideIcons
This commit is contained in:
@@ -20,7 +20,7 @@ class ClientGetStartedPage extends StatelessWidget {
|
||||
width: 400,
|
||||
height: 400,
|
||||
decoration: BoxDecoration(
|
||||
color: UiColors.secondary.withAlpha(50),
|
||||
color: UiColors.secondary.withValues(alpha: 0.2),
|
||||
shape: BoxShape.circle,
|
||||
),
|
||||
),
|
||||
@@ -134,7 +134,7 @@ class _ShiftOrderCard extends StatelessWidget {
|
||||
borderRadius: UiConstants.radiusLg,
|
||||
boxShadow: <BoxShadow>[
|
||||
BoxShadow(
|
||||
color: UiColors.black.withOpacity(0.1),
|
||||
color: UiColors.black.withValues(alpha: 0.1),
|
||||
blurRadius: 10,
|
||||
offset: const Offset(0, 4),
|
||||
),
|
||||
@@ -149,7 +149,7 @@ class _ShiftOrderCard extends StatelessWidget {
|
||||
Container(
|
||||
padding: const EdgeInsets.all(UiConstants.space1),
|
||||
decoration: BoxDecoration(
|
||||
color: UiColors.primary.withOpacity(0.1),
|
||||
color: UiColors.primary.withValues(alpha: 0.1),
|
||||
shape: BoxShape.circle,
|
||||
),
|
||||
child: const Icon(
|
||||
@@ -197,7 +197,7 @@ class _WorkerProfileCard extends StatelessWidget {
|
||||
borderRadius: UiConstants.radiusLg,
|
||||
boxShadow: <BoxShadow>[
|
||||
BoxShadow(
|
||||
color: UiColors.black.withOpacity(0.1),
|
||||
color: UiColors.black.withValues(alpha: 0.1),
|
||||
blurRadius: 10,
|
||||
offset: const Offset(0, 4),
|
||||
),
|
||||
@@ -207,7 +207,7 @@ class _WorkerProfileCard extends StatelessWidget {
|
||||
children: <Widget>[
|
||||
CircleAvatar(
|
||||
radius: 16,
|
||||
backgroundColor: UiColors.primary.withOpacity(0.1),
|
||||
backgroundColor: UiColors.primary.withValues(alpha: 0.1),
|
||||
child: const Icon(UiIcons.user, size: 16, color: UiColors.primary),
|
||||
),
|
||||
const SizedBox(width: UiConstants.space2),
|
||||
@@ -238,7 +238,7 @@ class _CalendarCard extends StatelessWidget {
|
||||
borderRadius: UiConstants.radiusMd,
|
||||
boxShadow: <BoxShadow>[
|
||||
BoxShadow(
|
||||
color: UiColors.black.withOpacity(0.1),
|
||||
color: UiColors.black.withValues(alpha: 0.1),
|
||||
blurRadius: 10,
|
||||
offset: const Offset(4, 4),
|
||||
),
|
||||
|
||||
@@ -143,7 +143,7 @@ class _BillingViewState extends State<BillingView> {
|
||||
),
|
||||
decoration: BoxDecoration(
|
||||
color: UiColors.accent,
|
||||
borderRadius: BorderRadius.circular(100),
|
||||
borderRadius: UiConstants.radiusFull,
|
||||
),
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
|
||||
@@ -66,7 +66,7 @@ class BillingHeader extends StatelessWidget {
|
||||
),
|
||||
decoration: BoxDecoration(
|
||||
color: UiColors.accent,
|
||||
borderRadius: BorderRadius.circular(100),
|
||||
borderRadius: UiConstants.radiusFull,
|
||||
),
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
|
||||
@@ -118,10 +118,13 @@ class _StatusBadge extends StatelessWidget {
|
||||
Widget build(BuildContext context) {
|
||||
final bool isPaid = status.toUpperCase() == 'PAID';
|
||||
return Container(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 6, vertical: 2),
|
||||
padding: const EdgeInsets.symmetric(
|
||||
horizontal: UiConstants.space1 + 2,
|
||||
vertical: 2,
|
||||
),
|
||||
decoration: BoxDecoration(
|
||||
color: isPaid ? UiColors.tagSuccess : UiColors.tagPending,
|
||||
borderRadius: BorderRadius.circular(4),
|
||||
borderRadius: UiConstants.radiusSm,
|
||||
),
|
||||
child: Text(
|
||||
isPaid ? t.client_billing.paid_badge : t.client_billing.pending_badge,
|
||||
|
||||
@@ -98,20 +98,16 @@ class _PaymentMethodCardState extends State<PaymentMethodCard> {
|
||||
child: Row(
|
||||
children: <Widget>[
|
||||
Container(
|
||||
width: 40,
|
||||
height: 28,
|
||||
width: UiConstants.space10,
|
||||
height: UiConstants.space6 + 4,
|
||||
decoration: BoxDecoration(
|
||||
color: UiColors.primary,
|
||||
borderRadius: BorderRadius.circular(4),
|
||||
borderRadius: UiConstants.radiusSm,
|
||||
),
|
||||
child: Center(
|
||||
child: Text(
|
||||
bankLabel,
|
||||
style: const TextStyle(
|
||||
color: UiColors.white,
|
||||
fontSize: 10,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
style: UiTypography.footnote2b.white,
|
||||
maxLines: 1,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
@@ -135,13 +131,12 @@ class _PaymentMethodCardState extends State<PaymentMethodCard> {
|
||||
),
|
||||
if (isPrimary)
|
||||
Container(
|
||||
padding: const EdgeInsets.symmetric(
|
||||
horizontal: 6,
|
||||
vertical: 2,
|
||||
horizontal: UiConstants.space1 + 2,
|
||||
vertical: UiConstants.space0 + 2,
|
||||
),
|
||||
decoration: BoxDecoration(
|
||||
color: UiColors.accent,
|
||||
borderRadius: BorderRadius.circular(4),
|
||||
borderRadius: UiConstants.radiusSm,
|
||||
),
|
||||
child: Text(
|
||||
t.client_billing.default_badge,
|
||||
|
||||
@@ -72,14 +72,14 @@ class _SpendingBreakdownCardState extends State<SpendingBreakdownCard>
|
||||
height: 32,
|
||||
decoration: BoxDecoration(
|
||||
color: UiColors.bgSecondary,
|
||||
borderRadius: BorderRadius.circular(6),
|
||||
borderRadius: UiConstants.radiusMd,
|
||||
),
|
||||
child: TabBar(
|
||||
controller: _tabController,
|
||||
isScrollable: true,
|
||||
indicator: BoxDecoration(
|
||||
color: UiColors.bgSecondary,
|
||||
borderRadius: BorderRadius.circular(4),
|
||||
borderRadius: UiConstants.radiusSm,
|
||||
boxShadow: <BoxShadow>[
|
||||
BoxShadow(
|
||||
color: UiColors.black.withValues(alpha: 0.05),
|
||||
@@ -90,10 +90,12 @@ class _SpendingBreakdownCardState extends State<SpendingBreakdownCard>
|
||||
labelColor: UiColors.textPrimary,
|
||||
unselectedLabelColor: UiColors.textSecondary,
|
||||
labelStyle: UiTypography.titleUppercase4b,
|
||||
padding: const EdgeInsets.all(2),
|
||||
padding: const EdgeInsets.all(UiConstants.space1 / 2),
|
||||
indicatorSize: TabBarIndicatorSize.tab,
|
||||
labelPadding: const EdgeInsets.symmetric(horizontal: 12),
|
||||
dividerColor: Colors.transparent,
|
||||
labelPadding: const EdgeInsets.symmetric(
|
||||
horizontal: UiConstants.space3,
|
||||
),
|
||||
dividerColor: UiColors.transparent,
|
||||
onTap: (int index) {
|
||||
final BillingPeriod period =
|
||||
index == 0 ? BillingPeriod.week : BillingPeriod.month;
|
||||
|
||||
@@ -29,7 +29,6 @@ dependencies:
|
||||
path: ../../../data_connect
|
||||
|
||||
# UI
|
||||
lucide_icons: ^0.257.0
|
||||
intl: ^0.20.0
|
||||
firebase_data_connect: ^0.2.2+1
|
||||
dev_dependencies:
|
||||
|
||||
@@ -73,7 +73,7 @@ class CoverageHeader extends StatelessWidget {
|
||||
width: UiConstants.space10,
|
||||
height: UiConstants.space10,
|
||||
decoration: BoxDecoration(
|
||||
color: UiColors.primaryForeground.withOpacity(0.2),
|
||||
color: UiColors.primaryForeground.withValues(alpha: 0.2),
|
||||
shape: BoxShape.circle,
|
||||
),
|
||||
child: const Icon(
|
||||
@@ -96,7 +96,7 @@ class CoverageHeader extends StatelessWidget {
|
||||
width: UiConstants.space8,
|
||||
height: UiConstants.space8,
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.transparent,
|
||||
color: UiColors.transparent,
|
||||
borderRadius: UiConstants.radiusMd,
|
||||
),
|
||||
child: IconButton(
|
||||
@@ -109,7 +109,7 @@ class CoverageHeader extends StatelessWidget {
|
||||
padding: EdgeInsets.zero,
|
||||
constraints: const BoxConstraints(),
|
||||
style: IconButton.styleFrom(
|
||||
hoverColor: UiColors.primaryForeground.withOpacity(0.2),
|
||||
hoverColor: UiColors.primaryForeground.withValues(alpha: 0.2),
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: UiConstants.radiusMd,
|
||||
),
|
||||
@@ -127,7 +127,7 @@ class CoverageHeader extends StatelessWidget {
|
||||
Container(
|
||||
padding: const EdgeInsets.all(UiConstants.space4),
|
||||
decoration: BoxDecoration(
|
||||
color: UiColors.primaryForeground.withOpacity(0.1),
|
||||
color: UiColors.primaryForeground.withValues(alpha: 0.1),
|
||||
borderRadius: UiConstants.radiusLg,
|
||||
),
|
||||
child: Row(
|
||||
@@ -139,7 +139,7 @@ class CoverageHeader extends StatelessWidget {
|
||||
Text(
|
||||
'Coverage Status',
|
||||
style: UiTypography.body2r.copyWith(
|
||||
color: UiColors.primaryForeground.withOpacity(0.7),
|
||||
color: UiColors.primaryForeground.withValues(alpha: 0.7),
|
||||
),
|
||||
),
|
||||
Text(
|
||||
@@ -156,7 +156,7 @@ class CoverageHeader extends StatelessWidget {
|
||||
Text(
|
||||
'Workers',
|
||||
style: UiTypography.body2r.copyWith(
|
||||
color: UiColors.primaryForeground.withOpacity(0.7),
|
||||
color: UiColors.primaryForeground.withValues(alpha: 0.7),
|
||||
),
|
||||
),
|
||||
Text(
|
||||
|
||||
@@ -19,10 +19,10 @@ class LateWorkersAlert extends StatelessWidget {
|
||||
return Container(
|
||||
padding: const EdgeInsets.all(UiConstants.space3),
|
||||
decoration: BoxDecoration(
|
||||
color: UiColors.destructive.withOpacity(0.1),
|
||||
color: UiColors.destructive.withValues(alpha: 0.1),
|
||||
borderRadius: UiConstants.radiusLg,
|
||||
border: Border.all(
|
||||
color: UiColors.destructive.withOpacity(0.3),
|
||||
color: UiColors.destructive.withValues(alpha: 0.3),
|
||||
),
|
||||
),
|
||||
child: Row(
|
||||
|
||||
@@ -14,7 +14,6 @@ dependencies:
|
||||
flutter_bloc: ^8.1.0
|
||||
flutter_modular: ^6.3.0
|
||||
equatable: ^2.0.5
|
||||
lucide_icons: ^0.257.0
|
||||
|
||||
# Architecture Packages
|
||||
design_system:
|
||||
|
||||
@@ -37,16 +37,11 @@ class OneTimeOrderSectionHeader extends StatelessWidget {
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: <Widget>[
|
||||
const Icon(UiIcons.add, size: 16, color: Color(0xFF0032A0)),
|
||||
const Icon(UiIcons.add, size: 16, color: UiColors.primary),
|
||||
const SizedBox(width: UiConstants.space2),
|
||||
Text(
|
||||
actionLabel!,
|
||||
style: const TextStyle(
|
||||
color: Color(0xFF0032A0),
|
||||
fontSize: 14,
|
||||
fontWeight:
|
||||
FontWeight.w500, // Added to match typical button text
|
||||
),
|
||||
style: UiTypography.body2m.primary,
|
||||
),
|
||||
],
|
||||
),
|
||||
|
||||
@@ -40,16 +40,16 @@ class OneTimeOrderSuccessView extends StatelessWidget {
|
||||
child: SafeArea(
|
||||
child: Center(
|
||||
child: Container(
|
||||
margin: const EdgeInsets.symmetric(horizontal: 40),
|
||||
margin: const EdgeInsets.symmetric(horizontal: UiConstants.space10),
|
||||
padding: const EdgeInsets.all(UiConstants.space8),
|
||||
decoration: BoxDecoration(
|
||||
color: UiColors.white,
|
||||
borderRadius: UiConstants.radiusLg * 1.5,
|
||||
boxShadow: <BoxShadow>[
|
||||
BoxShadow(
|
||||
color: Colors.black.withValues(alpha: 0.2),
|
||||
color: UiColors.black.withValues(alpha: 0.2),
|
||||
blurRadius: 20,
|
||||
offset: const Offset(0, 10),
|
||||
offset: const Offset(0, UiConstants.space2 + 2),
|
||||
),
|
||||
],
|
||||
),
|
||||
@@ -57,8 +57,8 @@ class OneTimeOrderSuccessView extends StatelessWidget {
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: <Widget>[
|
||||
Container(
|
||||
width: 64,
|
||||
height: 64,
|
||||
width: UiConstants.space16,
|
||||
height: UiConstants.space16,
|
||||
decoration: const BoxDecoration(
|
||||
color: UiColors.accent,
|
||||
shape: BoxShape.circle,
|
||||
@@ -67,7 +67,7 @@ class OneTimeOrderSuccessView extends StatelessWidget {
|
||||
child: Icon(
|
||||
UiIcons.check,
|
||||
color: UiColors.black,
|
||||
size: 32,
|
||||
size: UiConstants.space8,
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
@@ -158,7 +158,7 @@ class _OneTimeOrderForm extends StatelessWidget {
|
||||
|
||||
// Vendor Selection
|
||||
Text('SELECT VENDOR', style: UiTypography.footnote2r.textSecondary),
|
||||
const SizedBox(height: 8),
|
||||
const SizedBox(height: UiConstants.space2),
|
||||
Container(
|
||||
padding: const EdgeInsets.symmetric(horizontal: UiConstants.space3),
|
||||
height: 48,
|
||||
@@ -207,7 +207,7 @@ class _OneTimeOrderForm extends StatelessWidget {
|
||||
const SizedBox(height: UiConstants.space4),
|
||||
|
||||
Text('HUB', style: UiTypography.footnote2r.textSecondary),
|
||||
const SizedBox(height: 8),
|
||||
const SizedBox(height: UiConstants.space2),
|
||||
Container(
|
||||
padding: const EdgeInsets.symmetric(horizontal: UiConstants.space3),
|
||||
height: 48,
|
||||
|
||||
@@ -32,20 +32,20 @@ class ActionsWidget extends StatelessWidget {
|
||||
Row(
|
||||
children: <Widget>[
|
||||
/// TODO: FEATURE_NOT_YET_IMPLEMENTED
|
||||
// Expanded(
|
||||
// child: _ActionCard(
|
||||
// title: i18n.rapid,
|
||||
// subtitle: i18n.rapid_subtitle,
|
||||
// icon: UiIcons.zap,
|
||||
// color: const Color(0xFFFEF2F2),
|
||||
// borderColor: const Color(0xFFFECACA),
|
||||
// iconBgColor: const Color(0xFFFEE2E2),
|
||||
// iconColor: const Color(0xFFDC2626),
|
||||
// textColor: const Color(0xFF7F1D1D),
|
||||
// subtitleColor: const Color(0xFFB91C1C),
|
||||
// onTap: onRapidPressed,
|
||||
// ),
|
||||
// ),
|
||||
Expanded(
|
||||
child: _ActionCard(
|
||||
title: i18n.rapid,
|
||||
subtitle: i18n.rapid_subtitle,
|
||||
icon: UiIcons.zap,
|
||||
color: UiColors.tagError,
|
||||
borderColor: UiColors.borderError.withValues(alpha: 0.3),
|
||||
iconBgColor: UiColors.white,
|
||||
iconColor: UiColors.textError,
|
||||
textColor: UiColors.textError,
|
||||
subtitleColor: UiColors.textError.withValues(alpha: 0.8),
|
||||
onTap: onRapidPressed,
|
||||
),
|
||||
),
|
||||
// const SizedBox(width: UiConstants.space2),
|
||||
Expanded(
|
||||
child: _ActionCard(
|
||||
|
||||
@@ -47,11 +47,11 @@ class CoverageDashboard extends StatelessWidget {
|
||||
|
||||
final bool isCoverageGood = coveragePercent >= 90;
|
||||
final Color coverageBadgeColor = isCoverageGood
|
||||
? const Color(0xFFD1FAE5) // TODO: Use design system color if available
|
||||
: const Color(0xFFFEF3C7);
|
||||
? UiColors.tagSuccess
|
||||
: UiColors.tagPending;
|
||||
final Color coverageTextColor = isCoverageGood
|
||||
? const Color(0xFF047857)
|
||||
: const Color(0xFFB45309);
|
||||
? UiColors.textSuccess
|
||||
: UiColors.textWarning;
|
||||
|
||||
return Container(
|
||||
padding: const EdgeInsets.all(UiConstants.space4),
|
||||
@@ -163,26 +163,26 @@ class _StatusCard extends StatelessWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
Color bg = const Color(0xFFF1F5F9);
|
||||
Color border = const Color(0xFFE2E8F0);
|
||||
Color bg = UiColors.bgSecondary;
|
||||
Color border = UiColors.border;
|
||||
Color iconColor = UiColors.iconSecondary;
|
||||
Color textColor = UiColors.textPrimary;
|
||||
|
||||
if (isWarning) {
|
||||
bg = const Color(0xFFFFFBEB);
|
||||
border = const Color(0xFFFDE68A);
|
||||
iconColor = const Color(0xFFD97706);
|
||||
textColor = const Color(0xFFB45309);
|
||||
bg = UiColors.tagPending;
|
||||
border = UiColors.borderStill;
|
||||
iconColor = UiColors.textWarning;
|
||||
textColor = UiColors.textWarning;
|
||||
} else if (isError) {
|
||||
bg = const Color(0xFFFEF2F2);
|
||||
border = const Color(0xFFFECACA);
|
||||
iconColor = const Color(0xFFDC2626);
|
||||
textColor = const Color(0xFFB91C1C);
|
||||
bg = UiColors.tagError;
|
||||
border = UiColors.borderError;
|
||||
iconColor = UiColors.textError;
|
||||
textColor = UiColors.textError;
|
||||
} else if (isInfo) {
|
||||
bg = const Color(0xFFEFF6FF);
|
||||
border = const Color(0xFFBFDBFE);
|
||||
iconColor = const Color(0xFF2563EB);
|
||||
textColor = const Color(0xFF1D4ED8);
|
||||
bg = UiColors.tagInProgress;
|
||||
border = UiColors.primary.withValues(alpha: 0.2);
|
||||
iconColor = UiColors.primary;
|
||||
textColor = UiColors.primary;
|
||||
}
|
||||
|
||||
return Container(
|
||||
|
||||
@@ -35,14 +35,14 @@ class HeaderIconButton extends StatelessWidget {
|
||||
clipBehavior: Clip.none,
|
||||
children: <Widget>[
|
||||
Container(
|
||||
width: 32,
|
||||
height: 32,
|
||||
width: UiConstants.space8,
|
||||
height: UiConstants.space8,
|
||||
decoration: BoxDecoration(
|
||||
color: isActive ? UiColors.primary : UiColors.white,
|
||||
borderRadius: UiConstants.radiusMd,
|
||||
boxShadow: <BoxShadow>[
|
||||
BoxShadow(
|
||||
color: Colors.black.withValues(alpha: 0.05),
|
||||
color: UiColors.black.withValues(alpha: 0.05),
|
||||
blurRadius: 2,
|
||||
),
|
||||
],
|
||||
@@ -50,20 +50,23 @@ class HeaderIconButton extends StatelessWidget {
|
||||
child: Icon(
|
||||
icon,
|
||||
color: isActive ? UiColors.white : UiColors.iconSecondary,
|
||||
size: 16,
|
||||
size: UiConstants.iconSm,
|
||||
),
|
||||
),
|
||||
if (badgeText != null)
|
||||
Positioned(
|
||||
top: -4,
|
||||
right: -4,
|
||||
top: -UiConstants.space1,
|
||||
right: -UiConstants.space1,
|
||||
child: Container(
|
||||
padding: const EdgeInsets.all(4),
|
||||
padding: const EdgeInsets.all(UiConstants.space1),
|
||||
decoration: const BoxDecoration(
|
||||
color: UiColors.iconError,
|
||||
shape: BoxShape.circle,
|
||||
),
|
||||
constraints: const BoxConstraints(minWidth: 16, minHeight: 16),
|
||||
constraints: const BoxConstraints(
|
||||
minWidth: UiConstants.space4,
|
||||
minHeight: UiConstants.space4,
|
||||
),
|
||||
child: Center(
|
||||
child: Text(
|
||||
badgeText!,
|
||||
|
||||
@@ -613,9 +613,9 @@ class _ShiftOrderFormSheetState extends State<ShiftOrderFormSheet> {
|
||||
|
||||
return Container(
|
||||
height: MediaQuery.of(context).size.height * 0.95,
|
||||
decoration: const BoxDecoration(
|
||||
decoration: BoxDecoration(
|
||||
color: UiColors.bgPrimary,
|
||||
borderRadius: BorderRadius.vertical(top: Radius.circular(24)),
|
||||
borderRadius: const BorderRadius.vertical(top: Radius.circular(UiConstants.space6)),
|
||||
),
|
||||
child: Column(
|
||||
children: <Widget>[
|
||||
@@ -773,10 +773,10 @@ class _ShiftOrderFormSheetState extends State<ShiftOrderFormSheet> {
|
||||
end: Alignment.bottomRight,
|
||||
colors: <Color>[
|
||||
UiColors.primary,
|
||||
Color(0xFF1E3A8A),
|
||||
UiColors.primary.withValues(alpha: 0.8),
|
||||
],
|
||||
),
|
||||
borderRadius: BorderRadius.vertical(top: Radius.circular(24)),
|
||||
borderRadius: const BorderRadius.vertical(top: Radius.circular(UiConstants.space6)),
|
||||
),
|
||||
child: Row(
|
||||
children: <Widget>[
|
||||
|
||||
@@ -52,8 +52,11 @@ class SpendingWidget extends StatelessWidget {
|
||||
Container(
|
||||
padding: const EdgeInsets.all(UiConstants.space3),
|
||||
decoration: BoxDecoration(
|
||||
gradient: const LinearGradient(
|
||||
colors: <Color>[UiColors.primary, Color(0xFF0830B8)],
|
||||
gradient: LinearGradient(
|
||||
colors: <Color>[
|
||||
UiColors.primary,
|
||||
UiColors.primary.withValues(alpha: 0.85),
|
||||
],
|
||||
begin: Alignment.topLeft,
|
||||
end: Alignment.bottomRight,
|
||||
),
|
||||
@@ -74,9 +77,12 @@ class SpendingWidget extends StatelessWidget {
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: <Widget>[
|
||||
const Text(
|
||||
Text(
|
||||
'This Week',
|
||||
style: TextStyle(color: Colors.white70, fontSize: 9),
|
||||
style: UiTypography.footnote2r.white.copyWith(
|
||||
color: UiColors.white.withValues(alpha: 0.7),
|
||||
fontSize: 9,
|
||||
),
|
||||
),
|
||||
const SizedBox(height: UiConstants.space1),
|
||||
Text(
|
||||
@@ -88,8 +94,8 @@ class SpendingWidget extends StatelessWidget {
|
||||
),
|
||||
Text(
|
||||
'$weeklyShifts shifts',
|
||||
style: TextStyle(
|
||||
color: Colors.white.withValues(alpha: 0.6),
|
||||
style: UiTypography.footnote2r.white.copyWith(
|
||||
color: UiColors.white.withValues(alpha: 0.6),
|
||||
fontSize: 9,
|
||||
),
|
||||
),
|
||||
@@ -100,9 +106,12 @@ class SpendingWidget extends StatelessWidget {
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.end,
|
||||
children: <Widget>[
|
||||
const Text(
|
||||
Text(
|
||||
'Next 7 Days',
|
||||
style: TextStyle(color: Colors.white70, fontSize: 9),
|
||||
style: UiTypography.footnote2r.white.copyWith(
|
||||
color: UiColors.white.withValues(alpha: 0.7),
|
||||
fontSize: 9,
|
||||
),
|
||||
),
|
||||
const SizedBox(height: UiConstants.space1),
|
||||
Text(
|
||||
@@ -114,8 +123,8 @@ class SpendingWidget extends StatelessWidget {
|
||||
),
|
||||
Text(
|
||||
'$next7DaysScheduled scheduled',
|
||||
style: TextStyle(
|
||||
color: Colors.white.withValues(alpha: 0.6),
|
||||
style: UiTypography.footnote2r.white.copyWith(
|
||||
color: UiColors.white.withValues(alpha: 0.6),
|
||||
fontSize: 9,
|
||||
),
|
||||
),
|
||||
|
||||
@@ -14,7 +14,6 @@ dependencies:
|
||||
flutter_bloc: ^8.1.0
|
||||
flutter_modular: ^6.3.0
|
||||
equatable: ^2.0.5
|
||||
lucide_icons: ^0.257.0
|
||||
|
||||
# Architecture Packages
|
||||
design_system:
|
||||
|
||||
@@ -27,7 +27,6 @@ dependencies:
|
||||
flutter_bloc: ^8.1.0
|
||||
flutter_modular: ^6.3.2
|
||||
equatable: ^2.0.5
|
||||
lucide_icons: ^0.257.0
|
||||
firebase_auth: ^6.1.4
|
||||
firebase_data_connect: ^0.2.2+2
|
||||
google_places_flutter: ^2.1.1
|
||||
|
||||
@@ -14,7 +14,6 @@ dependencies:
|
||||
flutter_bloc: ^8.1.0
|
||||
flutter_modular: ^6.3.0
|
||||
equatable: ^2.0.5
|
||||
lucide_icons: ^0.257.0
|
||||
firebase_auth: ^6.1.2
|
||||
|
||||
# Architecture Packages
|
||||
|
||||
@@ -33,7 +33,7 @@ class _ViewOrderCardState extends State<ViewOrderCard> {
|
||||
showModalBottomSheet<void>(
|
||||
context: context,
|
||||
isScrollControlled: true,
|
||||
backgroundColor: Colors.transparent,
|
||||
backgroundColor: UiColors.transparent,
|
||||
builder: (BuildContext context) => _OrderEditSheet(
|
||||
order: order,
|
||||
onUpdated: () => this.context.read<ViewOrdersCubit>().updateWeekOffset(0),
|
||||
@@ -161,7 +161,7 @@ class _ViewOrderCardState extends State<ViewOrderCard> {
|
||||
),
|
||||
decoration: BoxDecoration(
|
||||
color: statusColor.withValues(alpha: 0.1),
|
||||
borderRadius: BorderRadius.circular(4),
|
||||
borderRadius: UiConstants.radiusSm,
|
||||
),
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
@@ -174,7 +174,7 @@ class _ViewOrderCardState extends State<ViewOrderCard> {
|
||||
shape: BoxShape.circle,
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 6),
|
||||
const SizedBox(width: UiConstants.space1 + 2),
|
||||
Text(
|
||||
statusLabel.toUpperCase(),
|
||||
style: UiTypography.footnote2b.copyWith(
|
||||
@@ -215,7 +215,7 @@ class _ViewOrderCardState extends State<ViewOrderCard> {
|
||||
color: UiColors.iconSecondary,
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 4),
|
||||
const SizedBox(width: UiConstants.space1),
|
||||
Expanded(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
@@ -338,7 +338,7 @@ class _ViewOrderCardState extends State<ViewOrderCard> {
|
||||
size: 16,
|
||||
color: UiColors.textSuccess,
|
||||
),
|
||||
const SizedBox(width: 8),
|
||||
const SizedBox(width: UiConstants.space2),
|
||||
Text(
|
||||
coveragePercent == 100
|
||||
? 'All Workers Confirmed'
|
||||
@@ -355,9 +355,9 @@ class _ViewOrderCardState extends State<ViewOrderCard> {
|
||||
),
|
||||
],
|
||||
),
|
||||
const SizedBox(height: 10),
|
||||
const SizedBox(height: UiConstants.space2 + 2),
|
||||
ClipRRect(
|
||||
borderRadius: BorderRadius.circular(100),
|
||||
borderRadius: UiConstants.radiusFull,
|
||||
child: LinearProgressIndicator(
|
||||
value: coveragePercent / 100,
|
||||
backgroundColor: UiColors.bgSecondary,
|
||||
@@ -397,7 +397,7 @@ class _ViewOrderCardState extends State<ViewOrderCard> {
|
||||
color: UiColors.bgSecondary,
|
||||
border: Border(top: BorderSide(color: UiColors.border)),
|
||||
borderRadius: BorderRadius.vertical(
|
||||
bottom: Radius.circular(12),
|
||||
bottom: Radius.circular(UiConstants.radiusBase),
|
||||
),
|
||||
),
|
||||
padding: const EdgeInsets.all(UiConstants.space5),
|
||||
@@ -468,7 +468,7 @@ class _ViewOrderCardState extends State<ViewOrderCard> {
|
||||
label.toUpperCase(),
|
||||
style: UiTypography.titleUppercase4m.textSecondary,
|
||||
),
|
||||
const SizedBox(height: 4),
|
||||
const SizedBox(height: UiConstants.space1),
|
||||
Text(time, style: UiTypography.body1b.textPrimary),
|
||||
],
|
||||
),
|
||||
@@ -516,8 +516,8 @@ class _ViewOrderCardState extends State<ViewOrderCard> {
|
||||
Widget _buildWorkerRow(Map<String, dynamic> app) {
|
||||
final String? phone = app['phone'] as String?;
|
||||
return Container(
|
||||
margin: const EdgeInsets.only(bottom: 12),
|
||||
padding: const EdgeInsets.all(12),
|
||||
margin: const EdgeInsets.only(bottom: UiConstants.space3),
|
||||
padding: const EdgeInsets.all(UiConstants.space3),
|
||||
decoration: BoxDecoration(
|
||||
color: UiColors.white,
|
||||
borderRadius: UiConstants.radiusMd,
|
||||
@@ -526,14 +526,13 @@ class _ViewOrderCardState extends State<ViewOrderCard> {
|
||||
child: Row(
|
||||
children: <Widget>[
|
||||
CircleAvatar(
|
||||
radius: 20,
|
||||
backgroundColor: UiColors.primary.withValues(alpha: 0.1),
|
||||
child: Text(
|
||||
(app['worker_name'] as String)[0],
|
||||
style: UiTypography.body1b.copyWith(color: UiColors.primary),
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 12),
|
||||
const SizedBox(width: UiConstants.space3),
|
||||
Expanded(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
@@ -542,7 +541,7 @@ class _ViewOrderCardState extends State<ViewOrderCard> {
|
||||
app['worker_name'] as String,
|
||||
style: UiTypography.body2m.textPrimary,
|
||||
),
|
||||
const SizedBox(height: 2),
|
||||
const SizedBox(height: UiConstants.space1 / 2),
|
||||
Row(
|
||||
children: <Widget>[
|
||||
if ((app['rating'] as num?) != null &&
|
||||
@@ -559,7 +558,7 @@ class _ViewOrderCardState extends State<ViewOrderCard> {
|
||||
),
|
||||
],
|
||||
if (app['check_in_time'] != null) ...<Widget>[
|
||||
const SizedBox(width: 8),
|
||||
const SizedBox(width: UiConstants.space2),
|
||||
Container(
|
||||
padding: const EdgeInsets.symmetric(
|
||||
horizontal: 4,
|
||||
@@ -567,7 +566,7 @@ class _ViewOrderCardState extends State<ViewOrderCard> {
|
||||
),
|
||||
decoration: BoxDecoration(
|
||||
color: UiColors.textSuccess.withValues(alpha: 0.1),
|
||||
borderRadius: BorderRadius.circular(4),
|
||||
borderRadius: UiConstants.radiusSm,
|
||||
),
|
||||
child: Text(
|
||||
'Checked In',
|
||||
@@ -577,7 +576,7 @@ class _ViewOrderCardState extends State<ViewOrderCard> {
|
||||
),
|
||||
),
|
||||
] else if ((app['status'] as String?)?.isNotEmpty ?? false) ...<Widget>[
|
||||
const SizedBox(width: 8),
|
||||
const SizedBox(width: UiConstants.space2),
|
||||
Container(
|
||||
padding: const EdgeInsets.symmetric(
|
||||
horizontal: 4,
|
||||
@@ -585,7 +584,7 @@ class _ViewOrderCardState extends State<ViewOrderCard> {
|
||||
),
|
||||
decoration: BoxDecoration(
|
||||
color: UiColors.bgSecondary,
|
||||
borderRadius: BorderRadius.circular(4),
|
||||
borderRadius: UiConstants.radiusSm,
|
||||
),
|
||||
child: Text(
|
||||
(app['status'] as String).toUpperCase(),
|
||||
@@ -652,7 +651,7 @@ class _ViewOrderCardState extends State<ViewOrderCard> {
|
||||
height: 36,
|
||||
decoration: BoxDecoration(
|
||||
color: UiColors.bgSecondary,
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
borderRadius: BorderRadius.circular(UiConstants.space2),
|
||||
),
|
||||
child: Icon(icon, size: 16, color: UiColors.primary),
|
||||
),
|
||||
@@ -1447,11 +1446,7 @@ class _OrderEditSheetState extends State<_OrderEditSheet> {
|
||||
SizedBox(width: UiConstants.space2),
|
||||
Text(
|
||||
'Add Position',
|
||||
style: TextStyle(
|
||||
color: UiColors.primary,
|
||||
fontSize: 14,
|
||||
fontWeight: FontWeight.w500,
|
||||
),
|
||||
style: UiTypography.body2m.primary,
|
||||
),
|
||||
],
|
||||
),
|
||||
@@ -1484,7 +1479,7 @@ class _OrderEditSheetState extends State<_OrderEditSheet> {
|
||||
padding: const EdgeInsets.fromLTRB(20, 24, 20, 20),
|
||||
decoration: const BoxDecoration(
|
||||
color: UiColors.primary,
|
||||
borderRadius: BorderRadius.vertical(top: Radius.circular(24)),
|
||||
borderRadius: BorderRadius.vertical(top: Radius.circular(UiConstants.space6)),
|
||||
),
|
||||
child: Row(
|
||||
children: <Widget>[
|
||||
@@ -1887,7 +1882,7 @@ class _OrderEditSheetState extends State<_OrderEditSheet> {
|
||||
height: MediaQuery.of(context).size.height * 0.95,
|
||||
decoration: const BoxDecoration(
|
||||
color: UiColors.bgSecondary,
|
||||
borderRadius: BorderRadius.vertical(top: Radius.circular(24)),
|
||||
borderRadius: BorderRadius.vertical(top: Radius.circular(UiConstants.space6)),
|
||||
),
|
||||
child: Column(
|
||||
children: <Widget>[
|
||||
@@ -2123,7 +2118,7 @@ class _OrderEditSheetState extends State<_OrderEditSheet> {
|
||||
height: MediaQuery.of(context).size.height * 0.95,
|
||||
decoration: const BoxDecoration(
|
||||
color: UiColors.primary,
|
||||
borderRadius: BorderRadius.vertical(top: Radius.circular(24)),
|
||||
borderRadius: BorderRadius.vertical(top: Radius.circular(UiConstants.space6)),
|
||||
),
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
|
||||
@@ -57,7 +57,7 @@ class ViewOrdersFilterTab extends StatelessWidget {
|
||||
width: isSelected ? 40 : 0,
|
||||
decoration: BoxDecoration(
|
||||
color: UiColors.primary,
|
||||
borderRadius: BorderRadius.circular(2),
|
||||
borderRadius: UiConstants.radiusXs,
|
||||
),
|
||||
),
|
||||
if (!isSelected) const SizedBox(height: 2),
|
||||
|
||||
@@ -38,9 +38,9 @@ class ViewOrdersHeader extends StatelessWidget {
|
||||
child: BackdropFilter(
|
||||
filter: ImageFilter.blur(sigmaX: 10, sigmaY: 10),
|
||||
child: Container(
|
||||
decoration: const BoxDecoration(
|
||||
color: Color(0xCCFFFFFF), // White with 0.8 alpha
|
||||
border: Border(
|
||||
decoration: BoxDecoration(
|
||||
color: UiColors.white.withValues(alpha: 0.8), // White with 0.8 alpha
|
||||
border: const Border(
|
||||
bottom: BorderSide(color: UiColors.separatorSecondary),
|
||||
),
|
||||
),
|
||||
@@ -122,7 +122,7 @@ class ViewOrdersHeader extends StatelessWidget {
|
||||
IconButton(
|
||||
icon: const Icon(
|
||||
UiIcons.chevronLeft,
|
||||
size: 20,
|
||||
size: UiConstants.iconMd,
|
||||
color: UiColors.iconSecondary,
|
||||
),
|
||||
onPressed: () => BlocProvider.of<ViewOrdersCubit>(
|
||||
@@ -130,7 +130,7 @@ class ViewOrdersHeader extends StatelessWidget {
|
||||
).updateWeekOffset(-1),
|
||||
padding: EdgeInsets.zero,
|
||||
constraints: const BoxConstraints(),
|
||||
splashRadius: 20,
|
||||
splashRadius: UiConstants.iconMd,
|
||||
),
|
||||
Text(
|
||||
DateFormat('MMMM yyyy').format(calendarDays.first),
|
||||
@@ -141,7 +141,7 @@ class ViewOrdersHeader extends StatelessWidget {
|
||||
IconButton(
|
||||
icon: const Icon(
|
||||
UiIcons.chevronRight,
|
||||
size: 20,
|
||||
size: UiConstants.iconMd,
|
||||
color: UiColors.iconSecondary,
|
||||
),
|
||||
onPressed: () => BlocProvider.of<ViewOrdersCubit>(
|
||||
@@ -149,7 +149,7 @@ class ViewOrdersHeader extends StatelessWidget {
|
||||
).updateWeekOffset(1),
|
||||
padding: EdgeInsets.zero,
|
||||
constraints: const BoxConstraints(),
|
||||
splashRadius: 20,
|
||||
splashRadius: UiConstants.iconMd,
|
||||
),
|
||||
],
|
||||
),
|
||||
@@ -157,7 +157,7 @@ class ViewOrdersHeader extends StatelessWidget {
|
||||
|
||||
// Calendar Grid
|
||||
SizedBox(
|
||||
height: 72,
|
||||
height: UiConstants.space14 + UiConstants.space4,
|
||||
child: ListView.separated(
|
||||
padding: const EdgeInsets.symmetric(
|
||||
horizontal: UiConstants.space5,
|
||||
@@ -196,10 +196,10 @@ class ViewOrdersHeader extends StatelessWidget {
|
||||
).selectDate(date),
|
||||
child: AnimatedContainer(
|
||||
duration: const Duration(milliseconds: 200),
|
||||
width: 48,
|
||||
width: UiConstants.space12,
|
||||
decoration: BoxDecoration(
|
||||
color: isSelected ? UiColors.primary : UiColors.white,
|
||||
borderRadius: BorderRadius.circular(16),
|
||||
borderRadius: UiConstants.radiusLg,
|
||||
border: Border.all(
|
||||
color: isSelected
|
||||
? UiColors.primary
|
||||
@@ -212,7 +212,7 @@ class ViewOrdersHeader extends StatelessWidget {
|
||||
alpha: 0.25,
|
||||
),
|
||||
blurRadius: 12,
|
||||
offset: const Offset(0, 4),
|
||||
offset: const Offset(0, UiConstants.space1),
|
||||
),
|
||||
]
|
||||
: null,
|
||||
@@ -222,8 +222,8 @@ class ViewOrdersHeader extends StatelessWidget {
|
||||
children: <Widget>[
|
||||
Text(
|
||||
DateFormat('dd').format(date),
|
||||
style: UiTypography.title2b.copyWith(
|
||||
fontSize: 18,
|
||||
style: UiTypography.title1m.copyWith(
|
||||
fontWeight: FontWeight.bold,
|
||||
color: isSelected
|
||||
? UiColors.white
|
||||
: UiColors.textPrimary,
|
||||
@@ -240,8 +240,8 @@ class ViewOrdersHeader extends StatelessWidget {
|
||||
if (hasShifts) ...<Widget>[
|
||||
const SizedBox(height: UiConstants.space1),
|
||||
Container(
|
||||
width: 6,
|
||||
height: 6,
|
||||
width: UiConstants.space1 + 2,
|
||||
height: UiConstants.space1 + 2,
|
||||
decoration: BoxDecoration(
|
||||
color: isSelected
|
||||
? UiColors.white
|
||||
|
||||
@@ -28,7 +28,6 @@ dependencies:
|
||||
krow_data_connect:
|
||||
path: ../../../data_connect
|
||||
# UI
|
||||
lucide_icons: ^0.257.0
|
||||
intl: ^0.20.1
|
||||
url_launcher: ^6.3.1
|
||||
firebase_data_connect: ^0.2.2+2
|
||||
|
||||
Reference in New Issue
Block a user