Compare commits
21 Commits
beta/0.7.2
...
beta/0.7.5
Author | SHA1 | Date | |
---|---|---|---|
6cb5463b13 | |||
63a789ebfb | |||
a0994e9a60 | |||
8d1b728194 | |||
1a9fec8b98 | |||
e634253282 | |||
64b23ec7cc | |||
afe207a878 | |||
4bac0c092f | |||
74c8ae35a1 | |||
7856637456 | |||
965f80a6ca | |||
198c2ba49a | |||
4b9ec5ca6e | |||
5792652619 | |||
2c900333a5 | |||
1f782d7cd3 | |||
89cc1833de | |||
1262d8c9aa | |||
85b0c4f814 | |||
551a8dfa31 |
@ -3,11 +3,6 @@
|
|||||||
|
|
||||||
<uses-feature android:name="android.hardware.touchscreen"
|
<uses-feature android:name="android.hardware.touchscreen"
|
||||||
android:required="false" />
|
android:required="false" />
|
||||||
|
|
||||||
<!-- The INTERNET permission is required for development. Specifically,
|
|
||||||
flutter needs it to communicate with the running application
|
|
||||||
to allow setting breakpoints, to provide hot reload, etc.
|
|
||||||
-->
|
|
||||||
<uses-permission android:name="android.permission.INTERNET"/>
|
<uses-permission android:name="android.permission.INTERNET"/>
|
||||||
<uses-permission android:name="android.permission.VIBRATE" />
|
<uses-permission android:name="android.permission.VIBRATE" />
|
||||||
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
|
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
|
||||||
@ -15,6 +10,7 @@
|
|||||||
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>
|
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>
|
||||||
<uses-permission android:name="android.permission.WAKE_LOCK"/>
|
<uses-permission android:name="android.permission.WAKE_LOCK"/>
|
||||||
|
|
||||||
|
|
||||||
<!-- io.flutter.app.FlutterApplication is an android.app.Application that
|
<!-- io.flutter.app.FlutterApplication is an android.app.Application that
|
||||||
calls FlutterMain.startInitialization(this); in its onCreate method.
|
calls FlutterMain.startInitialization(this); in its onCreate method.
|
||||||
In most cases you can leave this as-is, but you if you want to provide
|
In most cases you can leave this as-is, but you if you want to provide
|
||||||
|
@ -26,10 +26,10 @@ class _AlarmControlPanelControlsWidgetWidgetState extends State<AlarmControlPane
|
|||||||
|
|
||||||
void _callService(AlarmControlPanelEntity entity, String service) {
|
void _callService(AlarmControlPanelEntity entity, String service) {
|
||||||
ConnectionManager().callService(
|
ConnectionManager().callService(
|
||||||
entity.domain,
|
domain: entity.domain,
|
||||||
service,
|
service: service,
|
||||||
entity.entityId,
|
entityId: entity.entityId,
|
||||||
{"code": "$code"}
|
data: {"code": "$code"}
|
||||||
);
|
);
|
||||||
setState(() {
|
setState(() {
|
||||||
code = "";
|
code = "";
|
||||||
@ -62,10 +62,9 @@ class _AlarmControlPanelControlsWidgetWidgetState extends State<AlarmControlPane
|
|||||||
child: new Text("Yes"),
|
child: new Text("Yes"),
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
ConnectionManager().callService(
|
ConnectionManager().callService(
|
||||||
entity.domain,
|
domain: entity.domain,
|
||||||
"alarm_trigger",
|
service: "alarm_trigger",
|
||||||
entity.entityId,
|
entityId: entity.entityId
|
||||||
null
|
|
||||||
);
|
);
|
||||||
Navigator.of(context).pop();
|
Navigator.of(context).pop();
|
||||||
},
|
},
|
||||||
|
@ -84,10 +84,10 @@ class _ClimateControlWidgetState extends State<ClimateControlWidget> {
|
|||||||
setState(() {
|
setState(() {
|
||||||
_changedHere = true;
|
_changedHere = true;
|
||||||
ConnectionManager().callService(
|
ConnectionManager().callService(
|
||||||
entity.domain,
|
domain: entity.domain,
|
||||||
"set_temperature",
|
service: "set_temperature",
|
||||||
entity.entityId,
|
entityId: entity.entityId,
|
||||||
{"temperature": "${_tmpTemperature.toStringAsFixed(1)}"}
|
data: {"temperature": "${_tmpTemperature.toStringAsFixed(1)}"}
|
||||||
);
|
);
|
||||||
_resetStateTimer(entity);
|
_resetStateTimer(entity);
|
||||||
});
|
});
|
||||||
@ -107,10 +107,10 @@ class _ClimateControlWidgetState extends State<ClimateControlWidget> {
|
|||||||
setState(() {
|
setState(() {
|
||||||
_changedHere = true;
|
_changedHere = true;
|
||||||
ConnectionManager().callService(
|
ConnectionManager().callService(
|
||||||
entity.domain,
|
domain: entity.domain,
|
||||||
"set_temperature",
|
service: "set_temperature",
|
||||||
entity.entityId,
|
entityId: entity.entityId,
|
||||||
{"target_temp_high": "${_tmpTargetHigh.toStringAsFixed(1)}", "target_temp_low": "${_tmpTargetLow.toStringAsFixed(1)}"}
|
data: {"target_temp_high": "${_tmpTargetHigh.toStringAsFixed(1)}", "target_temp_low": "${_tmpTargetLow.toStringAsFixed(1)}"}
|
||||||
);
|
);
|
||||||
_resetStateTimer(entity);
|
_resetStateTimer(entity);
|
||||||
});
|
});
|
||||||
@ -121,7 +121,12 @@ class _ClimateControlWidgetState extends State<ClimateControlWidget> {
|
|||||||
setState(() {
|
setState(() {
|
||||||
_tmpTargetHumidity = value.roundToDouble();
|
_tmpTargetHumidity = value.roundToDouble();
|
||||||
_changedHere = true;
|
_changedHere = true;
|
||||||
ConnectionManager().callService(entity.domain, "set_humidity", entity.entityId, {"humidity": "$_tmpTargetHumidity"});
|
ConnectionManager().callService(
|
||||||
|
domain: entity.domain,
|
||||||
|
service: "set_humidity",
|
||||||
|
entityId: entity.entityId,
|
||||||
|
data: {"humidity": "$_tmpTargetHumidity"}
|
||||||
|
);
|
||||||
_resetStateTimer(entity);
|
_resetStateTimer(entity);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -130,7 +135,12 @@ class _ClimateControlWidgetState extends State<ClimateControlWidget> {
|
|||||||
setState(() {
|
setState(() {
|
||||||
_tmpHVACMode = value;
|
_tmpHVACMode = value;
|
||||||
_changedHere = true;
|
_changedHere = true;
|
||||||
ConnectionManager().callService(entity.domain, "set_hvac_mode", entity.entityId, {"hvac_mode": "$_tmpHVACMode"});
|
ConnectionManager().callService(
|
||||||
|
domain: entity.domain,
|
||||||
|
service: "set_hvac_mode",
|
||||||
|
entityId: entity.entityId,
|
||||||
|
data: {"hvac_mode": "$_tmpHVACMode"}
|
||||||
|
);
|
||||||
_resetStateTimer(entity);
|
_resetStateTimer(entity);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -139,7 +149,12 @@ class _ClimateControlWidgetState extends State<ClimateControlWidget> {
|
|||||||
setState(() {
|
setState(() {
|
||||||
_tmpSwingMode = value;
|
_tmpSwingMode = value;
|
||||||
_changedHere = true;
|
_changedHere = true;
|
||||||
ConnectionManager().callService(entity.domain, "set_swing_mode", entity.entityId, {"swing_mode": "$_tmpSwingMode"});
|
ConnectionManager().callService(
|
||||||
|
domain: entity.domain,
|
||||||
|
service: "set_swing_mode",
|
||||||
|
entityId: entity.entityId,
|
||||||
|
data: {"swing_mode": "$_tmpSwingMode"}
|
||||||
|
);
|
||||||
_resetStateTimer(entity);
|
_resetStateTimer(entity);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -148,7 +163,7 @@ class _ClimateControlWidgetState extends State<ClimateControlWidget> {
|
|||||||
setState(() {
|
setState(() {
|
||||||
_tmpFanMode = value;
|
_tmpFanMode = value;
|
||||||
_changedHere = true;
|
_changedHere = true;
|
||||||
ConnectionManager().callService(entity.domain, "set_fan_mode", entity.entityId, {"fan_mode": "$_tmpFanMode"});
|
ConnectionManager().callService(domain: entity.domain, service: "set_fan_mode", entityId: entity.entityId, data: {"fan_mode": "$_tmpFanMode"});
|
||||||
_resetStateTimer(entity);
|
_resetStateTimer(entity);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -157,7 +172,7 @@ class _ClimateControlWidgetState extends State<ClimateControlWidget> {
|
|||||||
setState(() {
|
setState(() {
|
||||||
_tmpPresetMode = value;
|
_tmpPresetMode = value;
|
||||||
_changedHere = true;
|
_changedHere = true;
|
||||||
ConnectionManager().callService(entity.domain, "set_preset_mode", entity.entityId, {"preset_mode": "$_tmpPresetMode"});
|
ConnectionManager().callService(domain: entity.domain, service: "set_preset_mode", entityId: entity.entityId, data: {"preset_mode": "$_tmpPresetMode"});
|
||||||
_resetStateTimer(entity);
|
_resetStateTimer(entity);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -175,7 +190,7 @@ class _ClimateControlWidgetState extends State<ClimateControlWidget> {
|
|||||||
setState(() {
|
setState(() {
|
||||||
_tmpAuxHeat = value;
|
_tmpAuxHeat = value;
|
||||||
_changedHere = true;
|
_changedHere = true;
|
||||||
ConnectionManager().callService(entity.domain, "set_aux_heat", entity.entityId, {"aux_heat": "$_tmpAuxHeat"});
|
ConnectionManager().callService(domain: entity.domain, service: "set_aux_heat", entityId: entity.entityId, data: {"aux_heat": "$_tmpAuxHeat"});
|
||||||
_resetStateTimer(entity);
|
_resetStateTimer(entity);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -18,7 +18,7 @@ class _CoverControlWidgetState extends State<CoverControlWidget> {
|
|||||||
setState(() {
|
setState(() {
|
||||||
_tmpPosition = position.roundToDouble();
|
_tmpPosition = position.roundToDouble();
|
||||||
_changedHere = true;
|
_changedHere = true;
|
||||||
ConnectionManager().callService(entity.domain, "set_cover_position", entity.entityId,{"position": _tmpPosition.round()});
|
ConnectionManager().callService(domain: entity.domain, service: "set_cover_position", entityId: entity.entityId, data: {"position": _tmpPosition.round()});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -26,7 +26,7 @@ class _CoverControlWidgetState extends State<CoverControlWidget> {
|
|||||||
setState(() {
|
setState(() {
|
||||||
_tmpTiltPosition = position.roundToDouble();
|
_tmpTiltPosition = position.roundToDouble();
|
||||||
_changedHere = true;
|
_changedHere = true;
|
||||||
ConnectionManager().callService(entity.domain, "set_cover_tilt_position", entity.entityId,{"tilt_position": _tmpTiltPosition.round()});
|
ConnectionManager().callService(domain: entity.domain, service: "set_cover_tilt_position", entityId: entity.entityId, data: {"tilt_position": _tmpTiltPosition.round()});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -136,17 +136,17 @@ class _CoverControlWidgetState extends State<CoverControlWidget> {
|
|||||||
class CoverTiltControlsWidget extends StatelessWidget {
|
class CoverTiltControlsWidget extends StatelessWidget {
|
||||||
void _open(CoverEntity entity) {
|
void _open(CoverEntity entity) {
|
||||||
ConnectionManager().callService(
|
ConnectionManager().callService(
|
||||||
entity.domain, "open_cover_tilt", entity.entityId, null);
|
domain: entity.domain, service: "open_cover_tilt", entityId: entity.entityId);
|
||||||
}
|
}
|
||||||
|
|
||||||
void _close(CoverEntity entity) {
|
void _close(CoverEntity entity) {
|
||||||
ConnectionManager().callService(
|
ConnectionManager().callService(
|
||||||
entity.domain, "close_cover_tilt", entity.entityId, null);
|
domain: entity.domain, service: "close_cover_tilt", entityId: entity.entityId);
|
||||||
}
|
}
|
||||||
|
|
||||||
void _stop(CoverEntity entity) {
|
void _stop(CoverEntity entity) {
|
||||||
ConnectionManager().callService(
|
ConnectionManager().callService(
|
||||||
entity.domain, "stop_cover_tilt", entity.entityId, null);
|
domain: entity.domain, service: "stop_cover_tilt", entityId: entity.entityId);
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
@ -3,17 +3,26 @@ part of '../../../main.dart';
|
|||||||
class CoverStateWidget extends StatelessWidget {
|
class CoverStateWidget extends StatelessWidget {
|
||||||
void _open(CoverEntity entity) {
|
void _open(CoverEntity entity) {
|
||||||
ConnectionManager().callService(
|
ConnectionManager().callService(
|
||||||
entity.domain, "open_cover", entity.entityId, null);
|
domain: entity.domain,
|
||||||
|
service: "open_cover",
|
||||||
|
entityId: entity.entityId
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
void _close(CoverEntity entity) {
|
void _close(CoverEntity entity) {
|
||||||
ConnectionManager().callService(
|
ConnectionManager().callService(
|
||||||
entity.domain, "close_cover", entity.entityId, null);
|
domain: entity.domain,
|
||||||
|
service: "close_cover",
|
||||||
|
entityId: entity.entityId
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
void _stop(CoverEntity entity) {
|
void _stop(CoverEntity entity) {
|
||||||
ConnectionManager().callService(
|
ConnectionManager().callService(
|
||||||
entity.domain, "stop_cover", entity.entityId, null);
|
domain: entity.domain,
|
||||||
|
service: "stop_cover",
|
||||||
|
entityId: entity.entityId
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
@ -36,6 +36,6 @@ class DateTimeEntity extends Entity {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void setNewState(Map newValue) {
|
void setNewState(Map newValue) {
|
||||||
ConnectionManager().callService(domain, "set_datetime", entityId, newValue);
|
ConnectionManager().callService(domain: domain, service: "set_datetime", entityId: entityId, data: newValue);
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -153,7 +153,7 @@ class Entity {
|
|||||||
domain = rawData["entity_id"].split(".")[0];
|
domain = rawData["entity_id"].split(".")[0];
|
||||||
entityId = rawData["entity_id"];
|
entityId = rawData["entity_id"];
|
||||||
deviceClass = attributes["device_class"];
|
deviceClass = attributes["device_class"];
|
||||||
state = rawData["state"];
|
state = rawData["state"] is bool ? (rawData["state"] ? EntityState.on : EntityState.off) : rawData["state"];
|
||||||
displayState = Entity.StateByDeviceClass["$deviceClass.$state"] ?? (state.toLowerCase() == 'unknown' ? '-' : state);
|
displayState = Entity.StateByDeviceClass["$deviceClass.$state"] ?? (state.toLowerCase() == 'unknown' ? '-' : state);
|
||||||
_lastUpdated = DateTime.tryParse(rawData["last_updated"]);
|
_lastUpdated = DateTime.tryParse(rawData["last_updated"]);
|
||||||
entityPicture = _getEntityPictureUrl(webHost);
|
entityPicture = _getEntityPictureUrl(webHost);
|
||||||
|
@ -32,15 +32,17 @@ class EntityWrapper {
|
|||||||
void handleTap() {
|
void handleTap() {
|
||||||
switch (uiAction.tapAction) {
|
switch (uiAction.tapAction) {
|
||||||
case EntityUIAction.toggle: {
|
case EntityUIAction.toggle: {
|
||||||
ConnectionManager().callService("homeassistant", "toggle", entity.entityId, null);
|
ConnectionManager().callService(domain: "homeassistant", service: "toggle", entityId: entity.entityId);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case EntityUIAction.callService: {
|
case EntityUIAction.callService: {
|
||||||
if (uiAction.tapService != null) {
|
if (uiAction.tapService != null) {
|
||||||
ConnectionManager().callService(uiAction.tapService.split(".")[0],
|
ConnectionManager().callService(
|
||||||
uiAction.tapService.split(".")[1], null,
|
domain: uiAction.tapService.split(".")[0],
|
||||||
uiAction.tapServiceData);
|
service: uiAction.tapService.split(".")[1],
|
||||||
|
data: uiAction.tapServiceData
|
||||||
|
);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -74,15 +76,17 @@ class EntityWrapper {
|
|||||||
void handleHold() {
|
void handleHold() {
|
||||||
switch (uiAction.holdAction) {
|
switch (uiAction.holdAction) {
|
||||||
case EntityUIAction.toggle: {
|
case EntityUIAction.toggle: {
|
||||||
ConnectionManager().callService("homeassistant", "toggle", entity.entityId, null);
|
ConnectionManager().callService(domain: "homeassistant", service: "toggle", entityId: entity.entityId);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case EntityUIAction.callService: {
|
case EntityUIAction.callService: {
|
||||||
if (uiAction.holdService != null) {
|
if (uiAction.holdService != null) {
|
||||||
ConnectionManager().callService(uiAction.holdService.split(".")[0],
|
ConnectionManager().callService(
|
||||||
uiAction.holdService.split(".")[1], null,
|
domain: uiAction.holdService.split(".")[0],
|
||||||
uiAction.holdServiceData);
|
service: uiAction.holdService.split(".")[1],
|
||||||
|
data: uiAction.holdServiceData
|
||||||
|
);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -25,8 +25,11 @@ class _FanControlsWidgetState extends State<FanControlsWidget> {
|
|||||||
_tmpOscillate = oscillate;
|
_tmpOscillate = oscillate;
|
||||||
_changedHere = true;
|
_changedHere = true;
|
||||||
ConnectionManager().callService(
|
ConnectionManager().callService(
|
||||||
"fan", "oscillate", entity.entityId,
|
domain: "fan",
|
||||||
{"oscillating": oscillate});
|
service: "oscillate",
|
||||||
|
entityId: entity.entityId,
|
||||||
|
data: {"oscillating": oscillate}
|
||||||
|
);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -35,8 +38,11 @@ class _FanControlsWidgetState extends State<FanControlsWidget> {
|
|||||||
_tmpDirectionForward = forward;
|
_tmpDirectionForward = forward;
|
||||||
_changedHere = true;
|
_changedHere = true;
|
||||||
ConnectionManager().callService(
|
ConnectionManager().callService(
|
||||||
"fan", "set_direction", entity.entityId,
|
domain: "fan",
|
||||||
{"direction": forward ? "forward" : "reverse"});
|
service: "set_direction",
|
||||||
|
entityId: entity.entityId,
|
||||||
|
data: {"direction": forward ? "forward" : "reverse"}
|
||||||
|
);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -45,8 +51,11 @@ class _FanControlsWidgetState extends State<FanControlsWidget> {
|
|||||||
_tmpSpeed = value;
|
_tmpSpeed = value;
|
||||||
_changedHere = true;
|
_changedHere = true;
|
||||||
ConnectionManager().callService(
|
ConnectionManager().callService(
|
||||||
"fan", "set_speed", entity.entityId,
|
domain: "fan",
|
||||||
{"speed": value});
|
service: "set_speed",
|
||||||
|
entityId: entity.entityId,
|
||||||
|
data: {"speed": value}
|
||||||
|
);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -18,7 +18,7 @@ class FlatServiceButton extends StatelessWidget {
|
|||||||
}) : super(key: key);
|
}) : super(key: key);
|
||||||
|
|
||||||
void _setNewState() {
|
void _setNewState() {
|
||||||
ConnectionManager().callService(serviceDomain, serviceName, entityId, null);
|
ConnectionManager().callService(domain: serviceDomain, service: serviceName, entityId: entityId);
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
@ -29,8 +29,11 @@ class _LightControlsWidgetState extends State<LightControlsWidget> {
|
|||||||
_tmpBrightness = value.round();
|
_tmpBrightness = value.round();
|
||||||
_changedHere = true;
|
_changedHere = true;
|
||||||
ConnectionManager().callService(
|
ConnectionManager().callService(
|
||||||
entity.domain, "turn_on", entity.entityId,
|
domain: entity.domain,
|
||||||
{"brightness": _tmpBrightness});
|
service: "turn_on",
|
||||||
|
entityId: entity.entityId,
|
||||||
|
data: {"brightness": _tmpBrightness}
|
||||||
|
);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -39,8 +42,11 @@ class _LightControlsWidgetState extends State<LightControlsWidget> {
|
|||||||
_tmpWhiteValue = value.round();
|
_tmpWhiteValue = value.round();
|
||||||
_changedHere = true;
|
_changedHere = true;
|
||||||
ConnectionManager().callService(
|
ConnectionManager().callService(
|
||||||
entity.domain, "turn_on", entity.entityId,
|
domain: entity.domain,
|
||||||
{"white_value": _tmpWhiteValue});
|
service: "turn_on",
|
||||||
|
entityId: entity.entityId,
|
||||||
|
data: {"white_value": _tmpWhiteValue}
|
||||||
|
);
|
||||||
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -50,8 +56,11 @@ class _LightControlsWidgetState extends State<LightControlsWidget> {
|
|||||||
_tmpColorTemp = value.round();
|
_tmpColorTemp = value.round();
|
||||||
_changedHere = true;
|
_changedHere = true;
|
||||||
ConnectionManager().callService(
|
ConnectionManager().callService(
|
||||||
entity.domain, "turn_on", entity.entityId,
|
domain: entity.domain,
|
||||||
{"color_temp": _tmpColorTemp});
|
service: "turn_on",
|
||||||
|
entityId: entity.entityId,
|
||||||
|
data: {"color_temp": _tmpColorTemp}
|
||||||
|
);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -59,10 +68,12 @@ class _LightControlsWidgetState extends State<LightControlsWidget> {
|
|||||||
setState(() {
|
setState(() {
|
||||||
_tmpColor = color;
|
_tmpColor = color;
|
||||||
_changedHere = true;
|
_changedHere = true;
|
||||||
Logger.d( "HS Color: [${color.hue}, ${color.saturation}]");
|
|
||||||
ConnectionManager().callService(
|
ConnectionManager().callService(
|
||||||
entity.domain, "turn_on", entity.entityId,
|
domain: entity.domain,
|
||||||
{"hs_color": [color.hue, color.saturation*100]});
|
service: "turn_on",
|
||||||
|
entityId: entity.entityId,
|
||||||
|
data: {"hs_color": [color.hue, color.saturation*100]}
|
||||||
|
);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -72,8 +83,11 @@ class _LightControlsWidgetState extends State<LightControlsWidget> {
|
|||||||
_changedHere = true;
|
_changedHere = true;
|
||||||
if (_tmpEffect != null) {
|
if (_tmpEffect != null) {
|
||||||
ConnectionManager().callService(
|
ConnectionManager().callService(
|
||||||
entity.domain, "turn_on", entity.entityId,
|
domain: entity.domain,
|
||||||
{"effect": "$value"});
|
service: "turn_on",
|
||||||
|
entityId: entity.entityId,
|
||||||
|
data: {"effect": "$value"}
|
||||||
|
);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -7,11 +7,11 @@ class LockStateWidget extends StatelessWidget {
|
|||||||
const LockStateWidget({Key key, this.assumedState: false}) : super(key: key);
|
const LockStateWidget({Key key, this.assumedState: false}) : super(key: key);
|
||||||
|
|
||||||
void _lock(Entity entity) {
|
void _lock(Entity entity) {
|
||||||
ConnectionManager().callService("lock", "lock", entity.entityId, null);
|
ConnectionManager().callService(domain: "lock", service: "lock", entityId: entity.entityId);
|
||||||
}
|
}
|
||||||
|
|
||||||
void _unlock(Entity entity) {
|
void _unlock(Entity entity) {
|
||||||
ConnectionManager().callService("lock", "unlock", entity.entityId, null);
|
ConnectionManager().callService(domain: "lock", service: "unlock", entityId: entity.entityId);
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
@ -57,10 +57,10 @@ class _MediaPlayerSeekBarState extends State<MediaPlayerSeekBar> {
|
|||||||
focusColor: Colors.white,
|
focusColor: Colors.white,
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
ConnectionManager().callService(
|
ConnectionManager().callService(
|
||||||
"media_player",
|
domain: "media_player",
|
||||||
"media_seek",
|
service: "media_seek",
|
||||||
"${entity.entityId}",
|
entityId: entity.entityId,
|
||||||
{"seek_position": _savedPosition}
|
data: {"seek_position": _savedPosition}
|
||||||
);
|
);
|
||||||
setState(() {
|
setState(() {
|
||||||
_savedPosition = 0;
|
_savedPosition = 0;
|
||||||
@ -104,10 +104,10 @@ class _MediaPlayerSeekBarState extends State<MediaPlayerSeekBar> {
|
|||||||
Timer(Duration(milliseconds: 500), () {
|
Timer(Duration(milliseconds: 500), () {
|
||||||
if (!_seekStarted) {
|
if (!_seekStarted) {
|
||||||
ConnectionManager().callService(
|
ConnectionManager().callService(
|
||||||
"media_player",
|
domain: "media_player",
|
||||||
"media_seek",
|
service: "media_seek",
|
||||||
"${entity.entityId}",
|
entityId: entity.entityId,
|
||||||
{"seek_position": val}
|
data: {"seek_position": val}
|
||||||
);
|
);
|
||||||
setState(() {
|
setState(() {
|
||||||
_changedHere = true;
|
_changedHere = true;
|
||||||
|
@ -118,26 +118,28 @@ class MediaPlayerPlaybackControls extends StatelessWidget {
|
|||||||
|
|
||||||
|
|
||||||
void _setPower(MediaPlayerEntity entity) {
|
void _setPower(MediaPlayerEntity entity) {
|
||||||
if (entity.state != EntityState.unavailable && entity.state != EntityState.unknown) {
|
|
||||||
if (entity.state == EntityState.off) {
|
if (entity.state == EntityState.off) {
|
||||||
Logger.d("${entity.entityId} turn_on");
|
|
||||||
ConnectionManager().callService(
|
ConnectionManager().callService(
|
||||||
entity.domain, "turn_on", entity.entityId,
|
domain: entity.domain,
|
||||||
null);
|
service: "turn_on",
|
||||||
|
entityId: entity.entityId
|
||||||
|
);
|
||||||
} else {
|
} else {
|
||||||
Logger.d("${entity.entityId} turn_off");
|
|
||||||
ConnectionManager().callService(
|
ConnectionManager().callService(
|
||||||
entity.domain, "turn_off", entity.entityId,
|
domain: entity.domain,
|
||||||
null);
|
service: "turn_off",
|
||||||
}
|
entityId: entity.entityId
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void _callAction(MediaPlayerEntity entity, String action) {
|
void _callAction(MediaPlayerEntity entity, String action) {
|
||||||
Logger.d("${entity.entityId} $action");
|
Logger.d("${entity.entityId} $action");
|
||||||
ConnectionManager().callService(
|
ConnectionManager().callService(
|
||||||
entity.domain, "$action", entity.entityId,
|
domain: entity.domain,
|
||||||
null);
|
service: "$action",
|
||||||
|
entityId: entity.entityId
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@ -264,27 +266,50 @@ class _MediaPlayerControlsState extends State<MediaPlayerControls> {
|
|||||||
setState(() {
|
setState(() {
|
||||||
_changedHere = true;
|
_changedHere = true;
|
||||||
_newVolumeLevel = value;
|
_newVolumeLevel = value;
|
||||||
ConnectionManager().callService("media_player", "volume_set", entityId, {"volume_level": value});
|
ConnectionManager().callService(
|
||||||
|
domain: "media_player",
|
||||||
|
service: "volume_set",
|
||||||
|
entityId: entityId,
|
||||||
|
data: {"volume_level": value}
|
||||||
|
);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
void _setVolumeMute(bool isMuted, String entityId) {
|
void _setVolumeMute(bool isMuted, String entityId) {
|
||||||
ConnectionManager().callService("media_player", "volume_mute", entityId, {"is_volume_muted": isMuted});
|
ConnectionManager().callService(
|
||||||
|
domain: "media_player",
|
||||||
|
service: "volume_mute",
|
||||||
|
entityId: entityId,
|
||||||
|
data: {"is_volume_muted": isMuted}
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
void _setVolumeUp(String entityId) {
|
void _setVolumeUp(String entityId) {
|
||||||
ConnectionManager().callService("media_player", "volume_up", entityId, null);
|
ConnectionManager().callService(
|
||||||
|
domain: "media_player",
|
||||||
|
service: "volume_up",
|
||||||
|
entityId: entityId
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
void _setVolumeDown(String entityId) {
|
void _setVolumeDown(String entityId) {
|
||||||
ConnectionManager().callService("media_player", "volume_down", entityId, null);
|
ConnectionManager().callService(
|
||||||
|
domain: "media_player",
|
||||||
|
service: "volume_down",
|
||||||
|
entityId: entityId
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
void _setSoundMode(String value, String entityId) {
|
void _setSoundMode(String value, String entityId) {
|
||||||
setState(() {
|
setState(() {
|
||||||
_newSoundMode = value;
|
_newSoundMode = value;
|
||||||
_changedHere = true;
|
_changedHere = true;
|
||||||
ConnectionManager().callService("media_player", "select_sound_mode", entityId, {"sound_mode": "$value"});
|
ConnectionManager().callService(
|
||||||
|
domain: "media_player",
|
||||||
|
service: "select_sound_mode",
|
||||||
|
entityId: entityId,
|
||||||
|
data: {"sound_mode": "$value"}
|
||||||
|
);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -292,7 +317,12 @@ class _MediaPlayerControlsState extends State<MediaPlayerControls> {
|
|||||||
setState(() {
|
setState(() {
|
||||||
_newSource = source;
|
_newSource = source;
|
||||||
_changedHere = true;
|
_changedHere = true;
|
||||||
ConnectionManager().callService("media_player", "select_source", entityId, {"source": "$source"});
|
ConnectionManager().callService(
|
||||||
|
domain: "media_player",
|
||||||
|
service: "select_source",
|
||||||
|
entityId: entityId,
|
||||||
|
data: {"source": "$source"}
|
||||||
|
);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -11,8 +11,12 @@ class SelectStateWidget extends StatefulWidget {
|
|||||||
class _SelectStateWidgetState extends State<SelectStateWidget> {
|
class _SelectStateWidgetState extends State<SelectStateWidget> {
|
||||||
|
|
||||||
void setNewState(domain, entityId, newValue) {
|
void setNewState(domain, entityId, newValue) {
|
||||||
ConnectionManager().callService(domain, "select_option", entityId,
|
ConnectionManager().callService(
|
||||||
{"option": "$newValue"});
|
domain: domain,
|
||||||
|
service: "select_option",
|
||||||
|
entityId: entityId,
|
||||||
|
data: {"option": "$newValue"}
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
@ -18,8 +18,12 @@ class _SliderControlsWidgetState extends State<SliderControlsWidget> {
|
|||||||
_newValue = newValue;
|
_newValue = newValue;
|
||||||
_changedHere = true;
|
_changedHere = true;
|
||||||
});
|
});
|
||||||
ConnectionManager().callService(domain, "set_value", entityId,
|
ConnectionManager().callService(
|
||||||
{"value": "${newValue.toString()}"});
|
domain: domain,
|
||||||
|
service: "set_value",
|
||||||
|
entityId: entityId,
|
||||||
|
data: {"value": "${newValue.toString()}"}
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
@ -39,7 +39,10 @@ class _SwitchStateWidgetState extends State<SwitchStateWidget> {
|
|||||||
domain = entity.domain;
|
domain = entity.domain;
|
||||||
}
|
}
|
||||||
ConnectionManager().callService(
|
ConnectionManager().callService(
|
||||||
domain, (newValue as bool) ? "turn_on" : "turn_off", entity.entityId, null);
|
domain: domain,
|
||||||
|
service: (newValue as bool) ? "turn_on" : "turn_off",
|
||||||
|
entityId: entity.entityId
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
@ -26,8 +26,12 @@ class _TextInputStateWidgetState extends State<TextInputStateWidget> {
|
|||||||
|
|
||||||
void setNewState(newValue, domain, entityId) {
|
void setNewState(newValue, domain, entityId) {
|
||||||
if (validate(newValue, _minLength, _maxLength)) {
|
if (validate(newValue, _minLength, _maxLength)) {
|
||||||
ConnectionManager().callService(domain, "set_value", entityId,
|
ConnectionManager().callService(
|
||||||
{"value": "$newValue"});
|
domain: domain,
|
||||||
|
service: "set_value",
|
||||||
|
entityId: entityId,
|
||||||
|
data: {"value": "$newValue"}
|
||||||
|
);
|
||||||
} else {
|
} else {
|
||||||
setState(() {
|
setState(() {
|
||||||
_tmpValue = _entityState;
|
_tmpValue = _entityState;
|
||||||
|
@ -77,10 +77,9 @@ class VacuumControls extends StatelessWidget {
|
|||||||
icon: Icon(MaterialDesignIcons.getIconDataFromIconName("mdi:play")),
|
icon: Icon(MaterialDesignIcons.getIconDataFromIconName("mdi:play")),
|
||||||
iconSize: iconSize,
|
iconSize: iconSize,
|
||||||
onPressed: () => ConnectionManager().callService(
|
onPressed: () => ConnectionManager().callService(
|
||||||
"vacuum",
|
domain: "vacuum",
|
||||||
entity.entityId,
|
entityId: entity.entityId,
|
||||||
"start",
|
service: "start"
|
||||||
null
|
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
@ -91,10 +90,9 @@ class VacuumControls extends StatelessWidget {
|
|||||||
icon: Icon(MaterialDesignIcons.getIconDataFromIconName("mdi:play-pause")),
|
icon: Icon(MaterialDesignIcons.getIconDataFromIconName("mdi:play-pause")),
|
||||||
iconSize: iconSize,
|
iconSize: iconSize,
|
||||||
onPressed: () => ConnectionManager().callService(
|
onPressed: () => ConnectionManager().callService(
|
||||||
"vacuum",
|
domain: "vacuum",
|
||||||
entity.entityId,
|
entityId: entity.entityId,
|
||||||
"start_pause",
|
service: "start_pause"
|
||||||
null
|
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
@ -104,10 +102,9 @@ class VacuumControls extends StatelessWidget {
|
|||||||
icon: Icon(MaterialDesignIcons.getIconDataFromIconName("mdi:pause")),
|
icon: Icon(MaterialDesignIcons.getIconDataFromIconName("mdi:pause")),
|
||||||
iconSize: iconSize,
|
iconSize: iconSize,
|
||||||
onPressed: () => ConnectionManager().callService(
|
onPressed: () => ConnectionManager().callService(
|
||||||
"vacuum",
|
domain: "vacuum",
|
||||||
entity.entityId,
|
entityId: entity.entityId,
|
||||||
"pause",
|
service: "pause"
|
||||||
null
|
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
@ -118,10 +115,9 @@ class VacuumControls extends StatelessWidget {
|
|||||||
icon: Icon(MaterialDesignIcons.getIconDataFromIconName("mdi:stop")),
|
icon: Icon(MaterialDesignIcons.getIconDataFromIconName("mdi:stop")),
|
||||||
iconSize: iconSize,
|
iconSize: iconSize,
|
||||||
onPressed: () => ConnectionManager().callService(
|
onPressed: () => ConnectionManager().callService(
|
||||||
"vacuum",
|
domain: "vacuum",
|
||||||
entity.entityId,
|
entityId: entity.entityId,
|
||||||
"stop",
|
service: "stop"
|
||||||
null
|
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
@ -132,10 +128,9 @@ class VacuumControls extends StatelessWidget {
|
|||||||
icon: Icon(MaterialDesignIcons.getIconDataFromIconName("mdi:broom")),
|
icon: Icon(MaterialDesignIcons.getIconDataFromIconName("mdi:broom")),
|
||||||
iconSize: iconSize,
|
iconSize: iconSize,
|
||||||
onPressed: () => ConnectionManager().callService(
|
onPressed: () => ConnectionManager().callService(
|
||||||
"vacuum",
|
domain: "vacuum",
|
||||||
entity.entityId,
|
entityId: entity.entityId,
|
||||||
"clean_spot",
|
service: "clean_spot"
|
||||||
null
|
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
@ -146,10 +141,9 @@ class VacuumControls extends StatelessWidget {
|
|||||||
icon: Icon(MaterialDesignIcons.getIconDataFromIconName("mdi:map-marker")),
|
icon: Icon(MaterialDesignIcons.getIconDataFromIconName("mdi:map-marker")),
|
||||||
iconSize: iconSize,
|
iconSize: iconSize,
|
||||||
onPressed: () => ConnectionManager().callService(
|
onPressed: () => ConnectionManager().callService(
|
||||||
"vacuum",
|
domain: "vacuum",
|
||||||
entity.entityId,
|
entityId: entity.entityId,
|
||||||
"locate",
|
service: "locate"
|
||||||
null
|
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
@ -160,10 +154,9 @@ class VacuumControls extends StatelessWidget {
|
|||||||
icon: Icon(MaterialDesignIcons.getIconDataFromIconName("mdi:home-map-marker")),
|
icon: Icon(MaterialDesignIcons.getIconDataFromIconName("mdi:home-map-marker")),
|
||||||
iconSize: iconSize,
|
iconSize: iconSize,
|
||||||
onPressed: () => ConnectionManager().callService(
|
onPressed: () => ConnectionManager().callService(
|
||||||
"vacuum",
|
domain: "vacuum",
|
||||||
entity.entityId,
|
entityId: entity.entityId,
|
||||||
"return_to_base",
|
service: "return_to_base"
|
||||||
null
|
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
@ -201,10 +194,10 @@ class VacuumControls extends StatelessWidget {
|
|||||||
options: entity.fanSpeedList,
|
options: entity.fanSpeedList,
|
||||||
value: entity.fanSpeed,
|
value: entity.fanSpeed,
|
||||||
onChange: (val) => ConnectionManager().callService(
|
onChange: (val) => ConnectionManager().callService(
|
||||||
"vacuum",
|
domain: "vacuum",
|
||||||
entity.entityId,
|
entityId: entity.entityId,
|
||||||
"set_fan_speed",
|
service: "set_fan_speed",
|
||||||
{"fan_speed": val}
|
data: {"fan_speed": val}
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
@ -106,10 +106,20 @@ class HomeAssistant {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
Future _getLovelace() async {
|
Future _getLovelace() {
|
||||||
await ConnectionManager().sendSocketMessage(type: "lovelace/config").then((data) => _rawLovelaceData = data).catchError((e) {
|
Completer completer = Completer();
|
||||||
throw HAError("Error getting lovelace config: $e");
|
ConnectionManager().sendSocketMessage(type: "lovelace/config").then((data) {
|
||||||
|
_rawLovelaceData = data;
|
||||||
|
completer.complete();
|
||||||
|
}).catchError((e) {
|
||||||
|
if ("$e" == "config_not_found") {
|
||||||
|
ConnectionManager().useLovelace = false;
|
||||||
|
completer.complete();
|
||||||
|
} else {
|
||||||
|
completer.completeError(HAError("Error getting lovelace config: $e"));
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
return completer.future;
|
||||||
}
|
}
|
||||||
|
|
||||||
Future _getUserInfo() async {
|
Future _getUserInfo() async {
|
||||||
@ -125,7 +135,6 @@ class HomeAssistant {
|
|||||||
Future _getServices() async {
|
Future _getServices() async {
|
||||||
await ConnectionManager().sendSocketMessage(type: "get_services").then((data) {
|
await ConnectionManager().sendSocketMessage(type: "get_services").then((data) {
|
||||||
Logger.d("Got ${data.length} services");
|
Logger.d("Got ${data.length} services");
|
||||||
Logger.d("Media extractor: ${data["media_extractor"]}");
|
|
||||||
services = data;
|
services = data;
|
||||||
}).catchError((e) {
|
}).catchError((e) {
|
||||||
Logger.w("Can't get services: $e");
|
Logger.w("Can't get services: $e");
|
||||||
@ -217,7 +226,7 @@ class HomeAssistant {
|
|||||||
showName: rawCardInfo['show_name'] ?? true,
|
showName: rawCardInfo['show_name'] ?? true,
|
||||||
showState: rawCardInfo['show_state'] ?? true,
|
showState: rawCardInfo['show_state'] ?? true,
|
||||||
showEmpty: rawCardInfo['show_empty'] ?? true,
|
showEmpty: rawCardInfo['show_empty'] ?? true,
|
||||||
stateFilter: rawCardInfo['state_filter'] ?? [],
|
stateFilter: (rawCard['state_filter'] ?? rawCardInfo['state_filter']) ?? [],
|
||||||
states: rawCardInfo['states'],
|
states: rawCardInfo['states'],
|
||||||
conditions: rawCard['conditions'] ?? [],
|
conditions: rawCard['conditions'] ?? [],
|
||||||
content: rawCardInfo['content'],
|
content: rawCardInfo['content'],
|
||||||
|
@ -30,6 +30,7 @@ import 'package:uni_links/uni_links.dart';
|
|||||||
import 'package:workmanager/workmanager.dart' as workManager;
|
import 'package:workmanager/workmanager.dart' as workManager;
|
||||||
import 'package:geolocator/geolocator.dart';
|
import 'package:geolocator/geolocator.dart';
|
||||||
import 'package:battery/battery.dart';
|
import 'package:battery/battery.dart';
|
||||||
|
import 'package:sentry/sentry.dart';
|
||||||
|
|
||||||
import 'utils/logger.dart';
|
import 'utils/logger.dart';
|
||||||
|
|
||||||
@ -138,18 +139,39 @@ part 'entities/media_player/widgets/media_player_progress_bar.widget.dart';
|
|||||||
part 'pages/whats_new.page.dart';
|
part 'pages/whats_new.page.dart';
|
||||||
|
|
||||||
EventBus eventBus = new EventBus();
|
EventBus eventBus = new EventBus();
|
||||||
|
final SentryClient _sentry = SentryClient(dsn: "https://03ef364745cc4c23a60ddbc874c69925@sentry.io/1836118");
|
||||||
final FirebaseMessaging _firebaseMessaging = FirebaseMessaging();
|
final FirebaseMessaging _firebaseMessaging = FirebaseMessaging();
|
||||||
FlutterLocalNotificationsPlugin flutterLocalNotificationsPlugin = new FlutterLocalNotificationsPlugin();
|
FlutterLocalNotificationsPlugin flutterLocalNotificationsPlugin = new FlutterLocalNotificationsPlugin();
|
||||||
const String appName = "HA Client";
|
const String appName = "HA Client";
|
||||||
const appVersionNumber = "0.7.2";
|
const appVersionNumber = "0.7.5";
|
||||||
const appVersionAdd = "";
|
const appVersionAdd = "";
|
||||||
const appVersion = "$appVersionNumber-$appVersionAdd";
|
const appVersion = "$appVersionNumber$appVersionAdd";
|
||||||
|
|
||||||
|
Future<void> _reportError(dynamic error, dynamic stackTrace) async {
|
||||||
|
// Print the exception to the console.
|
||||||
|
if (Logger.isInDebugMode) {
|
||||||
|
Logger.e('Caught error: $error');
|
||||||
|
Logger.p(stackTrace);
|
||||||
|
return;
|
||||||
|
} else {
|
||||||
|
Logger.e('Caught error: $error. Reporting to Senrty.');
|
||||||
|
// Send the Exception and Stacktrace to Sentry in Production mode.
|
||||||
|
_sentry.captureException(
|
||||||
|
exception: error,
|
||||||
|
stackTrace: stackTrace,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void main() async {
|
void main() async {
|
||||||
FlutterError.onError = (errorDetails) {
|
FlutterError.onError = (FlutterErrorDetails details) {
|
||||||
Logger.e( "${errorDetails.exception}");
|
Logger.e(" Caut Flutter runtime error: ${details.exception}");
|
||||||
if (Logger.isInDebugMode) {
|
if (Logger.isInDebugMode) {
|
||||||
FlutterError.dumpErrorToConsole(errorDetails);
|
FlutterError.dumpErrorToConsole(details);
|
||||||
|
} else {
|
||||||
|
// In production mode, report to the application zone to report to
|
||||||
|
// Sentry.
|
||||||
|
Zone.current.handleUncaughtError(details.exception, details.stack);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -161,11 +183,7 @@ void main() async {
|
|||||||
runApp(new HAClientApp());
|
runApp(new HAClientApp());
|
||||||
|
|
||||||
}, onError: (error, stack) {
|
}, onError: (error, stack) {
|
||||||
Logger.e("$error");
|
_reportError(error, stack);
|
||||||
Logger.e("$stack");
|
|
||||||
if (Logger.isInDebugMode) {
|
|
||||||
debugPrint("$stack");
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -189,8 +189,8 @@ class ConnectionManager {
|
|||||||
//Logger.d("[Received] <== Request id ${data['id']} was successful");
|
//Logger.d("[Received] <== Request id ${data['id']} was successful");
|
||||||
_messageResolver["${data["id"]}"]?.complete(data["result"]);
|
_messageResolver["${data["id"]}"]?.complete(data["result"]);
|
||||||
} else if (data["id"] != null) {
|
} else if (data["id"] != null) {
|
||||||
//Logger.e("[Received] <== Error received on request id ${data['id']}: ${data['error']}");
|
Logger.e("[Received] <== Error received on request id ${data['id']}: ${data['error']}");
|
||||||
_messageResolver["${data["id"]}"]?.completeError("${data['error']["message"]}");
|
_messageResolver["${data["id"]}"]?.completeError("${data["error"]["code"]}");
|
||||||
}
|
}
|
||||||
_messageResolver.remove("${data["id"]}");
|
_messageResolver.remove("${data["id"]}");
|
||||||
} else if (data["type"] == "event") {
|
} else if (data["type"] == "event") {
|
||||||
@ -348,16 +348,16 @@ class ConnectionManager {
|
|||||||
_currentMessageId += 1;
|
_currentMessageId += 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
Future callService(String domain, String service, String entityId, Map additionalServiceData) {
|
Future callService({@required String domain, @required String service, String entityId, Map data}) {
|
||||||
eventBus.fire(NotifyServiceCallEvent(domain, service, entityId));
|
eventBus.fire(NotifyServiceCallEvent(domain, service, entityId));
|
||||||
Logger.d("Service call: $domain.$service, $entityId, $additionalServiceData");
|
Logger.d("Service call: $domain.$service, $entityId, $data");
|
||||||
Completer completer = Completer();
|
Completer completer = Completer();
|
||||||
Map serviceData = {};
|
Map serviceData = {};
|
||||||
if (entityId != null) {
|
if (entityId != null) {
|
||||||
serviceData["entity_id"] = entityId;
|
serviceData["entity_id"] = entityId;
|
||||||
}
|
}
|
||||||
if (additionalServiceData != null && additionalServiceData.isNotEmpty) {
|
if (data != null && data.isNotEmpty) {
|
||||||
serviceData.addAll(additionalServiceData);
|
serviceData.addAll(data);
|
||||||
}
|
}
|
||||||
if (serviceData.isNotEmpty)
|
if (serviceData.isNotEmpty)
|
||||||
sendHTTPPost(
|
sendHTTPPost(
|
||||||
|
@ -14,7 +14,7 @@ class LocationManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
final int defaultUpdateIntervalMinutes = 20;
|
final int defaultUpdateIntervalMinutes = 20;
|
||||||
final String backgroundTaskId = "haclocationtask4352";
|
final String backgroundTaskId = "haclocationtask0";
|
||||||
final String backgroundTaskTag = "haclocation";
|
final String backgroundTaskTag = "haclocation";
|
||||||
Duration _updateInterval;
|
Duration _updateInterval;
|
||||||
bool _isRunning;
|
bool _isRunning;
|
||||||
@ -57,29 +57,50 @@ class LocationManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
_startLocationService() async {
|
_startLocationService() async {
|
||||||
Logger.d("Scheduling location update for every ${_updateInterval
|
|
||||||
.inMinutes} minutes...");
|
|
||||||
String webhookId = ConnectionManager().webhookId;
|
String webhookId = ConnectionManager().webhookId;
|
||||||
String httpWebHost = ConnectionManager().httpWebHost;
|
String httpWebHost = ConnectionManager().httpWebHost;
|
||||||
if (webhookId != null && webhookId.isNotEmpty) {
|
if (webhookId != null && webhookId.isNotEmpty) {
|
||||||
|
Duration interval;
|
||||||
|
int delayFactor;
|
||||||
|
int taskCount;
|
||||||
|
Logger.d("Starting location update for every ${_updateInterval
|
||||||
|
.inMinutes} minutes...");
|
||||||
|
if (_updateInterval.inMinutes == 10) {
|
||||||
|
interval = Duration(minutes: 20);
|
||||||
|
taskCount = 2;
|
||||||
|
delayFactor = 10;
|
||||||
|
} else if (_updateInterval.inMinutes == 5) {
|
||||||
|
interval = Duration(minutes: 15);
|
||||||
|
taskCount = 3;
|
||||||
|
delayFactor = 5;
|
||||||
|
} else {
|
||||||
|
interval = _updateInterval;
|
||||||
|
taskCount = 1;
|
||||||
|
delayFactor = 0;
|
||||||
|
}
|
||||||
|
for (int i = 1; i <= taskCount; i++) {
|
||||||
|
int delay = i*delayFactor;
|
||||||
|
Logger.d("Scheduling location update task #$i for every ${interval.inMinutes} minutes in $delay minutes...");
|
||||||
await workManager.Workmanager.registerPeriodicTask(
|
await workManager.Workmanager.registerPeriodicTask(
|
||||||
backgroundTaskId,
|
"$backgroundTaskId$n",
|
||||||
"haClientLocationTracking",
|
"haClientLocationTracking-0$n",
|
||||||
tag: backgroundTaskTag,
|
tag: backgroundTaskTag,
|
||||||
inputData: {
|
inputData: {
|
||||||
"webhookId": webhookId,
|
"webhookId": webhookId,
|
||||||
"httpWebHost": httpWebHost
|
"httpWebHost": httpWebHost
|
||||||
},
|
},
|
||||||
frequency: _updateInterval,
|
frequency: interval,
|
||||||
|
initialDelay: Duration(minutes: delay),
|
||||||
existingWorkPolicy: workManager.ExistingWorkPolicy.keep,
|
existingWorkPolicy: workManager.ExistingWorkPolicy.keep,
|
||||||
backoffPolicy: workManager.BackoffPolicy.linear,
|
backoffPolicy: workManager.BackoffPolicy.linear,
|
||||||
backoffPolicyDelay: _updateInterval,
|
backoffPolicyDelay: interval,
|
||||||
constraints: workManager.Constraints(
|
constraints: workManager.Constraints(
|
||||||
networkType: workManager.NetworkType.connected
|
networkType: workManager.NetworkType.connected
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
_stopLocationService() async {
|
_stopLocationService() async {
|
||||||
Logger.d("Canceling previous schedule if any...");
|
Logger.d("Canceling previous schedule if any...");
|
||||||
@ -87,57 +108,40 @@ class LocationManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
updateDeviceLocation() async {
|
updateDeviceLocation() async {
|
||||||
Logger.d("[Test location] Started");
|
Logger.d("[Foreground location] Started");
|
||||||
Logger.d("[Test location] Forcing Android location manager...");
|
Geolocator geolocator = Geolocator();
|
||||||
Geolocator geolocator = Geolocator()..forceAndroidLocationManager = true;
|
|
||||||
var battery = Battery();
|
var battery = Battery();
|
||||||
int batteryLevel = 100;
|
|
||||||
String webhookId = ConnectionManager().webhookId;
|
String webhookId = ConnectionManager().webhookId;
|
||||||
String httpWebHost = ConnectionManager().httpWebHost;
|
String httpWebHost = ConnectionManager().httpWebHost;
|
||||||
if (webhookId != null && webhookId.isNotEmpty) {
|
if (webhookId != null && webhookId.isNotEmpty) {
|
||||||
|
Logger.d("[Foreground location] Getting battery level...");
|
||||||
|
int batteryLevel = await battery.batteryLevel;
|
||||||
|
Logger.d("[Foreground location] Getting device location...");
|
||||||
|
Position position = await geolocator.getCurrentPosition(
|
||||||
|
desiredAccuracy: LocationAccuracy.high,
|
||||||
|
locationPermissionLevel: GeolocationPermission.locationAlways
|
||||||
|
);
|
||||||
|
if (position != null) {
|
||||||
|
Logger.d("[Foreground location] Location: ${position.latitude} ${position.longitude}. Accuracy: ${position.accuracy}. (${position.timestamp})");
|
||||||
String url = "$httpWebHost/api/webhook/$webhookId";
|
String url = "$httpWebHost/api/webhook/$webhookId";
|
||||||
Map<String, String> headers = {};
|
|
||||||
headers["Content-Type"] = "application/json";
|
|
||||||
Map data = {
|
Map data = {
|
||||||
"type": "update_location",
|
"type": "update_location",
|
||||||
"data": {
|
"data": {
|
||||||
"gps": [],
|
"gps": [position.latitude, position.longitude],
|
||||||
"gps_accuracy": 0,
|
"gps_accuracy": position.accuracy,
|
||||||
"battery": batteryLevel
|
"battery": batteryLevel ?? 100
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
Logger.d("[Test location] Getting battery level...");
|
Logger.d("[Foreground location] Sending data home...");
|
||||||
battery.batteryLevel.then((val) => data["data"]["battery"] = val).whenComplete((){
|
var response = await http.post(
|
||||||
Logger.d("[Test location] Getting device location...");
|
|
||||||
geolocator.getCurrentPosition(desiredAccuracy: LocationAccuracy.high, locationPermissionLevel: GeolocationPermission.locationAlways).then((location) {
|
|
||||||
Logger.d("[Test location] Got location: ${location.latitude} ${location.longitude} with accuracy of ${location.accuracy}");
|
|
||||||
if (location != null) {
|
|
||||||
data["data"]["gps"] = [location.latitude, location.longitude];
|
|
||||||
data["data"]["gps_accuracy"] = location.accuracy;
|
|
||||||
Logger.d("[Test location] Sending data home...");
|
|
||||||
http.post(
|
|
||||||
url,
|
url,
|
||||||
headers: headers,
|
headers: {"Content-Type": "application/json"},
|
||||||
body: json.encode(data)
|
body: json.encode(data)
|
||||||
);
|
);
|
||||||
|
Logger.d("[Foreground location] Got HTTP ${response.statusCode}");
|
||||||
|
} else {
|
||||||
|
Logger.d("[Foreground location] No location. Aborting.");
|
||||||
}
|
}
|
||||||
}).catchError((e) {
|
|
||||||
Logger.d("[Test location] Error getting current location: ${e.toString()}. Trying last known...");
|
|
||||||
geolocator.getLastKnownPosition(desiredAccuracy: LocationAccuracy.medium).then((location){
|
|
||||||
Logger.d("[Test location] Got last known location: ${location.latitude} ${location.longitude} with accuracy of ${location.accuracy}");
|
|
||||||
if (location != null) {
|
|
||||||
data["data"]["gps"] = [location.latitude, location.longitude];
|
|
||||||
data["data"]["gps_accuracy"] = location.accuracy;
|
|
||||||
Logger.d("[Test location] Sending data home...");
|
|
||||||
http.post(
|
|
||||||
url,
|
|
||||||
headers: headers,
|
|
||||||
body: json.encode(data)
|
|
||||||
);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -145,14 +149,15 @@ class LocationManager {
|
|||||||
|
|
||||||
void updateDeviceLocationIsolate() {
|
void updateDeviceLocationIsolate() {
|
||||||
workManager.Workmanager.executeTask((backgroundTask, data) {
|
workManager.Workmanager.executeTask((backgroundTask, data) {
|
||||||
//print("[Background $backgroundTask] Started");
|
print("[Background $backgroundTask] Started");
|
||||||
Geolocator geolocator = Geolocator()..forceAndroidLocationManager = true;
|
final SentryClient sentryBackgroundClient = SentryClient(dsn: "https://5c868e5ef26947e2b61b189e391ec31b@sentry.io/1836366");
|
||||||
|
Geolocator geolocator = Geolocator();
|
||||||
var battery = Battery();
|
var battery = Battery();
|
||||||
int batteryLevel = 100;
|
int batteryLevel = 100;
|
||||||
String webhookId = data["webhookId"];
|
String webhookId = data["webhookId"];
|
||||||
String httpWebHost = data["httpWebHost"];
|
String httpWebHost = data["httpWebHost"];
|
||||||
if (webhookId != null && webhookId.isNotEmpty) {
|
if (webhookId != null && webhookId.isNotEmpty) {
|
||||||
//print("[Background $backgroundTask] hour=$battery");
|
print("[Background $backgroundTask] hour=$battery");
|
||||||
String url = "$httpWebHost/api/webhook/$webhookId";
|
String url = "$httpWebHost/api/webhook/$webhookId";
|
||||||
Map<String, String> headers = {};
|
Map<String, String> headers = {};
|
||||||
headers["Content-Type"] = "application/json";
|
headers["Content-Type"] = "application/json";
|
||||||
@ -164,36 +169,28 @@ void updateDeviceLocationIsolate() {
|
|||||||
"battery": batteryLevel
|
"battery": batteryLevel
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
//print("[Background $backgroundTask] Getting battery level...");
|
print("[Background $backgroundTask] Getting battery level...");
|
||||||
battery.batteryLevel.then((val) => data["data"]["battery"] = val).whenComplete((){
|
battery.batteryLevel.then((val) => data["data"]["battery"] = val).whenComplete((){
|
||||||
//print("[Background $backgroundTask] Getting device location...");
|
print("[Background $backgroundTask] Getting device location...");
|
||||||
geolocator.getCurrentPosition(desiredAccuracy: LocationAccuracy.high, locationPermissionLevel: GeolocationPermission.locationAlways).then((location) {
|
geolocator.getCurrentPosition(desiredAccuracy: LocationAccuracy.high, locationPermissionLevel: GeolocationPermission.locationAlways).then((location) {
|
||||||
//print("[Background $backgroundTask] Got location: ${location.latitude} ${location.longitude}");
|
|
||||||
if (location != null) {
|
if (location != null) {
|
||||||
|
print("[Background $backgroundTask] Got location: ${location.latitude} ${location.longitude}");
|
||||||
data["data"]["gps"] = [location.latitude, location.longitude];
|
data["data"]["gps"] = [location.latitude, location.longitude];
|
||||||
data["data"]["gps_accuracy"] = location.accuracy;
|
data["data"]["gps_accuracy"] = location.accuracy;
|
||||||
//print("[Background $backgroundTask] Sending data home...");
|
print("[Background $backgroundTask] Sending data home.");
|
||||||
http.post(
|
http.post(
|
||||||
url,
|
url,
|
||||||
headers: headers,
|
headers: headers,
|
||||||
body: json.encode(data)
|
body: json.encode(data)
|
||||||
);
|
);
|
||||||
|
} else {
|
||||||
|
throw "Can't get device location. Location is null";
|
||||||
}
|
}
|
||||||
}).catchError((e) {
|
}).catchError((e) {
|
||||||
//print("[Background $backgroundTask] Error getting current location: ${e.toString()}. Trying last known...");
|
sentryBackgroundClient.captureException(
|
||||||
geolocator.getLastKnownPosition(desiredAccuracy: LocationAccuracy.medium).then((location){
|
exception: "${e.toString()}"
|
||||||
//print("[Background $backgroundTask] Got last known location: ${location.latitude} ${location.longitude}");
|
|
||||||
if (location != null) {
|
|
||||||
data["data"]["gps"] = [location.latitude, location.longitude];
|
|
||||||
data["data"]["gps_accuracy"] = location.accuracy;
|
|
||||||
//print("[Background $backgroundTask] Sending data home...");
|
|
||||||
http.post(
|
|
||||||
url,
|
|
||||||
headers: headers,
|
|
||||||
body: json.encode(data)
|
|
||||||
);
|
);
|
||||||
}
|
print("[Background $backgroundTask] Error getting current location: ${e.toString()}");
|
||||||
});
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -45,7 +45,7 @@ class MobileAppIntegrationManager {
|
|||||||
positiveText: "Restart now",
|
positiveText: "Restart now",
|
||||||
negativeText: "Later",
|
negativeText: "Later",
|
||||||
onPositive: () {
|
onPositive: () {
|
||||||
ConnectionManager().callService("homeassistant","restart", null, null);
|
ConnectionManager().callService(domain: "homeassistant", service: "restart");
|
||||||
},
|
},
|
||||||
));
|
));
|
||||||
});
|
});
|
||||||
|
@ -29,6 +29,9 @@ class _IntegrationSettingsPageState extends State<IntegrationSettingsPage> {
|
|||||||
setState(() {
|
setState(() {
|
||||||
_locationTrackingEnabled = prefs.getBool("location-enabled") ?? false;
|
_locationTrackingEnabled = prefs.getBool("location-enabled") ?? false;
|
||||||
_locationInterval = prefs.getInt("location-interval") ?? LocationManager().defaultUpdateIntervalMinutes;
|
_locationInterval = prefs.getInt("location-interval") ?? LocationManager().defaultUpdateIntervalMinutes;
|
||||||
|
if (_locationInterval % 5 != 0) {
|
||||||
|
_locationInterval = 5 * (_locationInterval ~/ 5);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -36,15 +39,15 @@ class _IntegrationSettingsPageState extends State<IntegrationSettingsPage> {
|
|||||||
void incLocationInterval() {
|
void incLocationInterval() {
|
||||||
if (_locationInterval < 720) {
|
if (_locationInterval < 720) {
|
||||||
setState(() {
|
setState(() {
|
||||||
_locationInterval = _locationInterval + 1;
|
_locationInterval = _locationInterval + 5;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void decLocationInterval() {
|
void decLocationInterval() {
|
||||||
if (_locationInterval > 15) {
|
if (_locationInterval > 5) {
|
||||||
setState(() {
|
setState(() {
|
||||||
_locationInterval = _locationInterval - 1;
|
_locationInterval = _locationInterval - 5;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -56,7 +59,7 @@ class _IntegrationSettingsPageState extends State<IntegrationSettingsPage> {
|
|||||||
positiveText: "Sure. Make it so",
|
positiveText: "Sure. Make it so",
|
||||||
negativeText: "What?? No!",
|
negativeText: "What?? No!",
|
||||||
onPositive: () {
|
onPositive: () {
|
||||||
ConnectionManager().callService("homeassistant", "restart", null, null);
|
ConnectionManager().callService(domain: "homeassistant", service: "restart");
|
||||||
},
|
},
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
@ -68,7 +71,7 @@ class _IntegrationSettingsPageState extends State<IntegrationSettingsPage> {
|
|||||||
positiveText: "Sure. Make it so",
|
positiveText: "Sure. Make it so",
|
||||||
negativeText: "What?? No!",
|
negativeText: "What?? No!",
|
||||||
onPositive: () {
|
onPositive: () {
|
||||||
ConnectionManager().callService("homeassistant","stop", null, null);
|
ConnectionManager().callService(domain: "homeassistant", service: "stop");
|
||||||
},
|
},
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
@ -122,7 +122,6 @@ class _MainPageState extends ReceiveShareState<MainPage> with WidgetsBindingObse
|
|||||||
_showInfoBottomBar(progress: true,);
|
_showInfoBottomBar(progress: true,);
|
||||||
ConnectionManager().init(loadSettings: false, forceReconnect: false).then((_){
|
ConnectionManager().init(loadSettings: false, forceReconnect: false).then((_){
|
||||||
_fetchData();
|
_fetchData();
|
||||||
//StartupUserMessagesManager().checkMessagesToShow();
|
|
||||||
}, onError: (e) {
|
}, onError: (e) {
|
||||||
_setErrorState(e);
|
_setErrorState(e);
|
||||||
});
|
});
|
||||||
|
@ -89,10 +89,10 @@ class _PlayMediaPageState extends State<PlayMediaPage> {
|
|||||||
}
|
}
|
||||||
Navigator.pop(context);
|
Navigator.pop(context);
|
||||||
ConnectionManager().callService(
|
ConnectionManager().callService(
|
||||||
serviceDomain,
|
domain: serviceDomain,
|
||||||
"play_media",
|
service: "play_media",
|
||||||
entity.entityId,
|
entityId: entity.entityId,
|
||||||
{
|
data: {
|
||||||
"media_content_id": _mediaUrl,
|
"media_content_id": _mediaUrl,
|
||||||
"media_content_type": _contentType
|
"media_content_type": _contentType
|
||||||
}
|
}
|
||||||
@ -100,10 +100,9 @@ class _PlayMediaPageState extends State<PlayMediaPage> {
|
|||||||
HomeAssistant().sendToPlayerId = entity.entityId;
|
HomeAssistant().sendToPlayerId = entity.entityId;
|
||||||
if (HomeAssistant().sendFromPlayerId != null && HomeAssistant().sendFromPlayerId != HomeAssistant().sendToPlayerId) {
|
if (HomeAssistant().sendFromPlayerId != null && HomeAssistant().sendFromPlayerId != HomeAssistant().sendToPlayerId) {
|
||||||
ConnectionManager().callService(
|
ConnectionManager().callService(
|
||||||
HomeAssistant().sendFromPlayerId.split(".")[0],
|
domain: HomeAssistant().sendFromPlayerId.split(".")[0],
|
||||||
"turn_off",
|
service: "turn_off",
|
||||||
HomeAssistant().sendFromPlayerId,
|
entityId: HomeAssistant().sendFromPlayerId
|
||||||
null
|
|
||||||
);
|
);
|
||||||
HomeAssistant().sendFromPlayerId = null;
|
HomeAssistant().sendFromPlayerId = null;
|
||||||
}
|
}
|
||||||
|
@ -23,6 +23,10 @@ class Logger {
|
|||||||
return inDebugMode;
|
return inDebugMode;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void p(data) {
|
||||||
|
print(data);
|
||||||
|
}
|
||||||
|
|
||||||
static void e(String message) {
|
static void e(String message) {
|
||||||
_writeToLog("Error", message);
|
_writeToLog("Error", message);
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
name: hass_client
|
name: hass_client
|
||||||
description: Home Assistant Android Client
|
description: Home Assistant Android Client
|
||||||
|
|
||||||
version: 0.7.2+720
|
version: 0.7.5+750
|
||||||
|
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
@ -18,7 +18,7 @@ dependencies:
|
|||||||
url_launcher: any
|
url_launcher: any
|
||||||
date_format: any
|
date_format: any
|
||||||
charts_flutter: ^0.8.1
|
charts_flutter: ^0.8.1
|
||||||
flutter_markdown: any
|
flutter_markdown: 0.3.0
|
||||||
in_app_purchase: ^0.2.1+4
|
in_app_purchase: ^0.2.1+4
|
||||||
flutter_custom_tabs: ^0.6.0
|
flutter_custom_tabs: ^0.6.0
|
||||||
firebase_messaging: ^5.1.6
|
firebase_messaging: ^5.1.6
|
||||||
@ -26,9 +26,10 @@ dependencies:
|
|||||||
flutter_secure_storage: ^3.3.1+1
|
flutter_secure_storage: ^3.3.1+1
|
||||||
device_info: ^0.4.0+3
|
device_info: ^0.4.0+3
|
||||||
flutter_local_notifications: ^0.8.4
|
flutter_local_notifications: ^0.8.4
|
||||||
geolocator: ^5.1.4+2
|
geolocator: ^5.1.5
|
||||||
workmanager: ^0.1.3
|
workmanager: ^0.1.3
|
||||||
battery: ^0.3.1+1
|
battery: ^0.3.1+1
|
||||||
|
sentry: ^2.3.1
|
||||||
share:
|
share:
|
||||||
git:
|
git:
|
||||||
url: https://github.com/d-silveira/flutter-share.git
|
url: https://github.com/d-silveira/flutter-share.git
|
||||||
|
Reference in New Issue
Block a user