From cb6cb2ba622be7f7660fe8c945417e307d0a5c9b Mon Sep 17 00:00:00 2001 From: Fabian Freund Date: Mon, 1 Dec 2025 10:34:00 +0100 Subject: [PATCH] fix nullable --- .../bookmarks/presentation/screens/bookmark_list.dart | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/app/lib/features/geckoview/features/bookmarks/presentation/screens/bookmark_list.dart b/app/lib/features/geckoview/features/bookmarks/presentation/screens/bookmark_list.dart index bbd29d09..80410467 100644 --- a/app/lib/features/geckoview/features/bookmarks/presentation/screens/bookmark_list.dart +++ b/app/lib/features/geckoview/features/bookmarks/presentation/screens/bookmark_list.dart @@ -6,6 +6,7 @@ import 'package:flutter_hooks/flutter_hooks.dart'; import 'package:flutter_material_design_icons/flutter_material_design_icons.dart'; import 'package:flutter_mozilla_components/flutter_mozilla_components.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; +import 'package:nullability/nullability.dart'; import 'package:weblibre/core/routing/routes.dart'; import 'package:weblibre/features/geckoview/features/bookmarks/domain/entities/bookmark_item.dart'; import 'package:weblibre/features/geckoview/features/bookmarks/domain/providers/bookmarks.dart'; @@ -73,10 +74,12 @@ class BookmarkListScreen extends HookConsumerWidget { leadingIcon: const Icon(MdiIcons.expandAll), child: const Text('Expand All Folders'), onPressed: () { - treeKey.currentState?.controller.expandAllChildren( - treeKey.currentState!.controller.tree, - recursive: true, - ); + treeKey.currentState?.controller.mapNotNull((controller) { + controller.expandAllChildren( + controller.tree, + recursive: true, + ); + }); }, ), ],