Refactor widgets, add bloc dep
Clean up widget code and update a dependency: - Remove redundant const qualifiers and tidy widget children in several skeleton/header widgets for consistent style. - Add super.key to TaxFormsProgressOverview, TaxFormStatusBadge, and AccountCard constructors. - Simplify AccountCard by consolidating its constructor into a single const declaration. - Minor fixes: adjust Image.onError parameter, reformat CircleAvatar/Icon construction in edit_profile_page. - Add bloc ^8.1.4 to staff/authentication pubspec. These changes are stylistic and aim to improve consistency and constructor patterns across the codebase.
This commit is contained in:
@@ -26,6 +26,7 @@ dependencies:
|
||||
path: ../../../design_system
|
||||
core_localization:
|
||||
path: ../../../core_localization
|
||||
bloc: ^8.1.4
|
||||
|
||||
|
||||
dev_dependencies:
|
||||
|
||||
@@ -27,7 +27,7 @@ class LocationMapPlaceholder extends StatelessWidget {
|
||||
// In a real app with keys, this would verify visually.
|
||||
// For now we use a generic placeholder color/icon to avoid broken images.
|
||||
fit: BoxFit.cover,
|
||||
onError: (_, __) {},
|
||||
onError: (_, _) {},
|
||||
),
|
||||
),
|
||||
child: Stack(
|
||||
|
||||
@@ -4,7 +4,7 @@ import 'package:krow_domain/krow_domain.dart';
|
||||
|
||||
/// Widget displaying the overall progress of tax form completion.
|
||||
class TaxFormsProgressOverview extends StatelessWidget {
|
||||
const TaxFormsProgressOverview({required this.forms});
|
||||
const TaxFormsProgressOverview({super.key, required this.forms});
|
||||
|
||||
final List<TaxForm> forms;
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ import 'package:krow_domain/krow_domain.dart';
|
||||
|
||||
/// Widget displaying status badge for a tax form.
|
||||
class TaxFormStatusBadge extends StatelessWidget {
|
||||
const TaxFormStatusBadge({required this.status});
|
||||
const TaxFormStatusBadge({super.key, required this.status});
|
||||
|
||||
final TaxFormStatus status;
|
||||
|
||||
|
||||
@@ -3,15 +3,10 @@ import 'package:flutter/material.dart';
|
||||
import 'package:krow_domain/krow_domain.dart';
|
||||
|
||||
class AccountCard extends StatelessWidget {
|
||||
const AccountCard({super.key, required this.account, required this.strings});
|
||||
final BankAccount account;
|
||||
final dynamic strings;
|
||||
|
||||
const AccountCard({
|
||||
super.key,
|
||||
required this.account,
|
||||
required this.strings,
|
||||
});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final bool isPrimary = account.isPrimary;
|
||||
|
||||
Reference in New Issue
Block a user