Skip to content

Commit

Permalink
add AutomaticKeepAliveClientMixin
Browse files Browse the repository at this point in the history
  • Loading branch information
VNAPNIC committed Mar 27, 2020
1 parent 190563e commit a70425c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/gocoder/src/wowz_camera_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ class WOWZCameraView extends StatefulWidget {
final String iosLicenseKey;
}

class _WOWZCameraViewState extends State<WOWZCameraView> {
class _WOWZCameraViewState extends State<WOWZCameraView> with AutomaticKeepAliveClientMixin{
var _viewId = 0;
MethodChannel _channel;

Expand Down Expand Up @@ -136,6 +136,7 @@ class _WOWZCameraViewState extends State<WOWZCameraView> {

@override
Widget build(BuildContext context) {
super.build(context);
return (defaultTargetPlatform == TargetPlatform.android)
? AndroidView(
viewType: _camera_view_channel,
Expand Down Expand Up @@ -202,6 +203,9 @@ class _WOWZCameraViewState extends State<WOWZCameraView> {
}
}
}

@override
bool get wantKeepAlive => true;
}

@immutable
Expand Down

0 comments on commit a70425c

Please sign in to comment.