Handle sharing intents

This commit is contained in:
Juan Gilsanz Polo
2024-03-23 02:10:08 +01:00
parent 9ef870f3e6
commit 601e4fb49b
10 changed files with 114 additions and 9 deletions

View File

@@ -65,6 +65,15 @@ class BookmarkForm extends _$BookmarkForm {
state.markAsUnread = bookmark.unread ?? false;
}
void initializeProviderUrl(String url) {
state.urlController.text = url;
if (Regexps.urlWithoutProtocol.hasMatch(url)) {
state.urlError = null;
} else {
state.urlError = t.bookmarks.addBookmark.invalidUrl;
}
}
void validateUrl(String value) {
state.checkBookmark = null;
state.checkBookmarkLoadStatus = null;