Changed navigation
This commit is contained in:
@@ -28,25 +28,17 @@ final List<RouteBase> appRoutes = [
|
||||
path: RoutesPaths.onboarding,
|
||||
builder: (context, state) => const Onboarding(),
|
||||
),
|
||||
ShellRoute(
|
||||
builder: (context, state, child) => Layout(
|
||||
state: state,
|
||||
child: child,
|
||||
),
|
||||
routes: [
|
||||
GoRoute(
|
||||
path: RoutesPaths.bookmarks,
|
||||
builder: (context, state) => const PageTransition(child: BookmarksScreen()),
|
||||
),
|
||||
GoRoute(
|
||||
path: RoutesPaths.tags,
|
||||
builder: (context, state) => const PageTransition(child: TagsScreen()),
|
||||
),
|
||||
GoRoute(
|
||||
path: RoutesPaths.settings,
|
||||
builder: (context, state) => const PageTransition(child: SettingsScreen()),
|
||||
),
|
||||
],
|
||||
GoRoute(
|
||||
path: RoutesPaths.bookmarks,
|
||||
builder: (context, state) => const PageTransition(child: BookmarksScreen()),
|
||||
),
|
||||
GoRoute(
|
||||
path: RoutesPaths.tags,
|
||||
builder: (context, state) => const PageTransition(child: TagsScreen()),
|
||||
),
|
||||
GoRoute(
|
||||
path: RoutesPaths.settings,
|
||||
builder: (context, state) => const PageTransition(child: SettingsScreen()),
|
||||
),
|
||||
GoRoute(
|
||||
path: RoutesPaths.tagBookmarks,
|
||||
|
||||
@@ -12,6 +12,7 @@ import 'package:linkdy/screens/webview/ui/webview.dart';
|
||||
import 'package:linkdy/widgets/circle_page_transition.dart';
|
||||
import 'package:linkdy/widgets/error_screen.dart';
|
||||
import 'package:linkdy/widgets/no_data_screen.dart';
|
||||
import 'package:linkdy/widgets/system_overlay_style.dart';
|
||||
|
||||
import 'package:linkdy/config/sizes.dart';
|
||||
import 'package:linkdy/constants/enums.dart';
|
||||
@@ -38,9 +39,7 @@ class BookmarksScreen extends ConsumerWidget {
|
||||
if (ref.watch(bookmarksProvider).selectedBookmark != null)
|
||||
Expanded(
|
||||
flex: 3,
|
||||
child: WebViewScreen(
|
||||
bookmark: ref.watch(bookmarksProvider).selectedBookmark!,
|
||||
),
|
||||
child: WebViewScreen(bookmark: ref.watch(bookmarksProvider).selectedBookmark!),
|
||||
),
|
||||
if (ref.watch(bookmarksProvider).selectedBookmark == null)
|
||||
const Expanded(
|
||||
@@ -148,6 +147,16 @@ class _List extends ConsumerWidget {
|
||||
icon: const Icon(Icons.search_rounded),
|
||||
tooltip: t.bookmarks.search.searchBookmarks,
|
||||
),
|
||||
IconButton(
|
||||
onPressed: () => showModalBottomSheet(
|
||||
context: context,
|
||||
useRootNavigator: true,
|
||||
builder: (context) => const VisualizationModal(),
|
||||
isScrollControlled: true,
|
||||
),
|
||||
icon: const Icon(Icons.sort_rounded),
|
||||
tooltip: t.bookmarks.filterSort,
|
||||
),
|
||||
PopupMenuButton(
|
||||
itemBuilder: (context) => <PopupMenuEntry>[
|
||||
PopupMenuItem(
|
||||
@@ -172,17 +181,23 @@ class _List extends ConsumerWidget {
|
||||
),
|
||||
const PopupMenuDivider(height: 1),
|
||||
PopupMenuItem(
|
||||
onTap: () => showModalBottomSheet(
|
||||
context: context,
|
||||
useRootNavigator: true,
|
||||
builder: (context) => const VisualizationModal(),
|
||||
isScrollControlled: true,
|
||||
),
|
||||
onTap: () => ref.read(routerProvider).push(RoutesPaths.tags),
|
||||
child: Row(
|
||||
children: [
|
||||
const Icon(Icons.sort_rounded),
|
||||
const Icon(Icons.label_rounded),
|
||||
const SizedBox(width: 16),
|
||||
Text(t.bookmarks.filterSort),
|
||||
Text(t.tags.tags),
|
||||
],
|
||||
),
|
||||
),
|
||||
const PopupMenuDivider(height: 1),
|
||||
PopupMenuItem(
|
||||
onTap: () => ref.read(routerProvider).push(RoutesPaths.settings),
|
||||
child: Row(
|
||||
children: [
|
||||
const Icon(Icons.settings_rounded),
|
||||
const SizedBox(width: 16),
|
||||
Text(t.settings.settings),
|
||||
],
|
||||
),
|
||||
),
|
||||
@@ -195,7 +210,7 @@ class _List extends ConsumerWidget {
|
||||
],
|
||||
body: SafeArea(
|
||||
top: false,
|
||||
bottom: false,
|
||||
bottom: true,
|
||||
child: Builder(
|
||||
builder: (context) => RefreshIndicator(
|
||||
displacement: 120,
|
||||
|
||||
@@ -40,9 +40,7 @@ class SearchBookmarksModal extends ConsumerWidget {
|
||||
if (ref.watch(searchBookmarksProvider).selectedBookmark != null)
|
||||
Expanded(
|
||||
flex: 3,
|
||||
child: WebViewScreen(
|
||||
bookmark: ref.watch(searchBookmarksProvider).selectedBookmark!,
|
||||
),
|
||||
child: WebViewScreen(bookmark: ref.watch(searchBookmarksProvider).selectedBookmark!),
|
||||
),
|
||||
if (ref.watch(searchBookmarksProvider).selectedBookmark == null)
|
||||
Expanded(
|
||||
|
||||
@@ -85,9 +85,7 @@ class FilteredBookmarksScreen extends HookConsumerWidget {
|
||||
if (ref.watch(filteredBookmarksProvider).selectedBookmark != null)
|
||||
Expanded(
|
||||
flex: 3,
|
||||
child: WebViewScreen(
|
||||
bookmark: ref.watch(filteredBookmarksProvider).selectedBookmark!,
|
||||
),
|
||||
child: WebViewScreen(bookmark: ref.watch(filteredBookmarksProvider).selectedBookmark!),
|
||||
),
|
||||
if (ref.watch(filteredBookmarksProvider).selectedBookmark == null)
|
||||
const Expanded(
|
||||
|
||||
@@ -12,6 +12,7 @@ import 'package:linkdy/widgets/section_label.dart';
|
||||
import 'package:linkdy/widgets/custom_list_tile.dart';
|
||||
import 'package:linkdy/widgets/custom_settings_tile.dart';
|
||||
|
||||
import 'package:linkdy/providers/router.provider.dart';
|
||||
import 'package:linkdy/providers/app_info.provider.dart';
|
||||
import 'package:linkdy/utils/open_url.dart';
|
||||
import 'package:linkdy/constants/strings.dart';
|
||||
@@ -51,6 +52,7 @@ class _List extends ConsumerWidget {
|
||||
Widget build(BuildContext context, WidgetRef ref) {
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
leading: BackButton(onPressed: () => ref.read(routerProvider).pop()),
|
||||
title: Text(t.settings.settings),
|
||||
),
|
||||
body: ListView(
|
||||
|
||||
@@ -14,7 +14,8 @@ Route circlePageBuilder({
|
||||
fullscreenDialog: fullScreenDialog ?? false,
|
||||
transitionsBuilder: (context, animation, secondaryAnimation, child) {
|
||||
const double beganRadius = 0.0;
|
||||
final double endRadius = MediaQuery.of(context).size.height * 1.7;
|
||||
final size = MediaQuery.of(context).size;
|
||||
final double endRadius = size.height > size.width ? size.height * 1.2 : size.width * 1.2;
|
||||
|
||||
final radiusTweenAnimation = animation.drive(
|
||||
Tween(begin: beganRadius, end: endRadius),
|
||||
|
||||
Reference in New Issue
Block a user