Skip to content

Commit 43e5414

Browse files
author
stalin
committed
fix: add null safety check for controller.Scroll control might throw
assert when start up.
1 parent fabfcf6 commit 43e5414

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lib/frontend/terminal_view.dart

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,9 @@ class _TerminalViewState extends State<TerminalView> {
205205
child: Scrollable(
206206
controller: widget.scrollController,
207207
viewportBuilder: (context, offset) {
208+
if (!widget.scrollController.hasClients) {
209+
return buildTerminal(context);
210+
}
208211
final position = widget.scrollController.position;
209212

210213
/// use [_EmptyScrollActivity] to suppress unexpected behaviors

0 commit comments

Comments
 (0)