chore: refactor UI consistency using design system tokens and remove LucideIcons
This commit is contained in:
@@ -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>(
|
||||
|
||||
Reference in New Issue
Block a user