Skip to content

Commit 7efe9ae

Browse files
committed
fix: Scrolling fix if no scrollview attached
1 parent 4f92786 commit 7efe9ae

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

lib/presentation/widgets/utilities/top_app_bar_config.dart

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,13 @@ class TopAppBarConfig extends StatelessWidget {
2020
onTap: () {
2121
final controller = PrimaryScrollController.maybeOf(context);
2222

23+
final hasClients = controller?.hasClients ?? false;
24+
25+
if (!hasClients) {
26+
FocusManager.instance.primaryFocus?.unfocus();
27+
return;
28+
}
29+
2330
if (controller?.position.pixels == 0.0) {
2431
FocusManager.instance.primaryFocus?.unfocus();
2532
}

0 commit comments

Comments
 (0)