Refactoring - Version stable
This commit is contained in:
@@ -216,7 +216,7 @@ class _EpargneDetailPageState extends State<EpargneDetailPage> {
|
||||
children: [
|
||||
Text(
|
||||
c.numeroCompte ?? c.id ?? '—',
|
||||
style: TypographyTokens.titleMedium?.copyWith(
|
||||
style: TypographyTokens.titleMedium.copyWith(
|
||||
color: ColorTokens.onSurfaceVariant,
|
||||
letterSpacing: 0.5,
|
||||
),
|
||||
@@ -224,12 +224,12 @@ class _EpargneDetailPageState extends State<EpargneDetailPage> {
|
||||
if (_typeCompteLibelle(c.typeCompte) != null)
|
||||
Text(
|
||||
_typeCompteLibelle(c.typeCompte)!,
|
||||
style: TypographyTokens.bodySmall?.copyWith(color: ColorTokens.onSurfaceVariant),
|
||||
style: TypographyTokens.bodySmall.copyWith(color: ColorTokens.onSurfaceVariant),
|
||||
),
|
||||
const SizedBox(height: SpacingTokens.md),
|
||||
Text(
|
||||
'${c.soldeActuel.toStringAsFixed(0)} XOF',
|
||||
style: TypographyTokens.headlineMedium?.copyWith(
|
||||
style: TypographyTokens.headlineMedium.copyWith(
|
||||
fontWeight: FontWeight.bold,
|
||||
color: ColorTokens.primary,
|
||||
),
|
||||
@@ -237,18 +237,18 @@ class _EpargneDetailPageState extends State<EpargneDetailPage> {
|
||||
if (c.soldeBloque > 0)
|
||||
Text(
|
||||
'dont ${c.soldeBloque.toStringAsFixed(0)} XOF bloqué(s)',
|
||||
style: TypographyTokens.bodySmall?.copyWith(color: ColorTokens.onSurfaceVariant),
|
||||
style: TypographyTokens.bodySmall.copyWith(color: ColorTokens.onSurfaceVariant),
|
||||
),
|
||||
Text(
|
||||
'Disponible: ${soldeDispo.toStringAsFixed(0)} XOF',
|
||||
style: TypographyTokens.labelMedium?.copyWith(color: ColorTokens.primary),
|
||||
style: TypographyTokens.labelMedium.copyWith(color: ColorTokens.primary),
|
||||
),
|
||||
if (c.dateOuverture != null)
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(top: SpacingTokens.sm),
|
||||
child: Text(
|
||||
'Ouvert le ${c.dateOuverture!.day.toString().padLeft(2, '0')}/${c.dateOuverture!.month.toString().padLeft(2, '0')}/${c.dateOuverture!.year}',
|
||||
style: TypographyTokens.bodySmall?.copyWith(color: ColorTokens.onSurfaceVariant),
|
||||
style: TypographyTokens.bodySmall.copyWith(color: ColorTokens.onSurfaceVariant),
|
||||
),
|
||||
),
|
||||
if (c.description != null && c.description!.isNotEmpty)
|
||||
@@ -256,7 +256,7 @@ class _EpargneDetailPageState extends State<EpargneDetailPage> {
|
||||
padding: const EdgeInsets.only(top: SpacingTokens.xs),
|
||||
child: Text(
|
||||
c.description!,
|
||||
style: TypographyTokens.bodySmall?.copyWith(color: ColorTokens.onSurfaceVariant),
|
||||
style: TypographyTokens.bodySmall.copyWith(color: ColorTokens.onSurfaceVariant),
|
||||
maxLines: 2,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
@@ -334,7 +334,7 @@ class _EpargneDetailPageState extends State<EpargneDetailPage> {
|
||||
padding: const EdgeInsets.all(SpacingTokens.lg),
|
||||
child: Text(
|
||||
'Aucune transaction',
|
||||
style: TypographyTokens.bodySmall?.copyWith(color: ColorTokens.onSurfaceVariant),
|
||||
style: TypographyTokens.bodySmall.copyWith(color: ColorTokens.onSurfaceVariant),
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
)
|
||||
@@ -358,12 +358,12 @@ class _EpargneDetailPageState extends State<EpargneDetailPage> {
|
||||
subtitle: t.dateTransaction != null
|
||||
? Text(
|
||||
'${t.dateTransaction!.day.toString().padLeft(2, '0')}/${t.dateTransaction!.month.toString().padLeft(2, '0')}/${t.dateTransaction!.year} ${t.dateTransaction!.hour.toString().padLeft(2, '0')}:${t.dateTransaction!.minute.toString().padLeft(2, '0')}',
|
||||
style: TypographyTokens.bodySmall?.copyWith(color: ColorTokens.onSurfaceVariant),
|
||||
style: TypographyTokens.bodySmall.copyWith(color: ColorTokens.onSurfaceVariant),
|
||||
)
|
||||
: null,
|
||||
trailing: Text(
|
||||
'${t.isCredit ? '+' : '-'}${t.montant.toStringAsFixed(0)} XOF',
|
||||
style: TypographyTokens.titleSmall?.copyWith(
|
||||
style: TypographyTokens.titleSmall.copyWith(
|
||||
color: t.isCredit ? ColorTokens.success : ColorTokens.error,
|
||||
fontWeight: FontWeight.w600,
|
||||
),
|
||||
|
||||
@@ -198,7 +198,7 @@ class _CreerCompteEpargneDialogState extends State<CreerCompteEpargneDialog> {
|
||||
items: _organisations
|
||||
.map((o) => DropdownMenuItem(
|
||||
value: o.id,
|
||||
child: Text(o.nom ?? o.id ?? '', overflow: TextOverflow.ellipsis, maxLines: 1),
|
||||
child: Text(o.nom, overflow: TextOverflow.ellipsis, maxLines: 1),
|
||||
))
|
||||
.toList(),
|
||||
onChanged: _submitting
|
||||
|
||||
@@ -45,7 +45,6 @@ class _DepotEpargneDialogState extends State<DepotEpargneDialog> {
|
||||
|
||||
/// Seuil LCB-FT récupéré depuis l'API (fallback à 500k XOF).
|
||||
double _seuilLcbFt = kSeuilOrigineFondsObligatoireXOF;
|
||||
bool _seuilLoaded = false;
|
||||
|
||||
/// Pièce justificative pour opérations au-dessus du seuil
|
||||
File? _pieceJustificative;
|
||||
@@ -66,7 +65,6 @@ class _DepotEpargneDialogState extends State<DepotEpargneDialog> {
|
||||
if (mounted) {
|
||||
setState(() {
|
||||
_seuilLcbFt = seuil.montantSeuil;
|
||||
_seuilLoaded = true;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -135,7 +135,7 @@ class _HistoriqueEpargneSheetState extends State<HistoriqueEpargneSheet> {
|
||||
? Center(
|
||||
child: Text(
|
||||
'Aucune transaction',
|
||||
style: TypographyTokens.bodySmall?.copyWith(color: ColorTokens.onSurfaceVariant),
|
||||
style: TypographyTokens.bodySmall.copyWith(color: ColorTokens.onSurfaceVariant),
|
||||
),
|
||||
)
|
||||
: ListView.builder(
|
||||
@@ -167,12 +167,12 @@ class _HistoriqueEpargneSheetState extends State<HistoriqueEpargneSheet> {
|
||||
if (t.dateTransaction != null)
|
||||
Text(
|
||||
'${t.dateTransaction!.day.toString().padLeft(2, '0')}/${t.dateTransaction!.month.toString().padLeft(2, '0')}/${t.dateTransaction!.year} ${t.dateTransaction!.hour.toString().padLeft(2, '0')}:${t.dateTransaction!.minute.toString().padLeft(2, '0')}',
|
||||
style: TypographyTokens.bodySmall?.copyWith(color: ColorTokens.onSurfaceVariant),
|
||||
style: TypographyTokens.bodySmall.copyWith(color: ColorTokens.onSurfaceVariant),
|
||||
),
|
||||
if (t.motif != null && t.motif!.isNotEmpty)
|
||||
Text(
|
||||
t.motif!,
|
||||
style: TypographyTokens.bodySmall?.copyWith(color: ColorTokens.onSurfaceVariant),
|
||||
style: TypographyTokens.bodySmall.copyWith(color: ColorTokens.onSurfaceVariant),
|
||||
maxLines: 1,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
@@ -184,14 +184,14 @@ class _HistoriqueEpargneSheetState extends State<HistoriqueEpargneSheet> {
|
||||
children: [
|
||||
Text(
|
||||
'${t.isCredit ? '+' : '-'}${t.montant.toStringAsFixed(0)} XOF',
|
||||
style: TypographyTokens.titleSmall?.copyWith(
|
||||
style: TypographyTokens.titleSmall.copyWith(
|
||||
color: t.isCredit ? ColorTokens.success : ColorTokens.error,
|
||||
fontWeight: FontWeight.w600,
|
||||
),
|
||||
),
|
||||
Text(
|
||||
'Solde: ${t.soldeApres.toStringAsFixed(0)}',
|
||||
style: TypographyTokens.labelSmall?.copyWith(color: ColorTokens.onSurfaceVariant),
|
||||
style: TypographyTokens.labelSmall.copyWith(color: ColorTokens.onSurfaceVariant),
|
||||
),
|
||||
],
|
||||
),
|
||||
|
||||
@@ -44,7 +44,6 @@ class _RetraitEpargneDialogState extends State<RetraitEpargneDialog> {
|
||||
|
||||
/// Seuil LCB-FT récupéré depuis l'API (fallback à 500k XOF).
|
||||
double _seuilLcbFt = kSeuilOrigineFondsObligatoireXOF;
|
||||
bool _seuilLoaded = false;
|
||||
|
||||
/// Pièce justificative pour opérations au-dessus du seuil
|
||||
File? _pieceJustificative;
|
||||
@@ -65,7 +64,6 @@ class _RetraitEpargneDialogState extends State<RetraitEpargneDialog> {
|
||||
if (mounted) {
|
||||
setState(() {
|
||||
_seuilLcbFt = seuil.montantSeuil;
|
||||
_seuilLoaded = true;
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -197,7 +195,7 @@ class _RetraitEpargneDialogState extends State<RetraitEpargneDialog> {
|
||||
children: [
|
||||
Text(
|
||||
widget.numeroCompte,
|
||||
style: TypographyTokens.bodySmall?.copyWith(color: ColorTokens.onSurfaceVariant),
|
||||
style: TypographyTokens.bodySmall.copyWith(color: ColorTokens.onSurfaceVariant),
|
||||
),
|
||||
Text(
|
||||
'Solde disponible: ${widget.soldeDisponible.toStringAsFixed(0)} XOF',
|
||||
|
||||
@@ -43,7 +43,6 @@ class _TransfertEpargneDialogState extends State<TransfertEpargneDialog> {
|
||||
|
||||
/// Seuil LCB-FT récupéré depuis l'API (fallback à 500k XOF).
|
||||
double _seuilLcbFt = kSeuilOrigineFondsObligatoireXOF;
|
||||
bool _seuilLoaded = false;
|
||||
|
||||
/// Pièce justificative pour opérations au-dessus du seuil
|
||||
File? _pieceJustificative;
|
||||
@@ -77,7 +76,6 @@ class _TransfertEpargneDialogState extends State<TransfertEpargneDialog> {
|
||||
if (mounted) {
|
||||
setState(() {
|
||||
_seuilLcbFt = seuil.montantSeuil;
|
||||
_seuilLoaded = true;
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -242,7 +240,7 @@ class _TransfertEpargneDialogState extends State<TransfertEpargneDialog> {
|
||||
children: [
|
||||
Text(
|
||||
'De: ${widget.compteSource.numeroCompte ?? widget.compteSource.id}',
|
||||
style: TypographyTokens.bodySmall?.copyWith(color: ColorTokens.onSurfaceVariant),
|
||||
style: TypographyTokens.bodySmall.copyWith(color: ColorTokens.onSurfaceVariant),
|
||||
),
|
||||
Text(
|
||||
'Solde disponible: ${(widget.compteSource.soldeActuel - widget.compteSource.soldeBloque).toStringAsFixed(0)} XOF',
|
||||
@@ -310,7 +308,7 @@ class _TransfertEpargneDialogState extends State<TransfertEpargneDialog> {
|
||||
padding: const EdgeInsets.only(top: 8),
|
||||
child: Text(
|
||||
'Requis pour les opérations ≥ ${_seuilLcbFt.toStringAsFixed(0)} XOF',
|
||||
style: TypographyTokens.bodySmall?.copyWith(color: ColorTokens.primary),
|
||||
style: TypographyTokens.bodySmall.copyWith(color: ColorTokens.primary),
|
||||
),
|
||||
),
|
||||
if (_origineFondsRequis) ...[
|
||||
|
||||
Reference in New Issue
Block a user