Explorar el Código

add null check

xuty hace 5 años
padre
commit
1f375d25e6
Se han modificado 1 ficheros con 2 adiciones y 1 borrados
  1. 2 1
      lib/frontend/terminal_view.dart

+ 2 - 1
lib/frontend/terminal_view.dart

@@ -51,7 +51,8 @@ class TerminalView extends StatefulWidget {
     this.fontFamily = _kDefaultFontFamily,
     this.fontWidthScaleFactor = 1.0,
     this.fontHeightScaleFactor = 1.1,
-  }) : super(key: key ?? ValueKey(terminal));
+  })  : assert(terminal != null),
+        super(key: key ?? ValueKey(terminal));
 
   final Terminal terminal;
   final ResizeHandler onResize;