Removed circular search animation

This commit is contained in:
Juan Gilsanz Polo
2024-02-29 21:51:22 +01:00
parent 2574ffc2f0
commit 67a9922275
3 changed files with 7 additions and 10 deletions

View File

@@ -22,6 +22,7 @@ class BookmarkItem extends ConsumerWidget {
final void Function(Bookmark bookmark) onShareInternally;
final bool selected;
final bool tabletMode;
final Color? tileBackgroundColor;
const BookmarkItem({
super.key,
@@ -34,6 +35,7 @@ class BookmarkItem extends ConsumerWidget {
required this.onShareInternally,
required this.selected,
required this.tabletMode,
this.tileBackgroundColor,
});
@override
@@ -108,7 +110,7 @@ class BookmarkItem extends ConsumerWidget {
child: Material(
color: selected && tabletMode
? Theme.of(context).colorScheme.primaryContainer
: Theme.of(context).colorScheme.surface,
: tileBackgroundColor ?? Theme.of(context).colorScheme.surface,
child: InkWell(
onTap: () => onSelect(bookmark),
child: Padding(

View File

@@ -7,7 +7,6 @@ import 'package:linkdy/screens/bookmarks/ui/bookmark_item.dart';
import 'package:linkdy/screens/bookmarks/ui/bookmark_form_modal.dart';
import 'package:linkdy/screens/bookmarks/ui/delete_bookmark_modal.dart';
import 'package:linkdy/screens/bookmarks/ui/search_bookmarks.dart';
import 'package:linkdy/widgets/circle_page_transition.dart';
import 'package:linkdy/widgets/error_screen.dart';
import 'package:linkdy/widgets/no_data_screen.dart';
@@ -70,12 +69,11 @@ class _List extends ConsumerWidget {
ref.read(bookmarksProvider.notifier).clearSelectedBookmark();
ref.read(bookmarksProvider).webViewRouter.pop();
}
RenderBox box = _searchButtonKey.currentContext!.findRenderObject() as RenderBox;
Offset position = box.localToGlobal(Offset.zero);
// RenderBox box = _searchButtonKey.currentContext!.findRenderObject() as RenderBox;
// Offset position = box.localToGlobal(Offset.zero);
Navigator.of(context, rootNavigator: true).push(
CirclePageRoute(
page: const SearchBookmarksModal(fullscreen: true),
beginPosition: Offset(position.dx + 20, position.dy + 20),
MaterialPageRoute(
builder: (ctx) => const SearchBookmarksModal(fullscreen: true),
),
);
}

View File

@@ -38,7 +38,6 @@ class SearchBookmarksModal extends ConsumerWidget {
Expanded(
flex: 3,
child: Material(
color: Theme.of(context).colorScheme.primaryContainer.withOpacity(0.2),
child: Router.withConfig(config: ref.watch(searchBookmarksProvider).webViewRouter),
),
),
@@ -78,9 +77,7 @@ class _List extends ConsumerWidget {
}
return Scaffold(
backgroundColor: Theme.of(context).colorScheme.primaryContainer.withOpacity(0.2),
appBar: AppBar(
backgroundColor: Theme.of(context).colorScheme.primaryContainer.withOpacity(0),
toolbarHeight: 68,
leading: Padding(
padding: const EdgeInsets.only(bottom: 8),