This repository has been archived on 2023-11-18. You can view files and clone it, but cannot push or open issues or pull requests.
ha_client/lib/entities/camera/camera_entity.class.dart

21 lines
561 B
Dart
Raw Normal View History

2019-08-24 21:22:32 +03:00
part of '../../main.dart';
2019-01-29 21:59:05 +02:00
class CameraEntity extends Entity {
static const SUPPORT_ON_OFF = 1;
2020-02-20 16:33:03 +02:00
static const SUPPORT_STREAM = 2;
2019-01-29 21:59:05 +02:00
2019-03-19 23:07:40 +02:00
CameraEntity(Map rawData, String webHost) : super(rawData, webHost);
2019-01-29 21:59:05 +02:00
bool get supportOnOff => ((supportedFeatures &
2019-01-29 21:59:05 +02:00
CameraEntity.SUPPORT_ON_OFF) ==
CameraEntity.SUPPORT_ON_OFF);
2020-02-20 16:33:03 +02:00
bool get supportStream => ((supportedFeatures &
CameraEntity.SUPPORT_STREAM) ==
CameraEntity.SUPPORT_STREAM);
2019-01-29 21:59:05 +02:00
@override
Widget _buildAdditionalControlsForPage(BuildContext context) {
return CameraStreamView();
2019-01-29 21:59:05 +02:00
}
}