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 void Function(Bookmark bookmark) onShareInternally;
final bool selected; final bool selected;
final bool tabletMode; final bool tabletMode;
final Color? tileBackgroundColor;
const BookmarkItem({ const BookmarkItem({
super.key, super.key,
@@ -34,6 +35,7 @@ class BookmarkItem extends ConsumerWidget {
required this.onShareInternally, required this.onShareInternally,
required this.selected, required this.selected,
required this.tabletMode, required this.tabletMode,
this.tileBackgroundColor,
}); });
@override @override
@@ -108,7 +110,7 @@ class BookmarkItem extends ConsumerWidget {
child: Material( child: Material(
color: selected && tabletMode color: selected && tabletMode
? Theme.of(context).colorScheme.primaryContainer ? Theme.of(context).colorScheme.primaryContainer
: Theme.of(context).colorScheme.surface, : tileBackgroundColor ?? Theme.of(context).colorScheme.surface,
child: InkWell( child: InkWell(
onTap: () => onSelect(bookmark), onTap: () => onSelect(bookmark),
child: Padding( 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/bookmark_form_modal.dart';
import 'package:linkdy/screens/bookmarks/ui/delete_bookmark_modal.dart'; import 'package:linkdy/screens/bookmarks/ui/delete_bookmark_modal.dart';
import 'package:linkdy/screens/bookmarks/ui/search_bookmarks.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/error_screen.dart';
import 'package:linkdy/widgets/no_data_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.notifier).clearSelectedBookmark();
ref.read(bookmarksProvider).webViewRouter.pop(); ref.read(bookmarksProvider).webViewRouter.pop();
} }
RenderBox box = _searchButtonKey.currentContext!.findRenderObject() as RenderBox; // RenderBox box = _searchButtonKey.currentContext!.findRenderObject() as RenderBox;
Offset position = box.localToGlobal(Offset.zero); // Offset position = box.localToGlobal(Offset.zero);
Navigator.of(context, rootNavigator: true).push( Navigator.of(context, rootNavigator: true).push(
CirclePageRoute( MaterialPageRoute(
page: const SearchBookmarksModal(fullscreen: true), builder: (ctx) => const SearchBookmarksModal(fullscreen: true),
beginPosition: Offset(position.dx + 20, position.dy + 20),
), ),
); );
} }

View File

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