Add fit option for EntityPicture widget

This commit is contained in:
Yegor Vialov
2020-03-14 18:23:39 +00:00
parent 7e09d92fdf
commit bf53e4b9df
2 changed files with 9 additions and 3 deletions

View File

@ -105,14 +105,18 @@ class _CameraStreamViewState extends State<CameraStreamView> {
Widget screenWidget;
if (!_isLoaded) {
screenWidget = Center(
child: EntityPicture()
child: EntityPicture(
fit: BoxFit.contain,
)
);
} else if (_entity.supportStream) {
if (_videoPlayerController.value.initialized) {
screenWidget = VideoPlayer(_videoPlayerController);
} else {
screenWidget = Center(
child: EntityPicture()
child: EntityPicture(
fit: BoxFit.contain,
)
);
}
} else {