Explorar el Código

Merge pull request #67 from linhanyu/master

fix assert of scrollController.position
xuty hace 4 años
padre
commit
f36c8f7998
Se han modificado 1 ficheros con 3 adiciones y 0 borrados
  1. 3 0
      lib/frontend/terminal_view.dart

+ 3 - 0
lib/frontend/terminal_view.dart

@@ -205,6 +205,9 @@ class _TerminalViewState extends State<TerminalView> {
               child: Scrollable(
                 controller: widget.scrollController,
                 viewportBuilder: (context, offset) {
+                  if (!widget.scrollController.hasClients) {
+                    return buildTerminal(context);
+                  }
                   final position = widget.scrollController.position;
 
                   /// use [_EmptyScrollActivity] to suppress unexpected behaviors