Skip to content
This repository has been archived by the owner on Jan 17, 2024. It is now read-only.

Commit

Permalink
fix(PostForm): Change edit toast
Browse files Browse the repository at this point in the history
  • Loading branch information
moverval authored Jan 4, 2024
1 parent c4fcf1c commit c9f949c
Showing 1 changed file with 15 additions and 6 deletions.
21 changes: 15 additions & 6 deletions lib/components/Post/Form.dart
Original file line number Diff line number Diff line change
Expand Up @@ -156,12 +156,21 @@ class _PostFormState extends State<PostForm> {

// show toast
if (context.mounted) {
context.showToast(
Toast.levelToast(
message: "Beitrag hinzugefügt",
level: ToastLevel.success,
),
);
if (_isEditing) {
context.showToast(
Toast.levelToast(
message: "Beitrag gespeichert",
level: ToastLevel.success,
),
);
} else {
context.showToast(
Toast.levelToast(
message: "Beitrag hinzugefügt",
level: ToastLevel.success,
),
);
}
}

widget.onSubmit(post);
Expand Down

0 comments on commit c9f949c

Please sign in to comment.