Browse Source

add null check

xuty 5 years ago
parent
commit
1f375d25e6
1 changed files with 2 additions and 1 deletions
  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;