Used awesome snackbar and fixed gemini_ico.png not found

This commit is contained in:
2026-03-04 06:44:55 +08:00
parent c123c09233
commit 81bc618eee
4 changed files with 7 additions and 20 deletions
+3 -11
View File
@@ -3763,11 +3763,7 @@ class _TaskDetailScreenState extends ConsumerState<TaskDetailScreen>
final plainText = _actionController?.document.toPlainText().trim() ?? '';
if (plainText.isEmpty) {
if (!context.mounted) return;
ScaffoldMessenger.of(context).showSnackBar(
const SnackBar(
content: Text('Please enter some action taken text first'),
),
);
showWarningSnackBar(context, 'Please enter some action taken text first');
return;
}
@@ -3829,15 +3825,11 @@ class _TaskDetailScreenState extends ConsumerState<TaskDetailScreen>
}
if (context.mounted) {
ScaffoldMessenger.of(context).showSnackBar(
const SnackBar(content: Text('Action taken improved successfully')),
);
showSuccessSnackBar(context, 'Action taken improved successfully');
}
} catch (e) {
if (context.mounted) {
ScaffoldMessenger.of(
context,
).showSnackBar(SnackBar(content: Text('Error: $e')));
showErrorSnackBar(context, 'Error: $e');
}
} finally {
if (mounted) {