fix: обновить вызов FToast с правильным API в Forui
This commit is contained in:
@@ -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,
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user