fix: обновить вызов FToast с правильным API в Forui

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