fix nullable

This commit is contained in:
Fabian Freund
2025-12-01 10:34:00 +01:00
parent 60579b7454
commit cb6cb2ba62
@@ -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_material_design_icons/flutter_material_design_icons.dart';
import 'package:flutter_mozilla_components/flutter_mozilla_components.dart'; import 'package:flutter_mozilla_components/flutter_mozilla_components.dart';
import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart';
import 'package:nullability/nullability.dart';
import 'package:weblibre/core/routing/routes.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/entities/bookmark_item.dart';
import 'package:weblibre/features/geckoview/features/bookmarks/domain/providers/bookmarks.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), leadingIcon: const Icon(MdiIcons.expandAll),
child: const Text('Expand All Folders'), child: const Text('Expand All Folders'),
onPressed: () { onPressed: () {
treeKey.currentState?.controller.expandAllChildren( treeKey.currentState?.controller.mapNotNull((controller) {
treeKey.currentState!.controller.tree, controller.expandAllChildren(
recursive: true, controller.tree,
); recursive: true,
);
});
}, },
), ),
], ],