Fixed error add bookmarks
This commit is contained in:
@@ -139,7 +139,7 @@ class BookmarkForm extends _$BookmarkForm {
|
||||
ref.read(bookmarksProvider.notifier).refresh();
|
||||
ref.watch(routerProvider).pop();
|
||||
showSnackbar(
|
||||
key: ScaffoldMessengerKeys.root,
|
||||
key: ScaffoldMessengerKeys.bookmarks,
|
||||
label: t.bookmarks.addBookmark.bookmarkSavedSuccessfully,
|
||||
color: Colors.green,
|
||||
);
|
||||
|
||||
@@ -171,7 +171,10 @@ class ApiClientService {
|
||||
"/bookmarks/",
|
||||
data: FormData.fromMap(bookmark.toJson()),
|
||||
);
|
||||
if (response.statusCode != 200) {
|
||||
if (response.statusCode == null) {
|
||||
return const ApiResponse(successful: false);
|
||||
}
|
||||
if (response.statusCode! >= 400) {
|
||||
return const ApiResponse(successful: false);
|
||||
}
|
||||
return ApiResponse(
|
||||
|
||||
Reference in New Issue
Block a user