refactor: Replace Lucide icons with UiIcons across various widgets to ensure consistency with the design system
This commit is contained in:
@@ -234,4 +234,7 @@ class UiIcons {
|
|||||||
|
|
||||||
/// Moon icon
|
/// Moon icon
|
||||||
static const IconData moon = _IconLib.moon;
|
static const IconData moon = _IconLib.moon;
|
||||||
|
|
||||||
|
/// Timer icon
|
||||||
|
static const IconData timer = _IconLib.timer;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,9 +3,9 @@ import 'package:design_system/design_system.dart';
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||||
import 'package:flutter_modular/flutter_modular.dart';
|
import 'package:flutter_modular/flutter_modular.dart';
|
||||||
import 'package:lucide_icons/lucide_icons.dart';
|
|
||||||
import 'package:staff_home/src/presentation/blocs/home_cubit.dart';
|
|
||||||
import 'package:krow_core/core.dart';
|
import 'package:krow_core/core.dart';
|
||||||
|
|
||||||
|
import 'package:staff_home/src/presentation/blocs/home_cubit.dart';
|
||||||
import 'package:staff_home/src/presentation/widgets/home_page/empty_state_widget.dart';
|
import 'package:staff_home/src/presentation/widgets/home_page/empty_state_widget.dart';
|
||||||
import 'package:staff_home/src/presentation/widgets/home_page/home_header.dart';
|
import 'package:staff_home/src/presentation/widgets/home_page/home_header.dart';
|
||||||
import 'package:staff_home/src/presentation/widgets/home_page/placeholder_banner.dart';
|
import 'package:staff_home/src/presentation/widgets/home_page/placeholder_banner.dart';
|
||||||
@@ -83,21 +83,21 @@ class WorkerHomePage extends StatelessWidget {
|
|||||||
children: [
|
children: [
|
||||||
Expanded(
|
Expanded(
|
||||||
child: QuickActionItem(
|
child: QuickActionItem(
|
||||||
icon: LucideIcons.search,
|
icon: UiIcons.search,
|
||||||
label: quickI18n.find_shifts,
|
label: quickI18n.find_shifts,
|
||||||
onTap: () => Modular.to.toShifts(),
|
onTap: () => Modular.to.toShifts(),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Expanded(
|
Expanded(
|
||||||
child: QuickActionItem(
|
child: QuickActionItem(
|
||||||
icon: LucideIcons.calendar,
|
icon: UiIcons.calendar,
|
||||||
label: quickI18n.availability,
|
label: quickI18n.availability,
|
||||||
onTap: () => Modular.to.toAvailability(),
|
onTap: () => Modular.to.toAvailability(),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Expanded(
|
Expanded(
|
||||||
child: QuickActionItem(
|
child: QuickActionItem(
|
||||||
icon: LucideIcons.dollarSign,
|
icon: UiIcons.dollar,
|
||||||
label: quickI18n.earnings,
|
label: quickI18n.earnings,
|
||||||
onTap: () => Modular.to.toPayments(),
|
onTap: () => Modular.to.toPayments(),
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_modular/flutter_modular.dart';
|
import 'package:flutter_modular/flutter_modular.dart';
|
||||||
import 'package:lucide_icons/lucide_icons.dart';
|
|
||||||
|
|
||||||
import 'package:design_system/design_system.dart';
|
import 'package:design_system/design_system.dart';
|
||||||
import 'package:core_localization/core_localization.dart';
|
import 'package:core_localization/core_localization.dart';
|
||||||
@@ -42,7 +42,7 @@ class PendingPaymentCard extends StatelessWidget {
|
|||||||
shape: BoxShape.circle,
|
shape: BoxShape.circle,
|
||||||
),
|
),
|
||||||
child: const Icon(
|
child: const Icon(
|
||||||
LucideIcons.dollarSign,
|
UiIcons.dollar,
|
||||||
color: UiColors.primary,
|
color: UiColors.primary,
|
||||||
size: 20,
|
size: 20,
|
||||||
),
|
),
|
||||||
@@ -76,7 +76,7 @@ class PendingPaymentCard extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
SizedBox(width: UiConstants.space2),
|
SizedBox(width: UiConstants.space2),
|
||||||
Icon(
|
Icon(
|
||||||
LucideIcons.chevronRight,
|
UiIcons.chevronRight,
|
||||||
color: UiColors.mutedForeground,
|
color: UiColors.mutedForeground,
|
||||||
size: 20,
|
size: 20,
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:lucide_icons/lucide_icons.dart';
|
|
||||||
|
|
||||||
import 'package:design_system/design_system.dart';
|
import 'package:design_system/design_system.dart';
|
||||||
|
|
||||||
@@ -41,7 +41,7 @@ class PlaceholderBanner extends StatelessWidget {
|
|||||||
color: UiColors.bgBanner,
|
color: UiColors.bgBanner,
|
||||||
shape: BoxShape.circle,
|
shape: BoxShape.circle,
|
||||||
),
|
),
|
||||||
child: Icon(LucideIcons.sparkles, color: accent, size: 20),
|
child: Icon(UiIcons.sparkles, color: accent, size: 20),
|
||||||
),
|
),
|
||||||
const SizedBox(width: UiConstants.space3),
|
const SizedBox(width: UiConstants.space3),
|
||||||
Expanded(
|
Expanded(
|
||||||
@@ -59,7 +59,7 @@ class PlaceholderBanner extends StatelessWidget {
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Icon(LucideIcons.chevronRight, color: accent),
|
Icon(UiIcons.chevronRight, color: accent),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import 'package:design_system/design_system.dart';
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_modular/flutter_modular.dart';
|
import 'package:flutter_modular/flutter_modular.dart';
|
||||||
import 'package:krow_domain/krow_domain.dart';
|
import 'package:krow_domain/krow_domain.dart';
|
||||||
import 'package:lucide_icons/lucide_icons.dart';
|
|
||||||
import 'package:krow_core/core.dart';
|
import 'package:krow_core/core.dart';
|
||||||
|
|
||||||
class RecommendedShiftCard extends StatelessWidget {
|
class RecommendedShiftCard extends StatelessWidget {
|
||||||
@@ -84,7 +84,7 @@ class RecommendedShiftCard extends StatelessWidget {
|
|||||||
borderRadius: BorderRadius.circular(12),
|
borderRadius: BorderRadius.circular(12),
|
||||||
),
|
),
|
||||||
child: const Icon(
|
child: const Icon(
|
||||||
LucideIcons.calendar,
|
UiIcons.calendar,
|
||||||
color: Color(0xFF0047FF),
|
color: Color(0xFF0047FF),
|
||||||
size: 20,
|
size: 20,
|
||||||
),
|
),
|
||||||
@@ -148,7 +148,7 @@ class RecommendedShiftCard extends StatelessWidget {
|
|||||||
Row(
|
Row(
|
||||||
children: [
|
children: [
|
||||||
const Icon(
|
const Icon(
|
||||||
LucideIcons.calendar,
|
UiIcons.calendar,
|
||||||
size: 14,
|
size: 14,
|
||||||
color: UiColors.mutedForeground,
|
color: UiColors.mutedForeground,
|
||||||
),
|
),
|
||||||
@@ -162,7 +162,7 @@ class RecommendedShiftCard extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
const SizedBox(width: 12),
|
const SizedBox(width: 12),
|
||||||
const Icon(
|
const Icon(
|
||||||
LucideIcons.clock,
|
UiIcons.clock,
|
||||||
size: 14,
|
size: 14,
|
||||||
color: UiColors.mutedForeground,
|
color: UiColors.mutedForeground,
|
||||||
),
|
),
|
||||||
@@ -183,7 +183,7 @@ class RecommendedShiftCard extends StatelessWidget {
|
|||||||
Row(
|
Row(
|
||||||
children: [
|
children: [
|
||||||
const Icon(
|
const Icon(
|
||||||
LucideIcons.mapPin,
|
UiIcons.mapPin,
|
||||||
size: 14,
|
size: 14,
|
||||||
color: UiColors.mutedForeground,
|
color: UiColors.mutedForeground,
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:lucide_icons/lucide_icons.dart';
|
|
||||||
|
|
||||||
import 'package:design_system/design_system.dart';
|
import 'package:design_system/design_system.dart';
|
||||||
|
|
||||||
@@ -38,7 +38,7 @@ class SectionHeader extends StatelessWidget {
|
|||||||
style: UiTypography.body2m.copyWith(color: UiColors.primary),
|
style: UiTypography.body2m.copyWith(color: UiColors.primary),
|
||||||
),
|
),
|
||||||
const Icon(
|
const Icon(
|
||||||
LucideIcons.chevronRight,
|
UiIcons.chevronRight,
|
||||||
size: 16,
|
size: 16,
|
||||||
color: UiColors.primary,
|
color: UiColors.primary,
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_modular/flutter_modular.dart';
|
import 'package:flutter_modular/flutter_modular.dart';
|
||||||
import 'package:lucide_icons/lucide_icons.dart';
|
|
||||||
import 'package:intl/intl.dart';
|
import 'package:intl/intl.dart';
|
||||||
|
|
||||||
import 'package:design_system/design_system.dart';
|
import 'package:design_system/design_system.dart';
|
||||||
@@ -109,8 +109,8 @@ class _ShiftCardState extends State<ShiftCard> {
|
|||||||
fit: BoxFit.contain,
|
fit: BoxFit.contain,
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
: const Icon(
|
: Icon(
|
||||||
LucideIcons.building2,
|
UiIcons.building,
|
||||||
color: UiColors.mutedForeground,
|
color: UiColors.mutedForeground,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@@ -218,8 +218,8 @@ class _ShiftCardState extends State<ShiftCard> {
|
|||||||
fit: BoxFit.contain,
|
fit: BoxFit.contain,
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
: const Icon(
|
: Icon(
|
||||||
LucideIcons.building2,
|
UiIcons.building,
|
||||||
size: 28,
|
size: 28,
|
||||||
color: UiColors.primary,
|
color: UiColors.primary,
|
||||||
),
|
),
|
||||||
@@ -300,7 +300,7 @@ class _ShiftCardState extends State<ShiftCard> {
|
|||||||
Row(
|
Row(
|
||||||
children: [
|
children: [
|
||||||
const Icon(
|
const Icon(
|
||||||
LucideIcons.mapPin,
|
UiIcons.mapPin,
|
||||||
size: 16,
|
size: 16,
|
||||||
color: UiColors.mutedForeground,
|
color: UiColors.mutedForeground,
|
||||||
),
|
),
|
||||||
@@ -317,7 +317,7 @@ class _ShiftCardState extends State<ShiftCard> {
|
|||||||
),
|
),
|
||||||
const SizedBox(width: 16),
|
const SizedBox(width: 16),
|
||||||
const Icon(
|
const Icon(
|
||||||
LucideIcons.calendar,
|
UiIcons.calendar,
|
||||||
size: 16,
|
size: 16,
|
||||||
color: UiColors.mutedForeground,
|
color: UiColors.mutedForeground,
|
||||||
),
|
),
|
||||||
@@ -339,13 +339,13 @@ class _ShiftCardState extends State<ShiftCard> {
|
|||||||
runSpacing: 8,
|
runSpacing: 8,
|
||||||
children: [
|
children: [
|
||||||
_buildTag(
|
_buildTag(
|
||||||
LucideIcons.zap,
|
UiIcons.zap,
|
||||||
'Immediate start',
|
'Immediate start',
|
||||||
UiColors.accent.withValues(alpha: 0.3),
|
UiColors.accent.withValues(alpha: 0.3),
|
||||||
UiColors.foreground,
|
UiColors.foreground,
|
||||||
),
|
),
|
||||||
_buildTag(
|
_buildTag(
|
||||||
LucideIcons.timer,
|
UiIcons.timer,
|
||||||
'No experience',
|
'No experience',
|
||||||
const Color(0xFFFEE2E2),
|
const Color(0xFFFEE2E2),
|
||||||
const Color(0xFFDC2626),
|
const Color(0xFFDC2626),
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
|
import 'package:design_system/design_system.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:lucide_icons/lucide_icons.dart';
|
|
||||||
|
|
||||||
import 'package:core_localization/core_localization.dart';
|
import 'package:core_localization/core_localization.dart';
|
||||||
|
|
||||||
@@ -63,7 +64,7 @@ class _AutoMatchToggleState extends State<AutoMatchToggle> with SingleTickerProv
|
|||||||
borderRadius: BorderRadius.circular(12),
|
borderRadius: BorderRadius.circular(12),
|
||||||
),
|
),
|
||||||
child: Icon(
|
child: Icon(
|
||||||
LucideIcons.zap,
|
UiIcons.zap,
|
||||||
color: widget.enabled ? Colors.white : primary,
|
color: widget.enabled ? Colors.white : primary,
|
||||||
size: 20,
|
size: 20,
|
||||||
),
|
),
|
||||||
@@ -123,12 +124,12 @@ class _AutoMatchToggleState extends State<AutoMatchToggle> with SingleTickerProv
|
|||||||
Wrap(
|
Wrap(
|
||||||
spacing: 8,
|
spacing: 8,
|
||||||
children: [
|
children: [
|
||||||
_buildChip(LucideIcons.mapPin, i18n.chips.location),
|
_buildChip(UiIcons.mapPin, i18n.chips.location),
|
||||||
_buildChip(
|
_buildChip(
|
||||||
LucideIcons.clock,
|
UiIcons.clock,
|
||||||
i18n.chips.availability,
|
i18n.chips.availability,
|
||||||
),
|
),
|
||||||
_buildChip(LucideIcons.briefcase, i18n.chips.skills),
|
_buildChip(UiIcons.briefcase, i18n.chips.skills),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
|
import 'package:design_system/design_system.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_modular/flutter_modular.dart';
|
import 'package:flutter_modular/flutter_modular.dart';
|
||||||
import 'package:lucide_icons/lucide_icons.dart';
|
|
||||||
import 'dart:math' as math;
|
import 'dart:math' as math;
|
||||||
|
|
||||||
import 'package:core_localization/core_localization.dart';
|
import 'package:core_localization/core_localization.dart';
|
||||||
@@ -46,7 +47,7 @@ class BenefitsWidget extends StatelessWidget {
|
|||||||
style: Theme.of(context).textTheme.labelLarge?.copyWith(color: Theme.of(context).colorScheme.primary),
|
style: Theme.of(context).textTheme.labelLarge?.copyWith(color: Theme.of(context).colorScheme.primary),
|
||||||
),
|
),
|
||||||
Icon(
|
Icon(
|
||||||
LucideIcons.chevronRight,
|
UiIcons.chevronRight,
|
||||||
size: 16,
|
size: 16,
|
||||||
color: Theme.of(context).colorScheme.primary,
|
color: Theme.of(context).colorScheme.primary,
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -15,7 +15,6 @@ dependencies:
|
|||||||
bloc: ^8.1.0
|
bloc: ^8.1.0
|
||||||
flutter_modular: ^6.3.0
|
flutter_modular: ^6.3.0
|
||||||
equatable: ^2.0.5
|
equatable: ^2.0.5
|
||||||
lucide_icons: ^0.257.0
|
|
||||||
intl: ^0.20.0
|
intl: ^0.20.0
|
||||||
google_fonts: ^7.0.0
|
google_fonts: ^7.0.0
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user