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