Fix camera stream open

This commit is contained in:
estevez-dev
2019-06-23 14:36:15 +03:00
parent de187f3ed5
commit 2375543ebf

View File

@ -20,11 +20,21 @@ class _CameraStreamViewState extends State<CameraStreamView> {
String streamUrl = ""; String streamUrl = "";
launchStream() { launchStream() {
HAUtils.launchURLInCustomTab( Navigator.push(
context: context, context,
url: streamUrl, MaterialPageRoute(
enableDefaultShare: false, builder: (context) => WebviewScaffold(
showPageTitle: false url: "$streamUrl",
withZoom: true,
appBar: new AppBar(
leading: IconButton(
icon: Icon(Icons.close),
onPressed: () => Navigator.pop(context)
),
title: new Text("${_entity.displayName}"),
),
),
)
); );
} }
@ -45,7 +55,8 @@ class _CameraStreamViewState extends State<CameraStreamView> {
padding: const EdgeInsets.all(20.0), padding: const EdgeInsets.all(20.0),
child: IconButton( child: IconButton(
icon: Icon(MaterialDesignIcons.getIconDataFromIconName("mdi:monitor-screenshot"), color: Colors.amber), icon: Icon(MaterialDesignIcons.getIconDataFromIconName("mdi:monitor-screenshot"), color: Colors.amber),
iconSize: 50.0 iconSize: 50.0,
onPressed: () => launchStream(),
) )
) )
], ],