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