fix: обновить использование FToast на showFToast в expenses_screen

This commit is contained in:
2025-06-08 01:10:54 +03:00
parent 7f3dfb6459
commit e3ba9dd5dd
+13 -7
View File
@@ -103,17 +103,23 @@ class _ExpensesScreenState extends State<ExpensesScreen> with TickerProviderStat
try {
await _controller.addSampleTransaction();
if (mounted) {
FToast.of(context).show(
title: const Text('Success'),
subtitle: const Text('Transaction added successfully'),
showFToast(
context: context,
builder: (context) => const FToast(
title: Text('Success'),
description: Text('Transaction added successfully'),
),
);
}
} catch (e) {
if (mounted) {
FToast.of(context).show(
title: const Text('Error'),
subtitle: Text('Error adding transaction: $e'),
style: FToastStyle.destructive,
showFToast(
context: context,
builder: (context) => FToast(
title: const Text('Error'),
description: Text('Error adding transaction: $e'),
style: FToastStyle.destructive,
),
);
}
}