chore: refactor UI consistency using design system tokens and remove LucideIcons
This commit is contained in:
@@ -20,6 +20,12 @@ class UiConstants {
|
||||
/// Extra small radius: 2px
|
||||
static final BorderRadius radiusXs = BorderRadius.circular(2.0);
|
||||
|
||||
/// Large radius: 16px
|
||||
static final BorderRadius radiusXl = BorderRadius.circular(16.0);
|
||||
|
||||
/// Extra large radius: 24px
|
||||
static final BorderRadius radius2xl = BorderRadius.circular(24.0);
|
||||
|
||||
/// Large/Full radius
|
||||
static final BorderRadius radiusFull = BorderRadius.circular(999.0);
|
||||
|
||||
@@ -40,4 +46,11 @@ class UiConstants {
|
||||
static const double space20 = 80.0;
|
||||
static const double space24 = 96.0;
|
||||
static const double space32 = 128.0;
|
||||
|
||||
// --- Icon Sizes ---
|
||||
static const double iconXs = 12.0;
|
||||
static const double iconSm = 16.0;
|
||||
static const double iconMd = 20.0;
|
||||
static const double iconLg = 24.0;
|
||||
static const double iconXl = 32.0;
|
||||
}
|
||||
|
||||
@@ -249,4 +249,19 @@ class UiIcons {
|
||||
|
||||
/// Ban icon for cancellations
|
||||
static const IconData ban = _IconLib.ban;
|
||||
|
||||
/// Footprints icon for attire
|
||||
static const IconData footprints = _IconLib.footprints;
|
||||
|
||||
/// Scissors icon for attire
|
||||
static const IconData scissors = _IconLib.scissors;
|
||||
|
||||
/// Shirt icon for attire
|
||||
static const IconData shirt = _IconLib.shirt;
|
||||
|
||||
/// Hard hat icon for attire
|
||||
static const IconData hardHat = _IconLib.hardHat;
|
||||
|
||||
/// Chef hat icon for attire
|
||||
static const IconData chefHat = _IconLib.chefHat;
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -16,11 +16,11 @@ class _GetStartedBackgroundState extends State<GetStartedBackground> {
|
||||
return Container(
|
||||
child: Column(
|
||||
children: [
|
||||
const SizedBox(height: 32),
|
||||
const SizedBox(height: UiConstants.space8),
|
||||
// Logo
|
||||
Image.asset(
|
||||
UiImageAssets.logoBlue,
|
||||
height: 40,
|
||||
height: UiConstants.space10,
|
||||
),
|
||||
Expanded(
|
||||
child: Center(
|
||||
@@ -29,16 +29,16 @@ class _GetStartedBackgroundState extends State<GetStartedBackground> {
|
||||
height: 288,
|
||||
decoration: BoxDecoration(
|
||||
shape: BoxShape.circle,
|
||||
color: const Color(0xFF3A4A5A).withOpacity(0.05),
|
||||
color: UiColors.foreground.withValues(alpha: 0.05),
|
||||
),
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
padding: const EdgeInsets.all(UiConstants.space2),
|
||||
child: ClipOval(
|
||||
child: Stack(
|
||||
fit: StackFit.expand,
|
||||
children: [
|
||||
// Layer 1: The Fallback Logo (Always visible until image loads)
|
||||
Padding(
|
||||
padding: const EdgeInsets.all(48.0),
|
||||
padding: const EdgeInsets.all(UiConstants.space12),
|
||||
child: Image.asset(UiImageAssets.logoBlue),
|
||||
),
|
||||
|
||||
@@ -85,29 +85,29 @@ class _GetStartedBackgroundState extends State<GetStartedBackground> {
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Container(
|
||||
width: 24,
|
||||
height: 8,
|
||||
width: UiConstants.space6,
|
||||
height: UiConstants.space2,
|
||||
decoration: BoxDecoration(
|
||||
color: UiColors.primary,
|
||||
borderRadius: BorderRadius.circular(4),
|
||||
borderRadius: UiConstants.radiusSm,
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 8),
|
||||
const SizedBox(width: UiConstants.space2),
|
||||
Container(
|
||||
width: 8,
|
||||
height: 8,
|
||||
decoration: BoxDecoration(
|
||||
color: UiColors.primary.withOpacity(0.2),
|
||||
borderRadius: BorderRadius.circular(4),
|
||||
color: UiColors.primary.withValues(alpha: 0.2),
|
||||
borderRadius: UiConstants.radiusSm,
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 8),
|
||||
const SizedBox(width: UiConstants.space2),
|
||||
Container(
|
||||
width: 8,
|
||||
height: 8,
|
||||
width: UiConstants.space2,
|
||||
height: UiConstants.space2,
|
||||
decoration: BoxDecoration(
|
||||
color: UiColors.primary.withOpacity(0.2),
|
||||
borderRadius: BorderRadius.circular(4),
|
||||
color: UiColors.primary.withValues(alpha: 0.2),
|
||||
borderRadius: UiConstants.radiusSm,
|
||||
),
|
||||
),
|
||||
],
|
||||
|
||||
@@ -14,7 +14,6 @@ dependencies:
|
||||
flutter_bloc: ^8.1.3
|
||||
equatable: ^2.0.5
|
||||
intl: ^0.20.2
|
||||
lucide_icons: ^0.257.0
|
||||
flutter_modular: ^6.3.2
|
||||
|
||||
# Internal packages
|
||||
|
||||
@@ -206,7 +206,7 @@ class _ShiftCardState extends State<ShiftCard> {
|
||||
)
|
||||
: Icon(
|
||||
UiIcons.building,
|
||||
size: 28,
|
||||
size: UiConstants.iconXl - 4, // 28px
|
||||
color: UiColors.primary,
|
||||
),
|
||||
),
|
||||
@@ -269,7 +269,7 @@ class _ShiftCardState extends State<ShiftCard> {
|
||||
children: [
|
||||
Icon(
|
||||
UiIcons.mapPin,
|
||||
size: 16,
|
||||
size: UiConstants.iconSm,
|
||||
color: UiColors.mutedForeground,
|
||||
),
|
||||
const SizedBox(width: 6),
|
||||
@@ -283,7 +283,7 @@ class _ShiftCardState extends State<ShiftCard> {
|
||||
const SizedBox(width: UiConstants.space4),
|
||||
Icon(
|
||||
UiIcons.calendar,
|
||||
size: 16,
|
||||
size: UiConstants.iconSm,
|
||||
color: UiColors.mutedForeground,
|
||||
),
|
||||
const SizedBox(width: 6),
|
||||
@@ -383,8 +383,8 @@ class _ShiftCardState extends State<ShiftCard> {
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Icon(icon, size: 14, color: text),
|
||||
const SizedBox(width: 4),
|
||||
Icon(icon, size: UiConstants.iconSm - 2, color: text),
|
||||
const SizedBox(width: UiConstants.space1),
|
||||
Flexible(
|
||||
child: Text(
|
||||
label,
|
||||
|
||||
@@ -47,7 +47,7 @@ class _PaymentsPageState extends State<PaymentsPage> {
|
||||
} else if (state is PaymentsError) {
|
||||
return Center(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(16.0),
|
||||
padding: const EdgeInsets.all(UiConstants.space4),
|
||||
child: Text(
|
||||
translateErrorKey(state.message),
|
||||
textAlign: TextAlign.center,
|
||||
@@ -218,7 +218,7 @@ class _PaymentsPageState extends State<PaymentsPage> {
|
||||
],
|
||||
),
|
||||
|
||||
const SizedBox(height: 100),
|
||||
const SizedBox(height: UiConstants.space24),
|
||||
],
|
||||
),
|
||||
),
|
||||
@@ -236,7 +236,7 @@ class _PaymentsPageState extends State<PaymentsPage> {
|
||||
child: Container(
|
||||
padding: const EdgeInsets.symmetric(vertical: UiConstants.space2),
|
||||
decoration: BoxDecoration(
|
||||
color: isSelected ? UiColors.white : Colors.transparent,
|
||||
color: isSelected ? UiColors.white : UiColors.transparent,
|
||||
borderRadius: BorderRadius.circular(UiConstants.radiusMdValue),
|
||||
),
|
||||
child: Center(
|
||||
|
||||
@@ -26,7 +26,6 @@ dependencies:
|
||||
firebase_data_connect: ^0.2.2+2
|
||||
firebase_auth: ^6.1.4
|
||||
flutter_modular: ^6.3.2
|
||||
lucide_icons: ^0.257.0
|
||||
intl: ^0.20.0
|
||||
fl_chart: ^0.66.0
|
||||
flutter_bloc: any
|
||||
|
||||
@@ -82,7 +82,7 @@ class StaffProfilePage extends StatelessWidget {
|
||||
if (state.status == ProfileStatus.error) {
|
||||
return Center(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(16.0),
|
||||
padding: const EdgeInsets.all(UiConstants.space4),
|
||||
child: Text(
|
||||
state.errorMessage != null
|
||||
? translateErrorKey(state.errorMessage!)
|
||||
@@ -112,7 +112,7 @@ class StaffProfilePage extends StatelessWidget {
|
||||
onSignOutTap: () => _onSignOut(cubit, state),
|
||||
),
|
||||
Transform.translate(
|
||||
offset: const Offset(0, -24),
|
||||
offset: const Offset(0, -UiConstants.space6),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(
|
||||
horizontal: UiConstants.space5,
|
||||
|
||||
@@ -22,7 +22,7 @@ class LogoutButton extends StatelessWidget {
|
||||
border: Border.all(color: UiColors.border),
|
||||
),
|
||||
child: Material(
|
||||
color: const Color(0x00000000),
|
||||
color: UiColors.transparent,
|
||||
child: InkWell(
|
||||
onTap: onTap,
|
||||
borderRadius: UiConstants.radiusLg,
|
||||
|
||||
@@ -84,14 +84,14 @@ class ReliabilityStatsCard extends StatelessWidget {
|
||||
child: Column(
|
||||
children: [
|
||||
Container(
|
||||
width: 40,
|
||||
height: 40,
|
||||
width: UiConstants.space10,
|
||||
height: UiConstants.space10,
|
||||
decoration: BoxDecoration(
|
||||
color: UiColors.primary.withValues(alpha: 0.1),
|
||||
borderRadius: BorderRadius.circular(UiConstants.radiusMdValue),
|
||||
),
|
||||
alignment: Alignment.center,
|
||||
child: Icon(icon, size: 20, color: UiColors.primary),
|
||||
child: Icon(icon, size: UiConstants.iconMd, color: UiColors.primary),
|
||||
),
|
||||
const SizedBox(height: UiConstants.space1),
|
||||
Text(
|
||||
|
||||
@@ -15,7 +15,6 @@ dependencies:
|
||||
bloc: ^8.1.0
|
||||
flutter_modular: ^6.3.0
|
||||
equatable: ^2.0.5
|
||||
lucide_icons: ^0.257.0
|
||||
|
||||
# Architecture Packages
|
||||
design_system:
|
||||
|
||||
@@ -44,7 +44,7 @@ class CertificatesPage extends StatelessWidget {
|
||||
? translateErrorKey(state.errorMessage!)
|
||||
: 'Error loading certificates',
|
||||
textAlign: TextAlign.center,
|
||||
style: const TextStyle(color: UiColors.textSecondary),
|
||||
style: UiTypography.body2r.textSecondary,
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
@@ -74,7 +74,7 @@ class CertificateCard extends StatelessWidget {
|
||||
size: 16,
|
||||
color: UiColors.textPrimary,
|
||||
),
|
||||
const SizedBox(width: 8),
|
||||
const SizedBox(width: UiConstants.space2),
|
||||
Text(
|
||||
isExpired
|
||||
? t.staff_certificates.card.expired
|
||||
@@ -198,7 +198,7 @@ class CertificateCard extends StatelessWidget {
|
||||
size: 16,
|
||||
color: UiColors.white,
|
||||
),
|
||||
const SizedBox(width: 8),
|
||||
const SizedBox(width: UiConstants.space2),
|
||||
Text(
|
||||
t.staff_certificates.card.upload_button,
|
||||
style: UiTypography.body2m.white,
|
||||
@@ -265,14 +265,14 @@ class CertificateCard extends StatelessWidget {
|
||||
Row(
|
||||
children: <Widget>[
|
||||
Container(
|
||||
width: 8,
|
||||
height: 8,
|
||||
width: UiConstants.space2,
|
||||
height: UiConstants.space2,
|
||||
decoration: const BoxDecoration(
|
||||
color: UiColors.primary,
|
||||
shape: BoxShape.circle,
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 8),
|
||||
const SizedBox(width: UiConstants.space2),
|
||||
Text(
|
||||
t.staff_certificates.card.verified,
|
||||
style: UiTypography.body2m.textPrimary,
|
||||
@@ -305,7 +305,7 @@ class CertificateCard extends StatelessWidget {
|
||||
shape: BoxShape.circle,
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 8),
|
||||
const SizedBox(width: UiConstants.space2),
|
||||
Text(
|
||||
t.staff_certificates.card.expiring_soon,
|
||||
style: UiTypography.body2m.copyWith(
|
||||
@@ -329,7 +329,7 @@ class CertificateCard extends StatelessWidget {
|
||||
Row(
|
||||
children: <Widget>[
|
||||
_buildIconButton(UiIcons.eye, onView),
|
||||
const SizedBox(width: 8),
|
||||
const SizedBox(width: UiConstants.space2),
|
||||
_buildSmallOutlineButton(
|
||||
t.staff_certificates.card.renew,
|
||||
onUpload,
|
||||
@@ -349,9 +349,9 @@ class CertificateCard extends StatelessWidget {
|
||||
height: 32,
|
||||
decoration: BoxDecoration(
|
||||
shape: BoxShape.circle,
|
||||
color: Colors.transparent,
|
||||
color: UiColors.transparent,
|
||||
border: Border.all(
|
||||
color: Colors.transparent,
|
||||
color: UiColors.transparent,
|
||||
),
|
||||
),
|
||||
child: Center(
|
||||
@@ -365,8 +365,10 @@ class CertificateCard extends StatelessWidget {
|
||||
return OutlinedButton(
|
||||
onPressed: onTap,
|
||||
style: OutlinedButton.styleFrom(
|
||||
side: const BorderSide(color: Color(0x660A39DF)), // Primary with opacity
|
||||
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(20)),
|
||||
side: BorderSide(color: UiColors.primary.withValues(alpha: 0.4)), // Primary with opacity
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: UiConstants.radiusFull,
|
||||
),
|
||||
padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 0),
|
||||
minimumSize: const Size(0, 32),
|
||||
),
|
||||
@@ -397,11 +399,11 @@ class CertificateCard extends StatelessWidget {
|
||||
_CertificateUiProps _getUiProps(String id) {
|
||||
switch (id) {
|
||||
case 'background':
|
||||
return _CertificateUiProps(UiIcons.fileCheck, const Color(0xFF0A39DF));
|
||||
return _CertificateUiProps(UiIcons.fileCheck, UiColors.primary);
|
||||
case 'food_handler':
|
||||
return _CertificateUiProps(UiIcons.utensils, const Color(0xFF0A39DF));
|
||||
return _CertificateUiProps(UiIcons.utensils, UiColors.primary);
|
||||
case 'rbs':
|
||||
return _CertificateUiProps(UiIcons.wine, const Color(0xFF121826));
|
||||
return _CertificateUiProps(UiIcons.wine, UiColors.foreground);
|
||||
default:
|
||||
// Default generic icon
|
||||
return _CertificateUiProps(UiIcons.award, UiColors.primary);
|
||||
|
||||
@@ -22,19 +22,19 @@ class CertificatesHeader extends StatelessWidget {
|
||||
return Container(
|
||||
padding: const EdgeInsets.fromLTRB(
|
||||
UiConstants.space5,
|
||||
60,
|
||||
UiConstants.space15,
|
||||
UiConstants.space5,
|
||||
80,
|
||||
UiConstants.space20,
|
||||
),
|
||||
// Keeping gradient as per prototype layout requirement
|
||||
decoration: const BoxDecoration(
|
||||
decoration: BoxDecoration(
|
||||
gradient: LinearGradient(
|
||||
begin: Alignment.topLeft,
|
||||
end: Alignment.bottomRight,
|
||||
colors: <Color>[
|
||||
UiColors.primary,
|
||||
Color(0xFF1E40AF),
|
||||
], // Using Primary and a darker shade
|
||||
UiColors.primary.withValues(alpha: 0.8),
|
||||
],
|
||||
),
|
||||
),
|
||||
child: Column(
|
||||
@@ -44,16 +44,16 @@ class CertificatesHeader extends StatelessWidget {
|
||||
GestureDetector(
|
||||
onTap: () => Modular.to.pop(),
|
||||
child: Container(
|
||||
width: 40,
|
||||
height: 40,
|
||||
width: UiConstants.space10,
|
||||
height: UiConstants.space10,
|
||||
decoration: BoxDecoration(
|
||||
color: UiColors.white.withValues(alpha: 0.1),
|
||||
shape: BoxShape.circle,
|
||||
),
|
||||
child: const Icon(
|
||||
UiIcons.chevronLeft, // Swapped LucideIcons
|
||||
UiIcons.chevronLeft,
|
||||
color: UiColors.white,
|
||||
size: 20,
|
||||
size: UiConstants.iconMd,
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -98,7 +98,7 @@ class CertificatesHeader extends StatelessWidget {
|
||||
t.staff_certificates.progress.title,
|
||||
style: UiTypography.body1b.white,
|
||||
),
|
||||
const SizedBox(height: 4),
|
||||
const SizedBox(height: UiConstants.space1),
|
||||
Text(
|
||||
t.staff_certificates.progress.verified_count(
|
||||
completed: completedCount, total: totalCount),
|
||||
@@ -112,9 +112,9 @@ class CertificatesHeader extends StatelessWidget {
|
||||
const Icon(
|
||||
UiIcons.shield,
|
||||
color: UiColors.accent,
|
||||
size: 16,
|
||||
size: UiConstants.iconSm,
|
||||
),
|
||||
const SizedBox(width: 8),
|
||||
const SizedBox(width: UiConstants.space2),
|
||||
Text(
|
||||
t.staff_certificates.progress.active,
|
||||
style: UiTypography.body3m.accent,
|
||||
|
||||
@@ -53,7 +53,7 @@ class DocumentsPage extends StatelessWidget {
|
||||
if (state.status == DocumentsStatus.failure) {
|
||||
return Center(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(16.0),
|
||||
padding: const EdgeInsets.all(UiConstants.space4),
|
||||
child: Text(
|
||||
state.errorMessage != null
|
||||
? (state.errorMessage!.contains('errors.')
|
||||
@@ -76,14 +76,17 @@ class DocumentsPage extends StatelessWidget {
|
||||
}
|
||||
|
||||
return ListView(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 20, vertical: 24),
|
||||
padding: const EdgeInsets.symmetric(
|
||||
horizontal: UiConstants.space5,
|
||||
vertical: UiConstants.space6,
|
||||
),
|
||||
children: <Widget>[
|
||||
DocumentsProgressCard(
|
||||
completedCount: state.completedCount,
|
||||
totalCount: state.totalCount,
|
||||
progress: state.progress,
|
||||
),
|
||||
const SizedBox(height: 16),
|
||||
const SizedBox(height: UiConstants.space4),
|
||||
...state.documents.map(
|
||||
(StaffDocument doc) => DocumentCard(
|
||||
document: doc,
|
||||
|
||||
@@ -32,7 +32,7 @@ class DocumentCard extends StatelessWidget {
|
||||
height: 40,
|
||||
decoration: BoxDecoration(
|
||||
color: UiColors.primary.withValues(alpha: 0.1),
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
borderRadius: BorderRadius.circular(UiConstants.space2),
|
||||
),
|
||||
child: const Center(
|
||||
child: Icon(
|
||||
@@ -57,7 +57,7 @@ class DocumentCard extends StatelessWidget {
|
||||
_getStatusIcon(document.status),
|
||||
],
|
||||
),
|
||||
const SizedBox(height: 2),
|
||||
const SizedBox(height: UiConstants.space1 / 2),
|
||||
if (document.description != null)
|
||||
Text(
|
||||
document.description!,
|
||||
@@ -139,7 +139,7 @@ class DocumentCard extends StatelessWidget {
|
||||
padding: const EdgeInsets.symmetric(horizontal: 8, vertical: 2),
|
||||
decoration: BoxDecoration(
|
||||
color: bg,
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
borderRadius: UiConstants.radiusFull,
|
||||
),
|
||||
child: Text(
|
||||
label,
|
||||
@@ -154,7 +154,7 @@ class DocumentCard extends StatelessWidget {
|
||||
final bool isVerified = status == DocumentStatus.verified;
|
||||
return InkWell(
|
||||
onTap: onTap,
|
||||
borderRadius: BorderRadius.circular(4),
|
||||
borderRadius: UiConstants.radiusSm,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 8, vertical: 4),
|
||||
child: Row(
|
||||
|
||||
@@ -48,12 +48,12 @@ class DocumentsProgressCard extends StatelessWidget {
|
||||
),
|
||||
],
|
||||
),
|
||||
const SizedBox(height: 8),
|
||||
const SizedBox(height: UiConstants.space2),
|
||||
ClipRRect(
|
||||
borderRadius: BorderRadius.circular(4),
|
||||
borderRadius: UiConstants.radiusSm,
|
||||
child: LinearProgressIndicator(
|
||||
value: progress,
|
||||
minHeight: 8,
|
||||
minHeight: UiConstants.space2,
|
||||
backgroundColor: UiColors.border,
|
||||
valueColor: const AlwaysStoppedAnimation<Color>(
|
||||
UiColors.primary,
|
||||
|
||||
@@ -15,7 +15,6 @@ dependencies:
|
||||
bloc: ^8.1.0
|
||||
flutter_modular: ^6.3.0
|
||||
equatable: ^2.0.5
|
||||
lucide_icons: ^0.257.0
|
||||
firebase_auth: ^6.1.4
|
||||
firebase_data_connect: ^0.2.2+2
|
||||
|
||||
|
||||
@@ -97,7 +97,11 @@ class _FormI9PageState extends State<FormI9Page> {
|
||||
context,
|
||||
message: translateErrorKey(state.errorMessage ?? 'An error occurred'),
|
||||
type: UiSnackbarType.error,
|
||||
margin: const EdgeInsets.only(left: 16, right: 16, bottom: 100),
|
||||
margin: const EdgeInsets.only(
|
||||
left: UiConstants.space4,
|
||||
right: UiConstants.space4,
|
||||
bottom: 120,
|
||||
),
|
||||
);
|
||||
}
|
||||
},
|
||||
@@ -137,7 +141,7 @@ class _FormI9PageState extends State<FormI9Page> {
|
||||
padding: const EdgeInsets.all(UiConstants.space8),
|
||||
decoration: BoxDecoration(
|
||||
color: UiColors.bgPopup,
|
||||
borderRadius: BorderRadius.circular(24),
|
||||
borderRadius: UiConstants.radiusLg,
|
||||
border: Border.all(color: UiColors.border),
|
||||
),
|
||||
child: Column(
|
||||
@@ -257,7 +261,7 @@ class _FormI9PageState extends State<FormI9Page> {
|
||||
color: idx <= state.currentStep
|
||||
? UiColors.white
|
||||
: UiColors.white.withValues(alpha: 0.3),
|
||||
borderRadius: BorderRadius.circular(2),
|
||||
borderRadius: UiConstants.radiusXs,
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -331,7 +335,7 @@ class _FormI9PageState extends State<FormI9Page> {
|
||||
fontWeight: FontWeight.w500,
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 6),
|
||||
const SizedBox(height: UiConstants.space1 + 2),
|
||||
TextField(
|
||||
controller: TextEditingController(text: value)
|
||||
..selection = TextSelection.fromPosition(
|
||||
@@ -342,7 +346,7 @@ class _FormI9PageState extends State<FormI9Page> {
|
||||
style: UiTypography.body2r.textPrimary,
|
||||
decoration: InputDecoration(
|
||||
hintText: placeholder,
|
||||
hintStyle: const TextStyle(color: UiColors.textPlaceholder),
|
||||
hintStyle: UiTypography.body2r.textPlaceholder,
|
||||
filled: true,
|
||||
fillColor: UiColors.bgPopup,
|
||||
contentPadding: const EdgeInsets.symmetric(
|
||||
@@ -384,7 +388,7 @@ class _FormI9PageState extends State<FormI9Page> {
|
||||
placeholder: i18n.fields.hints.first_name,
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 12),
|
||||
const SizedBox(width: UiConstants.space3),
|
||||
Expanded(
|
||||
child: _buildTextField(
|
||||
i18n.fields.last_name,
|
||||
@@ -395,7 +399,7 @@ class _FormI9PageState extends State<FormI9Page> {
|
||||
),
|
||||
],
|
||||
),
|
||||
const SizedBox(height: 16),
|
||||
const SizedBox(height: UiConstants.space4),
|
||||
Row(
|
||||
children: <Widget>[
|
||||
Expanded(
|
||||
@@ -406,7 +410,7 @@ class _FormI9PageState extends State<FormI9Page> {
|
||||
placeholder: i18n.fields.hints.middle_initial,
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 12),
|
||||
const SizedBox(width: UiConstants.space3),
|
||||
Expanded(
|
||||
flex: 2,
|
||||
child: _buildTextField(
|
||||
@@ -418,7 +422,7 @@ class _FormI9PageState extends State<FormI9Page> {
|
||||
),
|
||||
],
|
||||
),
|
||||
const SizedBox(height: 16),
|
||||
const SizedBox(height: UiConstants.space4),
|
||||
_buildTextField(
|
||||
i18n.fields.dob,
|
||||
value: state.dob,
|
||||
@@ -426,7 +430,7 @@ class _FormI9PageState extends State<FormI9Page> {
|
||||
placeholder: i18n.fields.hints.dob,
|
||||
keyboardType: TextInputType.datetime,
|
||||
),
|
||||
const SizedBox(height: 16),
|
||||
const SizedBox(height: UiConstants.space4),
|
||||
_buildTextField(
|
||||
i18n.fields.ssn,
|
||||
value: state.ssn,
|
||||
@@ -438,7 +442,7 @@ class _FormI9PageState extends State<FormI9Page> {
|
||||
context.read<FormI9Cubit>().ssnChanged(text);
|
||||
},
|
||||
),
|
||||
const SizedBox(height: 16),
|
||||
const SizedBox(height: UiConstants.space4),
|
||||
_buildTextField(
|
||||
i18n.fields.email,
|
||||
value: state.email,
|
||||
@@ -446,7 +450,7 @@ class _FormI9PageState extends State<FormI9Page> {
|
||||
keyboardType: TextInputType.emailAddress,
|
||||
placeholder: i18n.fields.hints.email,
|
||||
),
|
||||
const SizedBox(height: 16),
|
||||
const SizedBox(height: UiConstants.space4),
|
||||
_buildTextField(
|
||||
i18n.fields.phone,
|
||||
value: state.phone,
|
||||
@@ -471,14 +475,14 @@ class _FormI9PageState extends State<FormI9Page> {
|
||||
onChanged: (String val) => context.read<FormI9Cubit>().addressChanged(val),
|
||||
placeholder: i18n.fields.hints.address,
|
||||
),
|
||||
const SizedBox(height: 16),
|
||||
const SizedBox(height: UiConstants.space4),
|
||||
_buildTextField(
|
||||
i18n.fields.apt,
|
||||
value: state.aptNumber,
|
||||
onChanged: (String val) => context.read<FormI9Cubit>().aptNumberChanged(val),
|
||||
placeholder: i18n.fields.hints.apt,
|
||||
),
|
||||
const SizedBox(height: 16),
|
||||
const SizedBox(height: UiConstants.space4),
|
||||
Row(
|
||||
children: <Widget>[
|
||||
Expanded(
|
||||
@@ -490,7 +494,7 @@ class _FormI9PageState extends State<FormI9Page> {
|
||||
placeholder: i18n.fields.hints.city,
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 12),
|
||||
const SizedBox(width: UiConstants.space3),
|
||||
Expanded(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
@@ -501,7 +505,7 @@ class _FormI9PageState extends State<FormI9Page> {
|
||||
fontWeight: FontWeight.w500,
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 6),
|
||||
const SizedBox(height: UiConstants.space1 + 2),
|
||||
DropdownButtonFormField<String>(
|
||||
value: state.state.isEmpty ? null : state.state,
|
||||
onChanged: (String? val) =>
|
||||
@@ -533,7 +537,7 @@ class _FormI9PageState extends State<FormI9Page> {
|
||||
),
|
||||
],
|
||||
),
|
||||
const SizedBox(height: 16),
|
||||
const SizedBox(height: UiConstants.space4),
|
||||
_buildTextField(
|
||||
i18n.fields.zip,
|
||||
value: state.zipCode,
|
||||
@@ -564,14 +568,14 @@ class _FormI9PageState extends State<FormI9Page> {
|
||||
'CITIZEN',
|
||||
i18n.fields.citizen,
|
||||
),
|
||||
const SizedBox(height: 12),
|
||||
const SizedBox(height: UiConstants.space3),
|
||||
_buildRadioOption(
|
||||
context,
|
||||
state,
|
||||
'NONCITIZEN',
|
||||
i18n.fields.noncitizen,
|
||||
),
|
||||
const SizedBox(height: 12),
|
||||
const SizedBox(height: UiConstants.space3),
|
||||
_buildRadioOption(
|
||||
context,
|
||||
state,
|
||||
@@ -579,7 +583,7 @@ class _FormI9PageState extends State<FormI9Page> {
|
||||
i18n.fields.permanent_resident,
|
||||
child: state.citizenshipStatus == 'PERMANENT_RESIDENT'
|
||||
? Padding(
|
||||
padding: const EdgeInsets.only(top: 12),
|
||||
padding: const EdgeInsets.only(top: UiConstants.space3),
|
||||
child: _buildTextField(
|
||||
i18n.fields.uscis_number_label,
|
||||
value: state.uscisNumber,
|
||||
@@ -589,7 +593,7 @@ class _FormI9PageState extends State<FormI9Page> {
|
||||
)
|
||||
: null,
|
||||
),
|
||||
const SizedBox(height: 12),
|
||||
const SizedBox(height: UiConstants.space3),
|
||||
_buildRadioOption(
|
||||
context,
|
||||
state,
|
||||
@@ -597,7 +601,7 @@ class _FormI9PageState extends State<FormI9Page> {
|
||||
i18n.fields.alien,
|
||||
child: state.citizenshipStatus == 'ALIEN'
|
||||
? Padding(
|
||||
padding: const EdgeInsets.only(top: 12),
|
||||
padding: const EdgeInsets.only(top: UiConstants.space3),
|
||||
child: Column(
|
||||
children: <Widget>[
|
||||
_buildTextField(
|
||||
@@ -605,13 +609,13 @@ class _FormI9PageState extends State<FormI9Page> {
|
||||
value: state.admissionNumber,
|
||||
onChanged: (String val) => context.read<FormI9Cubit>().admissionNumberChanged(val),
|
||||
),
|
||||
const SizedBox(height: 12),
|
||||
const SizedBox(height: UiConstants.space3),
|
||||
_buildTextField(
|
||||
i18n.fields.passport,
|
||||
value: state.passportNumber,
|
||||
onChanged: (String val) => context.read<FormI9Cubit>().passportNumberChanged(val),
|
||||
),
|
||||
const SizedBox(height: 12),
|
||||
const SizedBox(height: UiConstants.space3),
|
||||
_buildTextField(
|
||||
i18n.fields.country,
|
||||
value: state.countryIssuance,
|
||||
@@ -657,7 +661,7 @@ class _FormI9PageState extends State<FormI9Page> {
|
||||
shape: BoxShape.circle,
|
||||
border: Border.all(
|
||||
color: isSelected ? UiColors.primary : UiColors.border,
|
||||
width: isSelected ? 6 : 2,
|
||||
width: isSelected ? UiConstants.radiusMdValue : 2,
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -744,7 +748,7 @@ class _FormI9PageState extends State<FormI9Page> {
|
||||
i18n.fields.signature_label,
|
||||
style: UiTypography.body3m.textSecondary,
|
||||
),
|
||||
const SizedBox(height: 6),
|
||||
const SizedBox(height: UiConstants.space1 + 2),
|
||||
TextField(
|
||||
controller: TextEditingController(text: state.signature)
|
||||
..selection = TextSelection.fromPosition(
|
||||
@@ -780,7 +784,7 @@ class _FormI9PageState extends State<FormI9Page> {
|
||||
i18n.fields.date_label,
|
||||
style: UiTypography.body3m.textSecondary,
|
||||
),
|
||||
const SizedBox(height: 6),
|
||||
const SizedBox(height: UiConstants.space1 + 2),
|
||||
Container(
|
||||
width: double.infinity,
|
||||
padding: const EdgeInsets.symmetric(
|
||||
@@ -794,7 +798,7 @@ class _FormI9PageState extends State<FormI9Page> {
|
||||
),
|
||||
child: Text(
|
||||
DateTime.now().toString().split(' ')[0],
|
||||
style: const TextStyle(color: UiColors.textPrimary),
|
||||
style: UiTypography.body1r.textPrimary,
|
||||
),
|
||||
),
|
||||
],
|
||||
@@ -878,7 +882,7 @@ class _FormI9PageState extends State<FormI9Page> {
|
||||
size: 16,
|
||||
color: UiColors.textPrimary,
|
||||
),
|
||||
const SizedBox(width: 8),
|
||||
const SizedBox(width: UiConstants.space2),
|
||||
Text(
|
||||
i18n.back,
|
||||
style: UiTypography.body2r.textPrimary,
|
||||
@@ -926,7 +930,7 @@ class _FormI9PageState extends State<FormI9Page> {
|
||||
: i18n.kContinue,
|
||||
),
|
||||
if (state.currentStep < steps.length - 1) ...<Widget>[
|
||||
const SizedBox(width: 8),
|
||||
const SizedBox(width: UiConstants.space2),
|
||||
const Icon(UiIcons.arrowRight, size: 16, color: UiColors.white),
|
||||
],
|
||||
],
|
||||
|
||||
@@ -145,7 +145,11 @@ class _FormW4PageState extends State<FormW4Page> {
|
||||
context,
|
||||
message: translateErrorKey(state.errorMessage ?? 'An error occurred'),
|
||||
type: UiSnackbarType.error,
|
||||
margin: const EdgeInsets.only(left: 16, right: 16, bottom: 100),
|
||||
margin: const EdgeInsets.only(
|
||||
left: UiConstants.space4,
|
||||
right: UiConstants.space4,
|
||||
bottom: 100,
|
||||
),
|
||||
);
|
||||
}
|
||||
},
|
||||
@@ -185,7 +189,7 @@ class _FormW4PageState extends State<FormW4Page> {
|
||||
padding: const EdgeInsets.all(UiConstants.space8),
|
||||
decoration: BoxDecoration(
|
||||
color: UiColors.bgPopup,
|
||||
borderRadius: BorderRadius.circular(24),
|
||||
borderRadius: UiConstants.radiusLg,
|
||||
border: Border.all(color: UiColors.border),
|
||||
),
|
||||
child: Column(
|
||||
@@ -305,7 +309,7 @@ class _FormW4PageState extends State<FormW4Page> {
|
||||
color: idx <= state.currentStep
|
||||
? UiColors.white
|
||||
: UiColors.white.withValues(alpha: 0.3),
|
||||
borderRadius: BorderRadius.circular(2),
|
||||
borderRadius: UiConstants.radiusXs,
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -380,7 +384,7 @@ class _FormW4PageState extends State<FormW4Page> {
|
||||
fontWeight: FontWeight.w500,
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 6),
|
||||
const SizedBox(height: UiConstants.space1 + 2),
|
||||
TextField(
|
||||
controller: TextEditingController(text: value)
|
||||
..selection = TextSelection.fromPosition(
|
||||
@@ -391,7 +395,7 @@ class _FormW4PageState extends State<FormW4Page> {
|
||||
style: UiTypography.body2r.textPrimary,
|
||||
decoration: InputDecoration(
|
||||
hintText: placeholder,
|
||||
hintStyle: const TextStyle(color: UiColors.textPlaceholder),
|
||||
hintStyle: UiTypography.body2r.textPlaceholder,
|
||||
filled: true,
|
||||
fillColor: UiColors.bgPopup,
|
||||
contentPadding: const EdgeInsets.symmetric(
|
||||
@@ -433,7 +437,7 @@ class _FormW4PageState extends State<FormW4Page> {
|
||||
placeholder: i18n.fields.placeholder_john,
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 12),
|
||||
const SizedBox(width: UiConstants.space3),
|
||||
Expanded(
|
||||
child: _buildTextField(
|
||||
i18n.fields.last_name,
|
||||
@@ -444,7 +448,7 @@ class _FormW4PageState extends State<FormW4Page> {
|
||||
),
|
||||
],
|
||||
),
|
||||
const SizedBox(height: 16),
|
||||
const SizedBox(height: UiConstants.space4),
|
||||
_buildTextField(
|
||||
i18n.fields.ssn,
|
||||
value: state.ssn,
|
||||
@@ -456,14 +460,14 @@ class _FormW4PageState extends State<FormW4Page> {
|
||||
context.read<FormW4Cubit>().ssnChanged(text);
|
||||
},
|
||||
),
|
||||
const SizedBox(height: 16),
|
||||
const SizedBox(height: UiConstants.space4),
|
||||
_buildTextField(
|
||||
i18n.fields.address,
|
||||
value: state.address,
|
||||
onChanged: (String val) => context.read<FormW4Cubit>().addressChanged(val),
|
||||
placeholder: i18n.fields.placeholder_address,
|
||||
),
|
||||
const SizedBox(height: 16),
|
||||
const SizedBox(height: UiConstants.space4),
|
||||
_buildTextField(
|
||||
i18n.fields.city_state_zip,
|
||||
value: state.cityStateZip,
|
||||
@@ -508,7 +512,7 @@ class _FormW4PageState extends State<FormW4Page> {
|
||||
i18n.fields.single,
|
||||
null,
|
||||
),
|
||||
const SizedBox(height: 12),
|
||||
const SizedBox(height: UiConstants.space3),
|
||||
_buildRadioOption(
|
||||
context,
|
||||
state,
|
||||
@@ -516,7 +520,7 @@ class _FormW4PageState extends State<FormW4Page> {
|
||||
i18n.fields.married,
|
||||
null,
|
||||
),
|
||||
const SizedBox(height: 12),
|
||||
const SizedBox(height: UiConstants.space3),
|
||||
_buildRadioOption(
|
||||
context,
|
||||
state,
|
||||
@@ -559,7 +563,7 @@ class _FormW4PageState extends State<FormW4Page> {
|
||||
shape: BoxShape.circle,
|
||||
border: Border.all(
|
||||
color: isSelected ? UiColors.primary : UiColors.border,
|
||||
width: isSelected ? 6 : 2,
|
||||
width: isSelected ? UiConstants.radiusMdValue : 2,
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -650,7 +654,7 @@ class _FormW4PageState extends State<FormW4Page> {
|
||||
height: 24,
|
||||
decoration: BoxDecoration(
|
||||
color: state.multipleJobs ? UiColors.primary : UiColors.bgPopup,
|
||||
borderRadius: BorderRadius.circular(6),
|
||||
borderRadius: UiConstants.radiusMd,
|
||||
border: Border.all(
|
||||
color: state.multipleJobs ? UiColors.primary : UiColors.border,
|
||||
),
|
||||
@@ -684,7 +688,7 @@ class _FormW4PageState extends State<FormW4Page> {
|
||||
),
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 16),
|
||||
const SizedBox(height: UiConstants.space4),
|
||||
Text(
|
||||
i18n.fields.multiple_jobs_not_apply,
|
||||
textAlign: TextAlign.center,
|
||||
@@ -754,11 +758,11 @@ class _FormW4PageState extends State<FormW4Page> {
|
||||
),
|
||||
),
|
||||
if (_totalCredits(state) > 0) ...<Widget>[
|
||||
const SizedBox(height: 16),
|
||||
const SizedBox(height: UiConstants.space4),
|
||||
Container(
|
||||
padding: const EdgeInsets.all(UiConstants.space4),
|
||||
decoration: BoxDecoration(
|
||||
color: const Color(0xFFDCFCE7),
|
||||
color: UiColors.tagSuccess,
|
||||
borderRadius: UiConstants.radiusLg,
|
||||
),
|
||||
child: Row(
|
||||
@@ -766,17 +770,12 @@ class _FormW4PageState extends State<FormW4Page> {
|
||||
children: <Widget>[
|
||||
Text(
|
||||
i18n.fields.total_credits,
|
||||
style: const TextStyle(
|
||||
fontWeight: FontWeight.w500,
|
||||
color: Color(0xFF166534),
|
||||
),
|
||||
style: UiTypography.body2m.textSuccess,
|
||||
),
|
||||
Text(
|
||||
'\$${_totalCredits(state)}',
|
||||
style: const TextStyle(
|
||||
fontWeight: FontWeight.bold,
|
||||
style: UiTypography.body2b.success.copyWith(
|
||||
fontSize: 18,
|
||||
color: Color(0xFF15803D),
|
||||
),
|
||||
),
|
||||
],
|
||||
@@ -821,7 +820,7 @@ class _FormW4PageState extends State<FormW4Page> {
|
||||
),
|
||||
],
|
||||
),
|
||||
const SizedBox(height: 12),
|
||||
const SizedBox(height: UiConstants.space3),
|
||||
Row(
|
||||
children: <Widget>[
|
||||
_buildCircleBtn(
|
||||
@@ -833,7 +832,7 @@ class _FormW4PageState extends State<FormW4Page> {
|
||||
child: Text(
|
||||
value.toString(),
|
||||
textAlign: TextAlign.center,
|
||||
style: const TextStyle(
|
||||
style: UiTypography.headline3m.textPrimary.copyWith(
|
||||
fontSize: 20,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
@@ -877,7 +876,7 @@ class _FormW4PageState extends State<FormW4Page> {
|
||||
i18n.fields.adjustments_info,
|
||||
style: UiTypography.body2r.textSecondary,
|
||||
),
|
||||
const SizedBox(height: 24),
|
||||
const SizedBox(height: UiConstants.space6),
|
||||
_buildTextField(
|
||||
i18n.fields.other_income,
|
||||
value: state.otherIncome,
|
||||
@@ -948,7 +947,7 @@ class _FormW4PageState extends State<FormW4Page> {
|
||||
i18n.fields.summary_title,
|
||||
style: UiTypography.headline4m.copyWith(fontSize: 14),
|
||||
),
|
||||
const SizedBox(height: 12),
|
||||
const SizedBox(height: UiConstants.space3),
|
||||
_buildSummaryRow(
|
||||
i18n.fields.summary_name,
|
||||
'${state.firstName} ${state.lastName}',
|
||||
@@ -965,12 +964,12 @@ class _FormW4PageState extends State<FormW4Page> {
|
||||
_buildSummaryRow(
|
||||
i18n.fields.summary_credits,
|
||||
'\$${_totalCredits(state)}',
|
||||
valueColor: Colors.green[700],
|
||||
valueColor: UiColors.textSuccess,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 24),
|
||||
const SizedBox(height: UiConstants.space6),
|
||||
Container(
|
||||
padding: const EdgeInsets.all(UiConstants.space4),
|
||||
decoration: BoxDecoration(
|
||||
@@ -1037,7 +1036,7 @@ class _FormW4PageState extends State<FormW4Page> {
|
||||
),
|
||||
child: Text(
|
||||
DateTime.now().toString().split(' ')[0],
|
||||
style: const TextStyle(color: UiColors.textPrimary),
|
||||
style: UiTypography.body2r.textPrimary,
|
||||
),
|
||||
),
|
||||
],
|
||||
@@ -1118,7 +1117,7 @@ class _FormW4PageState extends State<FormW4Page> {
|
||||
size: 16,
|
||||
color: UiColors.textPrimary,
|
||||
),
|
||||
const SizedBox(width: 8),
|
||||
const SizedBox(width: UiConstants.space2),
|
||||
Text(
|
||||
i18n.fields.back,
|
||||
style: UiTypography.body2r.textPrimary,
|
||||
@@ -1166,7 +1165,7 @@ class _FormW4PageState extends State<FormW4Page> {
|
||||
: i18n.fields.kContinue,
|
||||
),
|
||||
if (state.currentStep < steps.length - 1) ...<Widget>[
|
||||
const SizedBox(width: 8),
|
||||
const SizedBox(width: UiConstants.space2),
|
||||
const Icon(UiIcons.arrowRight, size: 16, color: UiColors.white),
|
||||
],
|
||||
],
|
||||
|
||||
@@ -15,7 +15,6 @@ dependencies:
|
||||
bloc: ^8.1.0
|
||||
flutter_modular: ^6.3.0
|
||||
equatable: ^2.0.5
|
||||
lucide_icons: ^0.257.0
|
||||
firebase_auth: ^6.1.4
|
||||
firebase_data_connect: ^0.2.2+2
|
||||
|
||||
|
||||
@@ -52,7 +52,11 @@ class BankAccountPage extends StatelessWidget {
|
||||
context,
|
||||
message: strings.account_added_success,
|
||||
type: UiSnackbarType.success,
|
||||
margin: const EdgeInsets.only(bottom: 120, left: 16, right: 16),
|
||||
margin: const EdgeInsets.only(
|
||||
bottom: 120,
|
||||
left: UiConstants.space4,
|
||||
right: UiConstants.space4,
|
||||
),
|
||||
);
|
||||
}
|
||||
// Error is already shown on the page itself (lines 73-85), no need for snackbar
|
||||
@@ -65,7 +69,7 @@ class BankAccountPage extends StatelessWidget {
|
||||
if (state.status == BankAccountStatus.error) {
|
||||
return Center(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(16.0),
|
||||
padding: const EdgeInsets.all(UiConstants.space4),
|
||||
child: Text(
|
||||
state.errorMessage != null
|
||||
? translateErrorKey(state.errorMessage!)
|
||||
@@ -95,7 +99,7 @@ class BankAccountPage extends StatelessWidget {
|
||||
...state.accounts.map((BankAccount a) => _buildAccountCard(a, strings)), // Added type
|
||||
|
||||
// Add extra padding at bottom
|
||||
const SizedBox(height: 80),
|
||||
const SizedBox(height: UiConstants.space20),
|
||||
],
|
||||
),
|
||||
),
|
||||
@@ -115,7 +119,7 @@ class BankAccountPage extends StatelessWidget {
|
||||
context: context,
|
||||
builder: (BuildContext context) {
|
||||
return Dialog(
|
||||
backgroundColor: Colors.transparent,
|
||||
backgroundColor: UiColors.transparent,
|
||||
child: AddAccountForm(
|
||||
strings: strings,
|
||||
onSubmit: (String bankName, String routing, String account, String type) {
|
||||
@@ -166,7 +170,7 @@ class BankAccountPage extends StatelessWidget {
|
||||
strings.secure_title,
|
||||
style: UiTypography.body2m.textPrimary,
|
||||
),
|
||||
const SizedBox(height: 2),
|
||||
const SizedBox(height: UiConstants.space1 - 2), // 2px
|
||||
Text(
|
||||
strings.secure_subtitle,
|
||||
style: UiTypography.body3r.textSecondary,
|
||||
@@ -210,7 +214,7 @@ class BankAccountPage extends StatelessWidget {
|
||||
child: Icon(
|
||||
UiIcons.building,
|
||||
color: primaryColor,
|
||||
size: 24,
|
||||
size: UiConstants.iconLg,
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -236,15 +240,18 @@ class BankAccountPage extends StatelessWidget {
|
||||
),
|
||||
if (isPrimary)
|
||||
Container(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 8, vertical: 4),
|
||||
padding: const EdgeInsets.symmetric(
|
||||
horizontal: UiConstants.space2,
|
||||
vertical: UiConstants.space1,
|
||||
),
|
||||
decoration: BoxDecoration(
|
||||
color: primaryColor.withValues(alpha: 0.15),
|
||||
borderRadius: BorderRadius.circular(20),
|
||||
borderRadius: UiConstants.radiusFull,
|
||||
),
|
||||
child: Row(
|
||||
children: <Widget>[
|
||||
const Icon(UiIcons.check, size: 12, color: primaryColor),
|
||||
const SizedBox(width: 4),
|
||||
const Icon(UiIcons.check, size: UiConstants.iconXs, color: primaryColor),
|
||||
const SizedBox(width: UiConstants.space1),
|
||||
Text(
|
||||
strings.primary,
|
||||
style: UiTypography.body3m.primary,
|
||||
|
||||
@@ -139,7 +139,7 @@ class _AddAccountFormState extends State<AddAccountForm> {
|
||||
return GestureDetector(
|
||||
onTap: () => setState(() => _selectedType = type),
|
||||
child: Container(
|
||||
padding: const EdgeInsets.symmetric(vertical: 12),
|
||||
padding: const EdgeInsets.symmetric(vertical: UiConstants.space3),
|
||||
decoration: BoxDecoration(
|
||||
color: isSelected
|
||||
? UiColors.primary.withValues(alpha: 0.05)
|
||||
|
||||
@@ -15,7 +15,6 @@ dependencies:
|
||||
bloc: ^8.1.0
|
||||
flutter_modular: ^6.3.0
|
||||
equatable: ^2.0.5
|
||||
lucide_icons: ^0.257.0
|
||||
firebase_auth: ^6.1.4
|
||||
firebase_data_connect: ^0.2.2+2
|
||||
|
||||
|
||||
@@ -64,7 +64,7 @@ class _TimeCardPageState extends State<TimeCardPage> {
|
||||
} else if (state is TimeCardError) {
|
||||
return Center(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(16.0),
|
||||
padding: const EdgeInsets.all(UiConstants.space4),
|
||||
child: Text(
|
||||
translateErrorKey(state.message),
|
||||
textAlign: TextAlign.center,
|
||||
|
||||
@@ -14,7 +14,6 @@ dependencies:
|
||||
flutter_modular: ^6.3.2
|
||||
flutter_bloc: ^8.1.3
|
||||
equatable: ^2.0.5
|
||||
lucide_icons: ^0.257.0
|
||||
intl: ^0.20.0
|
||||
design_system:
|
||||
path: ../../../../../design_system
|
||||
|
||||
@@ -46,7 +46,11 @@ class AttirePage extends StatelessWidget {
|
||||
context,
|
||||
message: translateErrorKey(state.errorMessage ?? 'Error'),
|
||||
type: UiSnackbarType.error,
|
||||
margin: const EdgeInsets.only(bottom: 150, left: 16, right: 16),
|
||||
margin: const EdgeInsets.only(
|
||||
bottom: 150,
|
||||
left: UiConstants.space4,
|
||||
right: UiConstants.space4,
|
||||
),
|
||||
);
|
||||
}
|
||||
if (state.status == AttireStatus.saved) {
|
||||
@@ -80,7 +84,7 @@ class AttirePage extends StatelessWidget {
|
||||
isChecked: state.attestationChecked,
|
||||
onChanged: (bool? val) => cubit.toggleAttestation(val ?? false),
|
||||
),
|
||||
const SizedBox(height: 80),
|
||||
const SizedBox(height: UiConstants.space20),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import 'package:design_system/design_system.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:lucide_icons/lucide_icons.dart';
|
||||
|
||||
import 'package:core_localization/core_localization.dart';
|
||||
import 'package:krow_domain/krow_domain.dart';
|
||||
|
||||
@@ -221,19 +221,19 @@ class AttireGrid extends StatelessWidget {
|
||||
IconData _getIcon(String? name) {
|
||||
switch (name) {
|
||||
case 'footprints':
|
||||
return LucideIcons.footprints;
|
||||
return UiIcons.footprints;
|
||||
case 'scissors':
|
||||
return LucideIcons.scissors;
|
||||
return UiIcons.scissors;
|
||||
case 'user':
|
||||
return LucideIcons.user;
|
||||
return UiIcons.user;
|
||||
case 'shirt':
|
||||
return LucideIcons.shirt;
|
||||
return UiIcons.shirt;
|
||||
case 'hardHat':
|
||||
return LucideIcons.hardHat;
|
||||
return UiIcons.hardHat;
|
||||
case 'chefHat':
|
||||
return LucideIcons.chefHat;
|
||||
return UiIcons.chefHat;
|
||||
default:
|
||||
return LucideIcons.helpCircle;
|
||||
return UiIcons.help;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import 'package:design_system/design_system.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:lucide_icons/lucide_icons.dart';
|
||||
import 'package:core_localization/core_localization.dart';
|
||||
|
||||
class AttireInfoCard extends StatelessWidget {
|
||||
@@ -17,8 +16,7 @@ class AttireInfoCard extends StatelessWidget {
|
||||
child: Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: <Widget>[
|
||||
// Using LucideIcons for domain specific content icon not in UiIcons
|
||||
const Icon(LucideIcons.shirt, color: UiColors.primary, size: 24),
|
||||
const Icon(UiIcons.shirt, color: UiColors.primary, size: 24),
|
||||
const SizedBox(width: UiConstants.space3),
|
||||
Expanded(
|
||||
child: Column(
|
||||
|
||||
@@ -160,7 +160,7 @@ class EmergencyContactFormItem extends StatelessWidget {
|
||||
style: UiTypography.body1r.textPrimary,
|
||||
decoration: InputDecoration(
|
||||
hintText: hint,
|
||||
hintStyle: const TextStyle(color: UiColors.textPlaceholder),
|
||||
hintStyle: UiTypography.body1r.textPlaceholder,
|
||||
prefixIcon: Icon(icon, color: UiColors.textSecondary, size: 20.0),
|
||||
filled: true,
|
||||
fillColor: UiColors.bgPopup,
|
||||
|
||||
@@ -62,7 +62,11 @@ class ExperiencePage extends StatelessWidget {
|
||||
context,
|
||||
message: 'Experience saved successfully',
|
||||
type: UiSnackbarType.success,
|
||||
margin: const EdgeInsets.only(bottom: 120, left: 16, right: 16),
|
||||
margin: const EdgeInsets.only(
|
||||
bottom: 120,
|
||||
left: UiConstants.space4,
|
||||
right: UiConstants.space4,
|
||||
),
|
||||
);
|
||||
Modular.to.pop();
|
||||
} else if (state.status == ExperienceStatus.failure) {
|
||||
@@ -72,7 +76,11 @@ class ExperiencePage extends StatelessWidget {
|
||||
? translateErrorKey(state.errorMessage!)
|
||||
: 'An error occurred',
|
||||
type: UiSnackbarType.error,
|
||||
margin: const EdgeInsets.only(bottom: 120, left: 16, right: 16),
|
||||
margin: const EdgeInsets.only(
|
||||
bottom: 120,
|
||||
left: UiConstants.space4,
|
||||
right: UiConstants.space4,
|
||||
),
|
||||
);
|
||||
}
|
||||
},
|
||||
@@ -202,8 +210,8 @@ class ExperiencePage extends StatelessWidget {
|
||||
: i18n.save_button,
|
||||
child: state.status == ExperienceStatus.loading
|
||||
? const SizedBox(
|
||||
height: 20.0,
|
||||
width: 20.0,
|
||||
height: UiConstants.iconMd,
|
||||
width: UiConstants.iconMd,
|
||||
child: CircularProgressIndicator(
|
||||
strokeWidth: 2,
|
||||
valueColor: AlwaysStoppedAnimation<Color>(
|
||||
|
||||
@@ -180,16 +180,13 @@ class _ShiftsPageState extends State<ShiftsPage> {
|
||||
: state is ShiftsError
|
||||
? Center(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(24.0),
|
||||
padding: const EdgeInsets.all(UiConstants.space5),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Text(
|
||||
translateErrorKey(state.message),
|
||||
style: const TextStyle(
|
||||
fontSize: 16,
|
||||
color: Color(0xFF64748B),
|
||||
),
|
||||
style: UiTypography.body2r.textSecondary,
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
],
|
||||
|
||||
@@ -3,11 +3,11 @@ import 'package:design_system/design_system.dart';
|
||||
|
||||
class AppColors {
|
||||
static const Color krowBlue = UiColors.primary;
|
||||
static const Color krowYellow = Color(0xFFFFED4A);
|
||||
static const Color krowYellow = UiColors.accent;
|
||||
static const Color krowCharcoal = UiColors.textPrimary;
|
||||
static const Color krowMuted = UiColors.textSecondary;
|
||||
static const Color krowBorder = UiColors.border;
|
||||
static const Color krowBackground = UiColors.background;
|
||||
static const Color white = Colors.white;
|
||||
static const Color black = Colors.black;
|
||||
static const Color white = UiColors.white;
|
||||
static const Color black = UiColors.black;
|
||||
}
|
||||
|
||||
@@ -147,18 +147,18 @@ class _MyShiftCardState extends State<MyShiftCard> {
|
||||
children: [
|
||||
if (statusIcon != null)
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(right: 6),
|
||||
padding: const EdgeInsets.only(right: UiConstants.space2),
|
||||
child: Icon(
|
||||
statusIcon,
|
||||
size: 12,
|
||||
size: UiConstants.iconXs,
|
||||
color: statusColor,
|
||||
),
|
||||
)
|
||||
else
|
||||
Container(
|
||||
width: 6,
|
||||
height: 6,
|
||||
margin: const EdgeInsets.only(right: 6),
|
||||
width: UiConstants.radiusMdValue,
|
||||
height: UiConstants.radiusMdValue,
|
||||
margin: const EdgeInsets.only(right: UiConstants.space2),
|
||||
decoration: BoxDecoration(
|
||||
color: statusBg,
|
||||
shape: BoxShape.circle,
|
||||
@@ -176,12 +176,12 @@ class _MyShiftCardState extends State<MyShiftCard> {
|
||||
const SizedBox(width: UiConstants.space2),
|
||||
Container(
|
||||
padding: const EdgeInsets.symmetric(
|
||||
horizontal: 6,
|
||||
horizontal: UiConstants.space2,
|
||||
vertical: 2,
|
||||
),
|
||||
decoration: BoxDecoration(
|
||||
color: UiColors.primary.withValues(alpha: 0.1),
|
||||
borderRadius: BorderRadius.circular(4),
|
||||
borderRadius: UiConstants.radiusSm,
|
||||
),
|
||||
child: Text(
|
||||
_getShiftType(),
|
||||
@@ -228,7 +228,7 @@ class _MyShiftCardState extends State<MyShiftCard> {
|
||||
child: Icon(
|
||||
UiIcons.briefcase,
|
||||
color: UiColors.primary,
|
||||
size: 20,
|
||||
size: UiConstants.iconMd,
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -289,10 +289,10 @@ class _MyShiftCardState extends State<MyShiftCard> {
|
||||
children: [
|
||||
const Icon(
|
||||
UiIcons.clock,
|
||||
size: 12,
|
||||
size: UiConstants.iconXs,
|
||||
color: UiColors.primary,
|
||||
),
|
||||
const SizedBox(width: 4),
|
||||
const SizedBox(width: UiConstants.space1),
|
||||
Text(
|
||||
t.staff_shifts.details.days(
|
||||
days: widget.shift.durationDays!,
|
||||
@@ -303,7 +303,7 @@ class _MyShiftCardState extends State<MyShiftCard> {
|
||||
),
|
||||
],
|
||||
),
|
||||
const SizedBox(height: 4),
|
||||
const SizedBox(height: UiConstants.space1),
|
||||
Text(
|
||||
"Showing first schedule...",
|
||||
style: UiTypography.footnote2r.copyWith(
|
||||
@@ -318,10 +318,10 @@ class _MyShiftCardState extends State<MyShiftCard> {
|
||||
children: [
|
||||
const Icon(
|
||||
UiIcons.calendar,
|
||||
size: 12,
|
||||
size: UiConstants.iconXs,
|
||||
color: UiColors.iconSecondary,
|
||||
),
|
||||
const SizedBox(width: 4),
|
||||
const SizedBox(width: UiConstants.space1),
|
||||
Text(
|
||||
_formatDate(widget.shift.date),
|
||||
style: UiTypography.footnote1r.textSecondary,
|
||||
@@ -329,10 +329,10 @@ class _MyShiftCardState extends State<MyShiftCard> {
|
||||
const SizedBox(width: UiConstants.space3),
|
||||
const Icon(
|
||||
UiIcons.clock,
|
||||
size: 12,
|
||||
size: UiConstants.iconXs,
|
||||
color: UiColors.iconSecondary,
|
||||
),
|
||||
const SizedBox(width: 4),
|
||||
const SizedBox(width: UiConstants.space1),
|
||||
Text(
|
||||
"${_formatTime(widget.shift.startTime)} - ${_formatTime(widget.shift.endTime)}",
|
||||
style: UiTypography.footnote1r.textSecondary,
|
||||
@@ -340,17 +340,17 @@ class _MyShiftCardState extends State<MyShiftCard> {
|
||||
],
|
||||
),
|
||||
],
|
||||
const SizedBox(height: 4),
|
||||
const SizedBox(height: UiConstants.space1),
|
||||
|
||||
// Location
|
||||
Row(
|
||||
children: [
|
||||
const Icon(
|
||||
UiIcons.mapPin,
|
||||
size: 12,
|
||||
size: UiConstants.iconXs,
|
||||
color: UiColors.iconSecondary,
|
||||
),
|
||||
const SizedBox(width: 4),
|
||||
const SizedBox(width: UiConstants.space1),
|
||||
Expanded(
|
||||
child: Text(
|
||||
widget.shift.locationAddress.isNotEmpty
|
||||
|
||||
@@ -25,40 +25,29 @@ class EmptyStateView extends StatelessWidget {
|
||||
child: Column(
|
||||
children: [
|
||||
Container(
|
||||
width: 64,
|
||||
height: 64,
|
||||
width: UiConstants.space16,
|
||||
height: UiConstants.space16,
|
||||
decoration: BoxDecoration(
|
||||
color: const Color(0xFFF1F3F5),
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
color: UiColors.bgSecondary,
|
||||
borderRadius: UiConstants.radiusLg,
|
||||
),
|
||||
child: Icon(icon, size: 32, color: AppColors.krowMuted),
|
||||
child: Icon(icon, size: UiConstants.iconXl, color: UiColors.textSecondary),
|
||||
),
|
||||
const SizedBox(height: 16),
|
||||
const SizedBox(height: UiConstants.space4),
|
||||
Text(
|
||||
title,
|
||||
style: const TextStyle(
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.w500,
|
||||
color: AppColors.krowCharcoal,
|
||||
),
|
||||
style: UiTypography.body1m.textPrimary,
|
||||
),
|
||||
const SizedBox(height: 4),
|
||||
const SizedBox(height: UiConstants.space1),
|
||||
Text(
|
||||
subtitle,
|
||||
style: const TextStyle(fontSize: 14, color: AppColors.krowMuted),
|
||||
style: UiTypography.body2r.textSecondary,
|
||||
),
|
||||
if (actionLabel != null && onAction != null) ...[
|
||||
const SizedBox(height: 16),
|
||||
ElevatedButton(
|
||||
const SizedBox(height: UiConstants.space4),
|
||||
UiButton.primary(
|
||||
text: actionLabel!,
|
||||
onPressed: onAction,
|
||||
style: ElevatedButton.styleFrom(
|
||||
backgroundColor: AppColors.krowBlue,
|
||||
foregroundColor: Colors.white,
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
),
|
||||
),
|
||||
child: Text(actionLabel!),
|
||||
),
|
||||
],
|
||||
],
|
||||
|
||||
@@ -141,7 +141,7 @@ class StaffMainBottomBar extends StatelessWidget {
|
||||
Icon(
|
||||
icon,
|
||||
color: isSelected ? activeColor : inactiveColor,
|
||||
size: 24, // Standard navigation icon size
|
||||
size: UiConstants.iconLg,
|
||||
),
|
||||
const SizedBox(height: UiConstants.space1),
|
||||
Text(
|
||||
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user