Skip to content

Commit cb6cb2b

Browse files
committed
fix nullable
1 parent 60579b7 commit cb6cb2b

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

app/lib/features/geckoview/features/bookmarks/presentation/screens/bookmark_list.dart

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import 'package:flutter_hooks/flutter_hooks.dart';
66
import 'package:flutter_material_design_icons/flutter_material_design_icons.dart';
77
import 'package:flutter_mozilla_components/flutter_mozilla_components.dart';
88
import 'package:hooks_riverpod/hooks_riverpod.dart';
9+
import 'package:nullability/nullability.dart';
910
import 'package:weblibre/core/routing/routes.dart';
1011
import 'package:weblibre/features/geckoview/features/bookmarks/domain/entities/bookmark_item.dart';
1112
import 'package:weblibre/features/geckoview/features/bookmarks/domain/providers/bookmarks.dart';
@@ -73,10 +74,12 @@ class BookmarkListScreen extends HookConsumerWidget {
7374
leadingIcon: const Icon(MdiIcons.expandAll),
7475
child: const Text('Expand All Folders'),
7576
onPressed: () {
76-
treeKey.currentState?.controller.expandAllChildren(
77-
treeKey.currentState!.controller.tree,
78-
recursive: true,
79-
);
77+
treeKey.currentState?.controller.mapNotNull((controller) {
78+
controller.expandAllChildren(
79+
controller.tree,
80+
recursive: true,
81+
);
82+
});
8083
},
8184
),
8285
],

0 commit comments

Comments
 (0)