This commit is contained in:
Juan Gilsanz Polo
2024-02-29 14:19:36 +01:00
parent 1a10f6ebae
commit 6918eec469
5 changed files with 43 additions and 3 deletions

View File

@@ -83,7 +83,10 @@ class SearchBookmarks extends _$SearchBookmarks {
routes: [
GoRoute(
path: _webViewRoute,
builder: (context, state) => WebViewScreen(bookmark: state.extra as Bookmark),
pageBuilder: (context, state) => CustomTransitionPage(
child: WebViewScreen(bookmark: state.extra as Bookmark),
transitionsBuilder: (context, animation, secondaryAnimation, child) => child,
),
),
],
),
@@ -123,6 +126,11 @@ class SearchBookmarks extends _$SearchBookmarks {
ref.notifyListeners();
}
void clearSelectedBookmark() {
state.selectedBookmark = null;
ref.notifyListeners();
}
void selectBookmark(Bookmark bookmark, double width) {
if (width <= Sizes.tabletBreakpoint && ref.watch(appStatusProvider).useInAppBrowser == true) {
ref.watch(routerProvider).push(RoutesPaths.webview, extra: bookmark);