Skip to content

Commit c0e2a23

Browse files
committed
fix userName vs password is null object
1 parent 0247a9c commit c0e2a23

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

lib/gocoder/src/wowz_camera_view.dart

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -202,9 +202,12 @@ class _WOWZCameraViewState extends State<WOWZCameraView> {
202202
_channel.invokeMethod(_applicationName, widget.applicationName);
203203
_channel.invokeMethod(_streamName, widget.streamName);
204204
//authentication
205-
_channel.invokeMethod(_username, widget.username);
206-
_channel.invokeMethod(_password, widget.password);
207-
205+
if (widget.username != null) {
206+
_channel.invokeMethod(_username, widget.username);
207+
}
208+
if (widget.password != null) {
209+
_channel.invokeMethod(_password, widget.password);
210+
}
208211
if (widget.wowzSize != null) {
209212
_channel.invokeMethod(
210213
_wowzSize, "${widget.wowzSize.width}/${widget.wowzSize.height}");

0 commit comments

Comments
 (0)