diff --git a/.circleci/config.yml b/.circleci/config.yml
index 4d24732a..043ac03d 100644
--- a/.circleci/config.yml
+++ b/.circleci/config.yml
@@ -27,7 +27,7 @@ anchors:
executors:
default-executor:
docker:
- - image: cirrusci/flutter:2.0.6
+ - image: cirrusci/flutter
shell: "/bin/bash -eo pipefail"
commands:
diff --git a/doc/api/assets_traits_device_item_icon/DeviceItemIcon-class.md b/doc/api/assets_traits_device_item_icon/DeviceItemIcon-class.md
index 6b696ec7..ccc073f3 100644
--- a/doc/api/assets_traits_device_item_icon/DeviceItemIcon-class.md
+++ b/doc/api/assets_traits_device_item_icon/DeviceItemIcon-class.md
@@ -8,6 +8,7 @@
+ *[](https://dart.dev/null-safety)*
@@ -87,7 +88,7 @@ _inherited_
-##### [buildThermostatIcon](../assets_traits_device_item_icon/DeviceItemIcon/buildThermostatIcon.md)([double](https://api.flutter.dev/flutter/dart-core/double-class.html) thermostatState) [Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html)
+##### [buildThermostatIcon](../assets_traits_device_item_icon/DeviceItemIcon/buildThermostatIcon.md)([double](https://api.flutter.dev/flutter/dart-core/double-class.html)? thermostatState) [Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html)
@@ -105,7 +106,7 @@ _inherited_
-##### [getIcon](../assets_traits_device_item_icon/DeviceItemIcon/getIcon.md)([List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[Trait](https://pub.dev/documentation/yonomi_platform_sdk/1.0.5/repository_devices_devices_repository/Trait-class.html)> traits) [Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html)
+##### [getIcon](../assets_traits_device_item_icon/DeviceItemIcon/getIcon.md)([List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[Trait](https://yonomi.co/yonomi-sdk/Trait-class.html)> traits) [Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html)
diff --git a/doc/api/assets_traits_device_item_icon/DeviceItemIcon/DeviceItemIcon.md b/doc/api/assets_traits_device_item_icon/DeviceItemIcon/DeviceItemIcon.md
index d80f9c0f..eeaf4989 100644
--- a/doc/api/assets_traits_device_item_icon/DeviceItemIcon/DeviceItemIcon.md
+++ b/doc/api/assets_traits_device_item_icon/DeviceItemIcon/DeviceItemIcon.md
@@ -6,6 +6,7 @@
+ *[](https://dart.dev/null-safety)*
diff --git a/doc/api/assets_traits_device_item_icon/DeviceItemIcon/buildLockIcon.md b/doc/api/assets_traits_device_item_icon/DeviceItemIcon/buildLockIcon.md
index 5c526f7f..796260ab 100644
--- a/doc/api/assets_traits_device_item_icon/DeviceItemIcon/buildLockIcon.md
+++ b/doc/api/assets_traits_device_item_icon/DeviceItemIcon/buildLockIcon.md
@@ -6,6 +6,7 @@
+ *[](https://dart.dev/null-safety)*
diff --git a/doc/api/assets_traits_device_item_icon/DeviceItemIcon/buildThermostatIcon.md b/doc/api/assets_traits_device_item_icon/DeviceItemIcon/buildThermostatIcon.md
index b242128d..9383fbe8 100644
--- a/doc/api/assets_traits_device_item_icon/DeviceItemIcon/buildThermostatIcon.md
+++ b/doc/api/assets_traits_device_item_icon/DeviceItemIcon/buildThermostatIcon.md
@@ -6,12 +6,13 @@
+ *[](https://dart.dev/null-safety)*
[Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) buildThermostatIcon
-([double](https://api.flutter.dev/flutter/dart-core/double-class.html) thermostatState)
+([double](https://api.flutter.dev/flutter/dart-core/double-class.html)? thermostatState)
@@ -23,7 +24,7 @@
## Implementation
```dart
-static Widget buildThermostatIcon(double thermostatState) {
+static Widget buildThermostatIcon(double? thermostatState) {
return Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(100),
diff --git a/doc/api/assets_traits_device_item_icon/DeviceItemIcon/buildUnlockIcon.md b/doc/api/assets_traits_device_item_icon/DeviceItemIcon/buildUnlockIcon.md
index 68c24923..a641bf96 100644
--- a/doc/api/assets_traits_device_item_icon/DeviceItemIcon/buildUnlockIcon.md
+++ b/doc/api/assets_traits_device_item_icon/DeviceItemIcon/buildUnlockIcon.md
@@ -6,6 +6,7 @@
+ *[](https://dart.dev/null-safety)*
diff --git a/doc/api/assets_traits_device_item_icon/DeviceItemIcon/getIcon.md b/doc/api/assets_traits_device_item_icon/DeviceItemIcon/getIcon.md
index 233cafaf..8b70b4b2 100644
--- a/doc/api/assets_traits_device_item_icon/DeviceItemIcon/getIcon.md
+++ b/doc/api/assets_traits_device_item_icon/DeviceItemIcon/getIcon.md
@@ -6,12 +6,13 @@
+ *[](https://dart.dev/null-safety)*
[Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) getIcon
-([List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[Trait](https://pub.dev/documentation/yonomi_platform_sdk/1.0.5/repository_devices_devices_repository/Trait-class.html)> traits)
+([List](https://api.flutter.dev/flutter/dart-core/List-class.html)<[Trait](https://yonomi.co/yonomi-sdk/Trait-class.html)> traits)
@@ -25,7 +26,7 @@
```dart
static Widget getIcon(List traits) {
Trait determiningTrait = traits[0];
- if (determiningTrait is LockUnlockTrait) {
+ if (determiningTrait is LockTrait) {
return (determiningTrait.state.value)
? buildLockIcon()
: buildUnlockIcon();
diff --git a/doc/api/assets_traits_device_item_icon/assets_traits_device_item_icon-library.md b/doc/api/assets_traits_device_item_icon/assets_traits_device_item_icon-library.md
index 13a2f51d..9aa732ea 100644
--- a/doc/api/assets_traits_device_item_icon/assets_traits_device_item_icon-library.md
+++ b/doc/api/assets_traits_device_item_icon/assets_traits_device_item_icon-library.md
@@ -8,6 +8,7 @@
+ *[](https://dart.dev/null-safety)*
diff --git a/doc/api/components_arc/Arc-class.md b/doc/api/components_arc/Arc-class.md
index 2ce08387..ef449c0c 100644
--- a/doc/api/components_arc/Arc-class.md
+++ b/doc/api/components_arc/Arc-class.md
@@ -8,6 +8,7 @@
+ *[](https://dart.dev/null-safety)*
@@ -28,7 +29,7 @@
## Constructors
-[Arc](../components_arc/Arc/Arc.md) ({[Key](https://api.flutter.dev/flutter/foundation/Key-class.html) key, [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) showThumb = true, @[required](https://pub.dev/documentation/meta/1.3.0/meta/required-constant.html) [Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) centerWidget, @[required](https://pub.dev/documentation/meta/1.3.0/meta/required-constant.html) [double](https://api.flutter.dev/flutter/dart-core/double-class.html) initialValue, @[required](https://pub.dev/documentation/meta/1.3.0/meta/required-constant.html) [double](https://api.flutter.dev/flutter/dart-core/double-class.html) maxValue, @[required](https://pub.dev/documentation/meta/1.3.0/meta/required-constant.html) [ValueChanged](https://api.flutter.dev/flutter/foundation/ValueChanged.html)<[double](https://api.flutter.dev/flutter/dart-core/double-class.html)> onFinalSetPoint, [Color](https://api.flutter.dev/flutter/dart-ui/Color-class.html) color})
+[Arc](../components_arc/Arc/Arc.md) ({[Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? key, [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) showThumb = true, required [Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) centerWidget, required [double](https://api.flutter.dev/flutter/dart-core/double-class.html) initialValue, required [double](https://api.flutter.dev/flutter/dart-core/double-class.html) maxValue, required [ValueChanged](https://api.flutter.dev/flutter/foundation/ValueChanged.html)<[double](https://api.flutter.dev/flutter/dart-core/double-class.html)> onFinalSetPoint, [Color](https://api.flutter.dev/flutter/dart-ui/Color-class.html)? color})
@@ -44,7 +45,7 @@ _final_
-##### [color](../components_arc/Arc/color.md) → [Color](https://api.flutter.dev/flutter/dart-ui/Color-class.html)
+##### [color](../components_arc/Arc/color.md) → [Color](https://api.flutter.dev/flutter/dart-ui/Color-class.html)?
@@ -58,7 +59,7 @@ _final_
The hash code for this object. [...](https://api.flutter.dev/flutter/widgets/Widget/hashCode.html)
-_@[nonVirtual](https://pub.dev/documentation/meta/1.3.0/meta/nonVirtual-constant.html), read-only, inherited_
+_@[nonVirtual](https://pub.dev/documentation/meta/1.7.0/meta/nonVirtual-constant.html), read-only, inherited_
@@ -71,7 +72,7 @@ _final_
-##### [key](https://api.flutter.dev/flutter/widgets/Widget/key.html) → [Key](https://api.flutter.dev/flutter/foundation/Key-class.html)
+##### [key](https://api.flutter.dev/flutter/widgets/Widget/key.html) → [Key](https://api.flutter.dev/flutter/foundation/Key-class.html)?
@@ -143,7 +144,7 @@ _override_
Returns a list of DiagnosticsNode
objects describing this node's
children. [...](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/debugDescribeChildren.html)
-_@[protected](https://pub.dev/documentation/meta/1.3.0/meta/protected-constant.html), inherited_
+_@[protected](https://pub.dev/documentation/meta/1.7.0/meta/protected-constant.html), inherited_
@@ -165,7 +166,7 @@ _inherited_
-##### [toDiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toDiagnosticsNode.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) name, [DiagnosticsTreeStyle](https://api.flutter.dev/flutter/foundation/DiagnosticsTreeStyle-class.html) style}) [DiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticsNode-class.html)
+##### [toDiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toDiagnosticsNode.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html)? name, [DiagnosticsTreeStyle](https://api.flutter.dev/flutter/foundation/DiagnosticsTreeStyle.html)? style}) [DiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticsNode-class.html)
@@ -175,7 +176,7 @@ _inherited_
-##### [toString](https://api.flutter.dev/flutter/foundation/Diagnosticable/toString.html)({[DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel-class.html) minLevel = DiagnosticLevel.info}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html)
+##### [toString](https://api.flutter.dev/flutter/foundation/Diagnosticable/toString.html)({[DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.info}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html)
@@ -184,7 +185,7 @@ _inherited_
-##### [toStringDeep](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toStringDeep.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) prefixLineOne = '', [String](https://api.flutter.dev/flutter/dart-core/String-class.html) prefixOtherLines, [DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel-class.html) minLevel = DiagnosticLevel.debug}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html)
+##### [toStringDeep](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toStringDeep.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) prefixLineOne = '', [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? prefixOtherLines, [DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.debug}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html)
@@ -193,7 +194,7 @@ _inherited_
-##### [toStringShallow](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toStringShallow.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) joiner = ', ', [DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel-class.html) minLevel = DiagnosticLevel.debug}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html)
+##### [toStringShallow](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toStringShallow.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) joiner = ', ', [DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.debug}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html)
@@ -219,7 +220,7 @@ _inherited_
The equality operator. [...](https://api.flutter.dev/flutter/widgets/Widget/operator_equals.html)
-_@[nonVirtual](https://pub.dev/documentation/meta/1.3.0/meta/nonVirtual-constant.html), inherited_
+_@[nonVirtual](https://pub.dev/documentation/meta/1.7.0/meta/nonVirtual-constant.html), inherited_
diff --git a/doc/api/components_arc/Arc/Arc.md b/doc/api/components_arc/Arc/Arc.md
index b60fb788..0834708e 100644
--- a/doc/api/components_arc/Arc/Arc.md
+++ b/doc/api/components_arc/Arc/Arc.md
@@ -6,10 +6,11 @@
+ *[](https://dart.dev/null-safety)*
-Arc({[Key](https://api.flutter.dev/flutter/foundation/Key-class.html) key, [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) showThumb = true, @[required](https://pub.dev/documentation/meta/1.3.0/meta/required-constant.html) [Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) centerWidget, @[required](https://pub.dev/documentation/meta/1.3.0/meta/required-constant.html) [double](https://api.flutter.dev/flutter/dart-core/double-class.html) initialValue, @[required](https://pub.dev/documentation/meta/1.3.0/meta/required-constant.html) [double](https://api.flutter.dev/flutter/dart-core/double-class.html) maxValue, @[required](https://pub.dev/documentation/meta/1.3.0/meta/required-constant.html) [ValueChanged](https://api.flutter.dev/flutter/foundation/ValueChanged.html)<[double](https://api.flutter.dev/flutter/dart-core/double-class.html)> onFinalSetPoint, [Color](https://api.flutter.dev/flutter/dart-ui/Color-class.html) color})
+Arc({[Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? key, [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) showThumb = true, required [Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) centerWidget, required [double](https://api.flutter.dev/flutter/dart-core/double-class.html) initialValue, required [double](https://api.flutter.dev/flutter/dart-core/double-class.html) maxValue, required [ValueChanged](https://api.flutter.dev/flutter/foundation/ValueChanged.html)<[double](https://api.flutter.dev/flutter/dart-core/double-class.html)> onFinalSetPoint, [Color](https://api.flutter.dev/flutter/dart-ui/Color-class.html)? color})
@@ -19,12 +20,12 @@ Arc({[Key](https://api.flutter.dev/flutter/foundation/Key-class.html) key, [bool
```dart
Arc({
- Key key,
+ Key? key,
this.showThumb = true,
- @required this.centerWidget,
- @required this.initialValue,
- @required this.maxValue,
- @required this.onFinalSetPoint,
+ required this.centerWidget,
+ required this.initialValue,
+ required this.maxValue,
+ required this.onFinalSetPoint,
this.color,
}) : super(key: key);
```
diff --git a/doc/api/components_arc/Arc/centerWidget.md b/doc/api/components_arc/Arc/centerWidget.md
index 95a2f747..c48c0b1f 100644
--- a/doc/api/components_arc/Arc/centerWidget.md
+++ b/doc/api/components_arc/Arc/centerWidget.md
@@ -6,6 +6,7 @@
+ *[](https://dart.dev/null-safety)*
[Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) centerWidget
diff --git a/doc/api/components_arc/Arc/color.md b/doc/api/components_arc/Arc/color.md
index d8ab943c..4f94d387 100644
--- a/doc/api/components_arc/Arc/color.md
+++ b/doc/api/components_arc/Arc/color.md
@@ -6,9 +6,10 @@
+ *[](https://dart.dev/null-safety)*
-[Color](https://api.flutter.dev/flutter/dart-ui/Color-class.html) color
+[Color](https://api.flutter.dev/flutter/dart-ui/Color-class.html)? color
_final_
@@ -20,7 +21,7 @@ _final_
## Implementation
```dart
-final Color color;
+final Color? color;
```
diff --git a/doc/api/components_arc/Arc/createState.md b/doc/api/components_arc/Arc/createState.md
index 51d247e2..2d06b910 100644
--- a/doc/api/components_arc/Arc/createState.md
+++ b/doc/api/components_arc/Arc/createState.md
@@ -6,6 +6,7 @@
+ *[](https://dart.dev/null-safety)*
@@ -22,7 +23,7 @@ _override_
Subclasses should override this method to return a newly created
instance of their associated State subclass:
@override
-_MyState createState() => _MyState();
+State<MyWidget> createState() => _MyWidgetState();
The framework can call this method multiple times over the lifetime of
a StatefulWidget
. For example, if the widget is inserted into the tree
diff --git a/doc/api/components_arc/Arc/initialValue.md b/doc/api/components_arc/Arc/initialValue.md
index f15f327f..e10c18f0 100644
--- a/doc/api/components_arc/Arc/initialValue.md
+++ b/doc/api/components_arc/Arc/initialValue.md
@@ -6,6 +6,7 @@
+ *[](https://dart.dev/null-safety)*
[double](https://api.flutter.dev/flutter/dart-core/double-class.html) initialValue
diff --git a/doc/api/components_arc/Arc/maxValue.md b/doc/api/components_arc/Arc/maxValue.md
index b9e7cd76..dff64842 100644
--- a/doc/api/components_arc/Arc/maxValue.md
+++ b/doc/api/components_arc/Arc/maxValue.md
@@ -6,6 +6,7 @@
+ *[](https://dart.dev/null-safety)*
[double](https://api.flutter.dev/flutter/dart-core/double-class.html) maxValue
diff --git a/doc/api/components_arc/Arc/onFinalSetPoint.md b/doc/api/components_arc/Arc/onFinalSetPoint.md
index 4e29bf03..8223c7ce 100644
--- a/doc/api/components_arc/Arc/onFinalSetPoint.md
+++ b/doc/api/components_arc/Arc/onFinalSetPoint.md
@@ -6,6 +6,7 @@
+ *[](https://dart.dev/null-safety)*
[ValueChanged](https://api.flutter.dev/flutter/foundation/ValueChanged.html)<[double](https://api.flutter.dev/flutter/dart-core/double-class.html)> onFinalSetPoint
diff --git a/doc/api/components_arc/Arc/showThumb.md b/doc/api/components_arc/Arc/showThumb.md
index 30419e16..d13ba30b 100644
--- a/doc/api/components_arc/Arc/showThumb.md
+++ b/doc/api/components_arc/Arc/showThumb.md
@@ -6,6 +6,7 @@
+ *[](https://dart.dev/null-safety)*
[bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) showThumb
diff --git a/doc/api/components_arc/ArcPainter-class.md b/doc/api/components_arc/ArcPainter-class.md
index d23a13af..fa429dfe 100644
--- a/doc/api/components_arc/ArcPainter-class.md
+++ b/doc/api/components_arc/ArcPainter-class.md
@@ -8,6 +8,7 @@
+ *[](https://dart.dev/null-safety)*
@@ -27,14 +28,14 @@
## Constructors
-[ArcPainter](../components_arc/ArcPainter/ArcPainter.md) ([Color](https://api.flutter.dev/flutter/dart-ui/Color-class.html) color, [double](https://api.flutter.dev/flutter/dart-core/double-class.html) width, [double](https://api.flutter.dev/flutter/dart-core/double-class.html) height)
+[ArcPainter](../components_arc/ArcPainter/ArcPainter.md) ([Color](https://api.flutter.dev/flutter/dart-ui/Color-class.html)? color, [double](https://api.flutter.dev/flutter/dart-core/double-class.html) width, [double](https://api.flutter.dev/flutter/dart-core/double-class.html) height)
## Properties
-##### [color](../components_arc/ArcPainter/color.md) → [Color](https://api.flutter.dev/flutter/dart-ui/Color-class.html)
+##### [color](../components_arc/ArcPainter/color.md) → [Color](https://api.flutter.dev/flutter/dart-ui/Color-class.html)?
@@ -70,7 +71,7 @@ _read-only, inherited_
-##### [semanticsBuilder](https://api.flutter.dev/flutter/rendering/CustomPainter/semanticsBuilder.html) → [SemanticsBuilderCallback](https://api.flutter.dev/flutter/rendering/SemanticsBuilderCallback.html)
+##### [semanticsBuilder](https://api.flutter.dev/flutter/rendering/CustomPainter/semanticsBuilder.html) → [SemanticsBuilderCallback](https://api.flutter.dev/flutter/rendering/SemanticsBuilderCallback.html)?
@@ -101,7 +102,7 @@ _inherited_
-##### [hitTest](https://api.flutter.dev/flutter/rendering/CustomPainter/hitTest.html)([Offset](https://api.flutter.dev/flutter/dart-ui/Offset-class.html) position) [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html)
+##### [hitTest](https://api.flutter.dev/flutter/rendering/CustomPainter/hitTest.html)([Offset](https://api.flutter.dev/flutter/dart-ui/Offset-class.html) position) [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html)?
diff --git a/doc/api/components_arc/ArcPainter/ArcPainter.md b/doc/api/components_arc/ArcPainter/ArcPainter.md
index ad6dbc1f..a1003782 100644
--- a/doc/api/components_arc/ArcPainter/ArcPainter.md
+++ b/doc/api/components_arc/ArcPainter/ArcPainter.md
@@ -6,10 +6,11 @@
+ *[](https://dart.dev/null-safety)*
-ArcPainter([Color](https://api.flutter.dev/flutter/dart-ui/Color-class.html) color, [double](https://api.flutter.dev/flutter/dart-core/double-class.html) width, [double](https://api.flutter.dev/flutter/dart-core/double-class.html) height)
+ArcPainter([Color](https://api.flutter.dev/flutter/dart-ui/Color-class.html)? color, [double](https://api.flutter.dev/flutter/dart-core/double-class.html) width, [double](https://api.flutter.dev/flutter/dart-core/double-class.html) height)
diff --git a/doc/api/components_arc/ArcPainter/color.md b/doc/api/components_arc/ArcPainter/color.md
index d8ab943c..4f94d387 100644
--- a/doc/api/components_arc/ArcPainter/color.md
+++ b/doc/api/components_arc/ArcPainter/color.md
@@ -6,9 +6,10 @@
+ *[](https://dart.dev/null-safety)*
-[Color](https://api.flutter.dev/flutter/dart-ui/Color-class.html) color
+[Color](https://api.flutter.dev/flutter/dart-ui/Color-class.html)? color
_final_
@@ -20,7 +21,7 @@ _final_
## Implementation
```dart
-final Color color;
+final Color? color;
```
diff --git a/doc/api/components_arc/ArcPainter/height.md b/doc/api/components_arc/ArcPainter/height.md
index 0c21346d..b15d9940 100644
--- a/doc/api/components_arc/ArcPainter/height.md
+++ b/doc/api/components_arc/ArcPainter/height.md
@@ -6,6 +6,7 @@
+ *[](https://dart.dev/null-safety)*
[double](https://api.flutter.dev/flutter/dart-core/double-class.html) height
diff --git a/doc/api/components_arc/ArcPainter/paint.md b/doc/api/components_arc/ArcPainter/paint.md
index 14032ffd..24de65d6 100644
--- a/doc/api/components_arc/ArcPainter/paint.md
+++ b/doc/api/components_arc/ArcPainter/paint.md
@@ -6,6 +6,7 @@
+ *[](https://dart.dev/null-safety)*
diff --git a/doc/api/components_arc/ArcPainter/shouldRepaint.md b/doc/api/components_arc/ArcPainter/shouldRepaint.md
index f9c9beb9..2d4e321b 100644
--- a/doc/api/components_arc/ArcPainter/shouldRepaint.md
+++ b/doc/api/components_arc/ArcPainter/shouldRepaint.md
@@ -6,6 +6,7 @@
+ *[](https://dart.dev/null-safety)*
diff --git a/doc/api/components_arc/ArcPainter/width.md b/doc/api/components_arc/ArcPainter/width.md
index 83e79f4b..7183e463 100644
--- a/doc/api/components_arc/ArcPainter/width.md
+++ b/doc/api/components_arc/ArcPainter/width.md
@@ -6,6 +6,7 @@
+ *[](https://dart.dev/null-safety)*
[double](https://api.flutter.dev/flutter/dart-core/double-class.html) width
diff --git a/doc/api/components_arc/ThumbPainter-class.md b/doc/api/components_arc/ThumbPainter-class.md
index 640385c4..d776b6c6 100644
--- a/doc/api/components_arc/ThumbPainter-class.md
+++ b/doc/api/components_arc/ThumbPainter-class.md
@@ -8,6 +8,7 @@
+ *[](https://dart.dev/null-safety)*
@@ -27,7 +28,7 @@
## Constructors
-[ThumbPainter](../components_arc/ThumbPainter/ThumbPainter.md) ([double](https://api.flutter.dev/flutter/dart-core/double-class.html) thumbx, [double](https://api.flutter.dev/flutter/dart-core/double-class.html) thumby)
+[ThumbPainter](../components_arc/ThumbPainter/ThumbPainter.md) ([double](https://api.flutter.dev/flutter/dart-core/double-class.html)? thumbx, [double](https://api.flutter.dev/flutter/dart-core/double-class.html)? thumby)
@@ -52,7 +53,7 @@ _read-only, inherited_
-##### [semanticsBuilder](https://api.flutter.dev/flutter/rendering/CustomPainter/semanticsBuilder.html) → [SemanticsBuilderCallback](https://api.flutter.dev/flutter/rendering/SemanticsBuilderCallback.html)
+##### [semanticsBuilder](https://api.flutter.dev/flutter/rendering/CustomPainter/semanticsBuilder.html) → [SemanticsBuilderCallback](https://api.flutter.dev/flutter/rendering/SemanticsBuilderCallback.html)?
@@ -62,7 +63,7 @@ _read-only, inherited_
-##### [thumbx](../components_arc/ThumbPainter/thumbx.md) → [double](https://api.flutter.dev/flutter/dart-core/double-class.html)
+##### [thumbx](../components_arc/ThumbPainter/thumbx.md) → [double](https://api.flutter.dev/flutter/dart-core/double-class.html)?
@@ -71,7 +72,7 @@ _final_
-##### [thumby](../components_arc/ThumbPainter/thumby.md) → [double](https://api.flutter.dev/flutter/dart-core/double-class.html)
+##### [thumby](../components_arc/ThumbPainter/thumby.md) → [double](https://api.flutter.dev/flutter/dart-core/double-class.html)?
@@ -92,7 +93,7 @@ _inherited_
-##### [hitTest](https://api.flutter.dev/flutter/rendering/CustomPainter/hitTest.html)([Offset](https://api.flutter.dev/flutter/dart-ui/Offset-class.html) position) [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html)
+##### [hitTest](https://api.flutter.dev/flutter/rendering/CustomPainter/hitTest.html)([Offset](https://api.flutter.dev/flutter/dart-ui/Offset-class.html) position) [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html)?
diff --git a/doc/api/components_arc/ThumbPainter/ThumbPainter.md b/doc/api/components_arc/ThumbPainter/ThumbPainter.md
index 5e95d0ee..706ad142 100644
--- a/doc/api/components_arc/ThumbPainter/ThumbPainter.md
+++ b/doc/api/components_arc/ThumbPainter/ThumbPainter.md
@@ -6,10 +6,11 @@
+ *[](https://dart.dev/null-safety)*
-ThumbPainter([double](https://api.flutter.dev/flutter/dart-core/double-class.html) thumbx, [double](https://api.flutter.dev/flutter/dart-core/double-class.html) thumby)
+ThumbPainter([double](https://api.flutter.dev/flutter/dart-core/double-class.html)? thumbx, [double](https://api.flutter.dev/flutter/dart-core/double-class.html)? thumby)
diff --git a/doc/api/components_arc/ThumbPainter/paint.md b/doc/api/components_arc/ThumbPainter/paint.md
index 8414c836..cbdb0628 100644
--- a/doc/api/components_arc/ThumbPainter/paint.md
+++ b/doc/api/components_arc/ThumbPainter/paint.md
@@ -6,6 +6,7 @@
+ *[](https://dart.dev/null-safety)*
@@ -60,9 +61,9 @@ obtain the correct rendering size.
@override
void paint(Canvas canvas, Size size) {
var thumbPaint = Paint()
- ..color = Colors.red[400]
+ ..color = Colors.red[400]!
..style = PaintingStyle.fill;
- canvas.drawCircle(Offset(thumbx + 5, thumby + 5), 10, thumbPaint);
+ canvas.drawCircle(Offset(thumbx! + 5, thumby! + 5), 10, thumbPaint);
}
```
diff --git a/doc/api/components_arc/ThumbPainter/shouldRepaint.md b/doc/api/components_arc/ThumbPainter/shouldRepaint.md
index d92b69f1..8ef7c588 100644
--- a/doc/api/components_arc/ThumbPainter/shouldRepaint.md
+++ b/doc/api/components_arc/ThumbPainter/shouldRepaint.md
@@ -6,6 +6,7 @@
+ *[](https://dart.dev/null-safety)*
diff --git a/doc/api/components_arc/ThumbPainter/thumbx.md b/doc/api/components_arc/ThumbPainter/thumbx.md
index 28912f45..9403e3be 100644
--- a/doc/api/components_arc/ThumbPainter/thumbx.md
+++ b/doc/api/components_arc/ThumbPainter/thumbx.md
@@ -6,9 +6,10 @@
+ *[](https://dart.dev/null-safety)*
-[double](https://api.flutter.dev/flutter/dart-core/double-class.html) thumbx
+[double](https://api.flutter.dev/flutter/dart-core/double-class.html)? thumbx
_final_
@@ -20,7 +21,7 @@ _final_
## Implementation
```dart
-final double thumbx;
+final double? thumbx;
```
diff --git a/doc/api/components_arc/ThumbPainter/thumby.md b/doc/api/components_arc/ThumbPainter/thumby.md
index 19d851ae..92211bbd 100644
--- a/doc/api/components_arc/ThumbPainter/thumby.md
+++ b/doc/api/components_arc/ThumbPainter/thumby.md
@@ -6,9 +6,10 @@
+ *[](https://dart.dev/null-safety)*
-[double](https://api.flutter.dev/flutter/dart-core/double-class.html) thumby
+[double](https://api.flutter.dev/flutter/dart-core/double-class.html)? thumby
_final_
@@ -20,7 +21,7 @@ _final_
## Implementation
```dart
-final double thumby;
+final double? thumby;
```
diff --git a/doc/api/components_arc/components_arc-library.md b/doc/api/components_arc/components_arc-library.md
index 8578d473..e6088f48 100644
--- a/doc/api/components_arc/components_arc-library.md
+++ b/doc/api/components_arc/components_arc-library.md
@@ -8,6 +8,7 @@
+ *[](https://dart.dev/null-safety)*
diff --git a/doc/api/components_device_control/DeviceControl-class.md b/doc/api/components_device_control/DeviceControl-class.md
index c5d33dc5..e8165870 100644
--- a/doc/api/components_device_control/DeviceControl-class.md
+++ b/doc/api/components_device_control/DeviceControl-class.md
@@ -8,6 +8,7 @@
+ *[](https://dart.dev/null-safety)*
@@ -28,7 +29,7 @@
## Constructors
-[DeviceControl](../components_device_control/DeviceControl/DeviceControl.md) ({[Key](https://api.flutter.dev/flutter/foundation/Key-class.html) key, @[required](https://pub.dev/documentation/meta/1.3.0/meta/required-constant.html) [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) onOff})
+[DeviceControl](../components_device_control/DeviceControl/DeviceControl.md) ({[Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? key, required [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) onOff})
_const_
@@ -40,11 +41,11 @@
The hash code for this object. [...](https://api.flutter.dev/flutter/widgets/Widget/hashCode.html)
-_@[nonVirtual](https://pub.dev/documentation/meta/1.3.0/meta/nonVirtual-constant.html), read-only, inherited_
+_@[nonVirtual](https://pub.dev/documentation/meta/1.7.0/meta/nonVirtual-constant.html), read-only, inherited_
-##### [key](https://api.flutter.dev/flutter/widgets/Widget/key.html) → [Key](https://api.flutter.dev/flutter/foundation/Key-class.html)
+##### [key](https://api.flutter.dev/flutter/widgets/Widget/key.html) → [Key](https://api.flutter.dev/flutter/foundation/Key-class.html)?
@@ -98,7 +99,7 @@ _inherited_
Returns a list of DiagnosticsNode
objects describing this node's
children. [...](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/debugDescribeChildren.html)
-_@[protected](https://pub.dev/documentation/meta/1.3.0/meta/protected-constant.html), inherited_
+_@[protected](https://pub.dev/documentation/meta/1.7.0/meta/protected-constant.html), inherited_
@@ -120,7 +121,7 @@ _inherited_
-##### [toDiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toDiagnosticsNode.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) name, [DiagnosticsTreeStyle](https://api.flutter.dev/flutter/foundation/DiagnosticsTreeStyle-class.html) style}) [DiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticsNode-class.html)
+##### [toDiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toDiagnosticsNode.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html)? name, [DiagnosticsTreeStyle](https://api.flutter.dev/flutter/foundation/DiagnosticsTreeStyle.html)? style}) [DiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticsNode-class.html)
@@ -130,7 +131,7 @@ _inherited_
-##### [toString](https://api.flutter.dev/flutter/foundation/Diagnosticable/toString.html)({[DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel-class.html) minLevel = DiagnosticLevel.info}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html)
+##### [toString](https://api.flutter.dev/flutter/foundation/Diagnosticable/toString.html)({[DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.info}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html)
@@ -139,7 +140,7 @@ _inherited_
-##### [toStringDeep](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toStringDeep.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) prefixLineOne = '', [String](https://api.flutter.dev/flutter/dart-core/String-class.html) prefixOtherLines, [DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel-class.html) minLevel = DiagnosticLevel.debug}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html)
+##### [toStringDeep](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toStringDeep.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) prefixLineOne = '', [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? prefixOtherLines, [DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.debug}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html)
@@ -148,7 +149,7 @@ _inherited_
-##### [toStringShallow](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toStringShallow.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) joiner = ', ', [DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel-class.html) minLevel = DiagnosticLevel.debug}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html)
+##### [toStringShallow](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toStringShallow.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) joiner = ', ', [DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.debug}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html)
@@ -174,7 +175,7 @@ _inherited_
The equality operator. [...](https://api.flutter.dev/flutter/widgets/Widget/operator_equals.html)
-_@[nonVirtual](https://pub.dev/documentation/meta/1.3.0/meta/nonVirtual-constant.html), inherited_
+_@[nonVirtual](https://pub.dev/documentation/meta/1.7.0/meta/nonVirtual-constant.html), inherited_
diff --git a/doc/api/components_device_control/DeviceControl/DeviceControl.md b/doc/api/components_device_control/DeviceControl/DeviceControl.md
index 22edfa0f..15208ffc 100644
--- a/doc/api/components_device_control/DeviceControl/DeviceControl.md
+++ b/doc/api/components_device_control/DeviceControl/DeviceControl.md
@@ -6,10 +6,11 @@
+ *[](https://dart.dev/null-safety)*
const
-DeviceControl({[Key](https://api.flutter.dev/flutter/foundation/Key-class.html) key, @[required](https://pub.dev/documentation/meta/1.3.0/meta/required-constant.html) [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) onOff})
+DeviceControl({[Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? key, required [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) onOff})
@@ -19,8 +20,8 @@ DeviceControl({[Key](https://api.flutter.dev/flutter/foundation/Key-class.html)
```dart
const DeviceControl({
- Key key,
- @required this.onOff,
+ Key? key,
+ required this.onOff,
}) : super(key: key);
```
diff --git a/doc/api/components_device_control/DeviceControl/build.md b/doc/api/components_device_control/DeviceControl/build.md
index c974b473..23c5fc75 100644
--- a/doc/api/components_device_control/DeviceControl/build.md
+++ b/doc/api/components_device_control/DeviceControl/build.md
@@ -6,6 +6,7 @@
+ *[](https://dart.dev/null-safety)*
@@ -63,7 +64,7 @@ Widget build(BuildContext context) {
width: 300,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(5),
- border: Border.all(color: Colors.teal[200], width: 3)),
+ border: Border.all(color: Colors.teal[200]!, width: 3)),
child: ListTile(
dense: false,
leading: Row(
diff --git a/doc/api/components_device_control/DeviceControl/onOff.md b/doc/api/components_device_control/DeviceControl/onOff.md
index 99130551..0ee4ed61 100644
--- a/doc/api/components_device_control/DeviceControl/onOff.md
+++ b/doc/api/components_device_control/DeviceControl/onOff.md
@@ -6,6 +6,7 @@
+ *[](https://dart.dev/null-safety)*
[bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) onOff
diff --git a/doc/api/components_device_control/components_device_control-library.md b/doc/api/components_device_control/components_device_control-library.md
index f045b836..fcee163e 100644
--- a/doc/api/components_device_control/components_device_control-library.md
+++ b/doc/api/components_device_control/components_device_control-library.md
@@ -8,6 +8,7 @@
+ *[](https://dart.dev/null-safety)*
diff --git a/doc/api/components_lock_widget/LockWidget-class.md b/doc/api/components_lock_widget/LockWidget-class.md
index 41ecce6a..076d445f 100644
--- a/doc/api/components_lock_widget/LockWidget-class.md
+++ b/doc/api/components_lock_widget/LockWidget-class.md
@@ -8,6 +8,7 @@
+ *[](https://dart.dev/null-safety)*
@@ -40,11 +41,11 @@
The hash code for this object. [...](https://api.flutter.dev/flutter/widgets/Widget/hashCode.html)
-_@[nonVirtual](https://pub.dev/documentation/meta/1.3.0/meta/nonVirtual-constant.html), read-only, inherited_
+_@[nonVirtual](https://pub.dev/documentation/meta/1.7.0/meta/nonVirtual-constant.html), read-only, inherited_
-##### [key](https://api.flutter.dev/flutter/widgets/Widget/key.html) → [Key](https://api.flutter.dev/flutter/foundation/Key-class.html)
+##### [key](https://api.flutter.dev/flutter/widgets/Widget/key.html) → [Key](https://api.flutter.dev/flutter/foundation/Key-class.html)?
@@ -89,7 +90,7 @@ _inherited_
Returns a list of DiagnosticsNode
objects describing this node's
children. [...](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/debugDescribeChildren.html)
-_@[protected](https://pub.dev/documentation/meta/1.3.0/meta/protected-constant.html), inherited_
+_@[protected](https://pub.dev/documentation/meta/1.7.0/meta/protected-constant.html), inherited_
@@ -120,7 +121,7 @@ _inherited_
-##### [toDiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toDiagnosticsNode.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) name, [DiagnosticsTreeStyle](https://api.flutter.dev/flutter/foundation/DiagnosticsTreeStyle-class.html) style}) [DiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticsNode-class.html)
+##### [toDiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toDiagnosticsNode.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html)? name, [DiagnosticsTreeStyle](https://api.flutter.dev/flutter/foundation/DiagnosticsTreeStyle.html)? style}) [DiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticsNode-class.html)
@@ -130,7 +131,7 @@ _inherited_
-##### [toString](https://api.flutter.dev/flutter/foundation/Diagnosticable/toString.html)({[DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel-class.html) minLevel = DiagnosticLevel.info}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html)
+##### [toString](https://api.flutter.dev/flutter/foundation/Diagnosticable/toString.html)({[DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.info}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html)
@@ -139,7 +140,7 @@ _inherited_
-##### [toStringDeep](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toStringDeep.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) prefixLineOne = '', [String](https://api.flutter.dev/flutter/dart-core/String-class.html) prefixOtherLines, [DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel-class.html) minLevel = DiagnosticLevel.debug}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html)
+##### [toStringDeep](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toStringDeep.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) prefixLineOne = '', [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? prefixOtherLines, [DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.debug}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html)
@@ -148,7 +149,7 @@ _inherited_
-##### [toStringShallow](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toStringShallow.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) joiner = ', ', [DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel-class.html) minLevel = DiagnosticLevel.debug}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html)
+##### [toStringShallow](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toStringShallow.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) joiner = ', ', [DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.debug}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html)
@@ -174,7 +175,7 @@ _inherited_
The equality operator. [...](https://api.flutter.dev/flutter/widgets/Widget/operator_equals.html)
-_@[nonVirtual](https://pub.dev/documentation/meta/1.3.0/meta/nonVirtual-constant.html), inherited_
+_@[nonVirtual](https://pub.dev/documentation/meta/1.7.0/meta/nonVirtual-constant.html), inherited_
diff --git a/doc/api/components_lock_widget/LockWidget/LockWidget.md b/doc/api/components_lock_widget/LockWidget/LockWidget.md
index f354bb9e..5e47521b 100644
--- a/doc/api/components_lock_widget/LockWidget/LockWidget.md
+++ b/doc/api/components_lock_widget/LockWidget/LockWidget.md
@@ -6,6 +6,7 @@
+ *[](https://dart.dev/null-safety)*
diff --git a/doc/api/components_lock_widget/LockWidget/build.md b/doc/api/components_lock_widget/LockWidget/build.md
index 050b370a..363fc7ad 100644
--- a/doc/api/components_lock_widget/LockWidget/build.md
+++ b/doc/api/components_lock_widget/LockWidget/build.md
@@ -6,6 +6,7 @@
+ *[](https://dart.dev/null-safety)*
@@ -67,7 +68,7 @@ Widget build(BuildContext context) {
Row(
children: [
Text(
- lockProvider?.deviceDetail?.displayName ?? '',
+ lockProvider.deviceDetail.displayName,
style: Theme.of(context).textTheme.headline6,
),
],
@@ -86,7 +87,7 @@ Widget build(BuildContext context) {
onTap: () {
bool setLock = !lockProvider.isLocked;
lockProvider.setLockUnlockAction(
- lockProvider?.deviceDetail?.id, setLock);
+ lockProvider.deviceDetail.id, setLock);
},
)),
color: lockProvider.isLocked
diff --git a/doc/api/components_lock_widget/LockWidget/getLockStateIcon.md b/doc/api/components_lock_widget/LockWidget/getLockStateIcon.md
index 6645f8d2..2e58c935 100644
--- a/doc/api/components_lock_widget/LockWidget/getLockStateIcon.md
+++ b/doc/api/components_lock_widget/LockWidget/getLockStateIcon.md
@@ -6,6 +6,7 @@
+ *[](https://dart.dev/null-safety)*
diff --git a/doc/api/components_lock_widget/components_lock_widget-library.md b/doc/api/components_lock_widget/components_lock_widget-library.md
index 123009f3..9a37b07e 100644
--- a/doc/api/components_lock_widget/components_lock_widget-library.md
+++ b/doc/api/components_lock_widget/components_lock_widget-library.md
@@ -8,6 +8,7 @@
+ *[](https://dart.dev/null-safety)*
diff --git a/doc/api/components_modes_toolbar/ModeButtonIconChild-class.md b/doc/api/components_modes_toolbar/ModeButtonIconChild-class.md
index 55f6c536..5d3a44c6 100644
--- a/doc/api/components_modes_toolbar/ModeButtonIconChild-class.md
+++ b/doc/api/components_modes_toolbar/ModeButtonIconChild-class.md
@@ -8,6 +8,7 @@
+ *[](https://dart.dev/null-safety)*
@@ -28,7 +29,7 @@
## Constructors
-[ModeButtonIconChild](../components_modes_toolbar/ModeButtonIconChild/ModeButtonIconChild.md) ({[Key](https://api.flutter.dev/flutter/foundation/Key-class.html) key, @[required](https://pub.dev/documentation/meta/1.3.0/meta/required-constant.html) [Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) icon})
+[ModeButtonIconChild](../components_modes_toolbar/ModeButtonIconChild/ModeButtonIconChild.md) ({[Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? key, required [Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) icon})
@@ -40,7 +41,7 @@
The hash code for this object. [...](https://api.flutter.dev/flutter/widgets/Widget/hashCode.html)
-_@[nonVirtual](https://pub.dev/documentation/meta/1.3.0/meta/nonVirtual-constant.html), read-only, inherited_
+_@[nonVirtual](https://pub.dev/documentation/meta/1.7.0/meta/nonVirtual-constant.html), read-only, inherited_
@@ -53,7 +54,7 @@ _final_
-##### [key](https://api.flutter.dev/flutter/widgets/Widget/key.html) → [Key](https://api.flutter.dev/flutter/foundation/Key-class.html)
+##### [key](https://api.flutter.dev/flutter/widgets/Widget/key.html) → [Key](https://api.flutter.dev/flutter/foundation/Key-class.html)?
@@ -98,7 +99,7 @@ _inherited_
Returns a list of DiagnosticsNode
objects describing this node's
children. [...](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/debugDescribeChildren.html)
-_@[protected](https://pub.dev/documentation/meta/1.3.0/meta/protected-constant.html), inherited_
+_@[protected](https://pub.dev/documentation/meta/1.7.0/meta/protected-constant.html), inherited_
@@ -120,7 +121,7 @@ _inherited_
-##### [toDiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toDiagnosticsNode.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) name, [DiagnosticsTreeStyle](https://api.flutter.dev/flutter/foundation/DiagnosticsTreeStyle-class.html) style}) [DiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticsNode-class.html)
+##### [toDiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toDiagnosticsNode.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html)? name, [DiagnosticsTreeStyle](https://api.flutter.dev/flutter/foundation/DiagnosticsTreeStyle.html)? style}) [DiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticsNode-class.html)
@@ -130,7 +131,7 @@ _inherited_
-##### [toString](https://api.flutter.dev/flutter/foundation/Diagnosticable/toString.html)({[DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel-class.html) minLevel = DiagnosticLevel.info}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html)
+##### [toString](https://api.flutter.dev/flutter/foundation/Diagnosticable/toString.html)({[DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.info}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html)
@@ -139,7 +140,7 @@ _inherited_
-##### [toStringDeep](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toStringDeep.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) prefixLineOne = '', [String](https://api.flutter.dev/flutter/dart-core/String-class.html) prefixOtherLines, [DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel-class.html) minLevel = DiagnosticLevel.debug}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html)
+##### [toStringDeep](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toStringDeep.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) prefixLineOne = '', [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? prefixOtherLines, [DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.debug}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html)
@@ -148,7 +149,7 @@ _inherited_
-##### [toStringShallow](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toStringShallow.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) joiner = ', ', [DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel-class.html) minLevel = DiagnosticLevel.debug}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html)
+##### [toStringShallow](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toStringShallow.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) joiner = ', ', [DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.debug}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html)
@@ -174,7 +175,7 @@ _inherited_
The equality operator. [...](https://api.flutter.dev/flutter/widgets/Widget/operator_equals.html)
-_@[nonVirtual](https://pub.dev/documentation/meta/1.3.0/meta/nonVirtual-constant.html), inherited_
+_@[nonVirtual](https://pub.dev/documentation/meta/1.7.0/meta/nonVirtual-constant.html), inherited_
diff --git a/doc/api/components_modes_toolbar/ModeButtonIconChild/ModeButtonIconChild.md b/doc/api/components_modes_toolbar/ModeButtonIconChild/ModeButtonIconChild.md
index 8a523b98..d405b121 100644
--- a/doc/api/components_modes_toolbar/ModeButtonIconChild/ModeButtonIconChild.md
+++ b/doc/api/components_modes_toolbar/ModeButtonIconChild/ModeButtonIconChild.md
@@ -6,10 +6,11 @@
+ *[](https://dart.dev/null-safety)*
-ModeButtonIconChild({[Key](https://api.flutter.dev/flutter/foundation/Key-class.html) key, @[required](https://pub.dev/documentation/meta/1.3.0/meta/required-constant.html) [Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) icon})
+ModeButtonIconChild({[Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? key, required [Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) icon})
@@ -18,7 +19,7 @@ ModeButtonIconChild({[Key](https://api.flutter.dev/flutter/foundation/Key-class.
## Implementation
```dart
-ModeButtonIconChild({Key key, @required this.icon}) : super(key: key);
+ModeButtonIconChild({Key? key, required this.icon}) : super(key: key);
```
diff --git a/doc/api/components_modes_toolbar/ModeButtonIconChild/build.md b/doc/api/components_modes_toolbar/ModeButtonIconChild/build.md
index 3af0d954..7a5ad841 100644
--- a/doc/api/components_modes_toolbar/ModeButtonIconChild/build.md
+++ b/doc/api/components_modes_toolbar/ModeButtonIconChild/build.md
@@ -6,6 +6,7 @@
+ *[](https://dart.dev/null-safety)*
diff --git a/doc/api/components_modes_toolbar/ModeButtonIconChild/icon.md b/doc/api/components_modes_toolbar/ModeButtonIconChild/icon.md
index 08858e1e..a2df91f9 100644
--- a/doc/api/components_modes_toolbar/ModeButtonIconChild/icon.md
+++ b/doc/api/components_modes_toolbar/ModeButtonIconChild/icon.md
@@ -6,6 +6,7 @@
+ *[](https://dart.dev/null-safety)*
[Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) icon
diff --git a/doc/api/components_modes_toolbar/ModeIconButton-class.md b/doc/api/components_modes_toolbar/ModeIconButton-class.md
index fdddc956..ac69718f 100644
--- a/doc/api/components_modes_toolbar/ModeIconButton-class.md
+++ b/doc/api/components_modes_toolbar/ModeIconButton-class.md
@@ -8,6 +8,7 @@
+ *[](https://dart.dev/null-safety)*
@@ -30,7 +31,7 @@
## Constructors
-[ModeIconButton](../components_modes_toolbar/ModeIconButton/ModeIconButton.md) ({[Key](https://api.flutter.dev/flutter/foundation/Key-class.html) key, @[required](https://pub.dev/documentation/meta/1.3.0/meta/required-constant.html) [VoidCallback](https://api.flutter.dev/flutter/dart-ui/VoidCallback.html) onPressed, [VoidCallback](https://api.flutter.dev/flutter/dart-ui/VoidCallback.html) onLongPress, @[required](https://pub.dev/documentation/meta/1.3.0/meta/required-constant.html) [Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) icon})
+[ModeIconButton](../components_modes_toolbar/ModeIconButton/ModeIconButton.md) ({[Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? key, required [VoidCallback](https://api.flutter.dev/flutter/dart-ui/VoidCallback.html) onPressed, [VoidCallback](https://api.flutter.dev/flutter/dart-ui/VoidCallback.html)? onLongPress, required [Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) icon})
@@ -47,7 +48,7 @@ _final, inherited_
-##### [child](https://api.flutter.dev/flutter/material/ButtonStyleButton/child.html) → [Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html)
+##### [child](https://api.flutter.dev/flutter/material/ButtonStyleButton/child.html) → [Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html)?
@@ -56,7 +57,7 @@ _final, inherited_
-##### [clipBehavior](https://api.flutter.dev/flutter/material/ButtonStyleButton/clipBehavior.html) → [Clip](https://api.flutter.dev/flutter/dart-ui/Clip-class.html)
+##### [clipBehavior](https://api.flutter.dev/flutter/material/ButtonStyleButton/clipBehavior.html) → [Clip](https://api.flutter.dev/flutter/dart-ui/Clip.html)
@@ -74,7 +75,7 @@ _read-only, inherited_
-##### [focusNode](https://api.flutter.dev/flutter/material/ButtonStyleButton/focusNode.html) → [FocusNode](https://api.flutter.dev/flutter/widgets/FocusNode-class.html)
+##### [focusNode](https://api.flutter.dev/flutter/material/ButtonStyleButton/focusNode.html) → [FocusNode](https://api.flutter.dev/flutter/widgets/FocusNode-class.html)?
@@ -88,11 +89,11 @@ _final, inherited_
The hash code for this object. [...](https://api.flutter.dev/flutter/widgets/Widget/hashCode.html)
-_@[nonVirtual](https://pub.dev/documentation/meta/1.3.0/meta/nonVirtual-constant.html), read-only, inherited_
+_@[nonVirtual](https://pub.dev/documentation/meta/1.7.0/meta/nonVirtual-constant.html), read-only, inherited_
-##### [key](https://api.flutter.dev/flutter/widgets/Widget/key.html) → [Key](https://api.flutter.dev/flutter/foundation/Key-class.html)
+##### [key](https://api.flutter.dev/flutter/widgets/Widget/key.html) → [Key](https://api.flutter.dev/flutter/foundation/Key-class.html)?
@@ -101,7 +102,7 @@ _final, inherited_
-##### [onLongPress](https://api.flutter.dev/flutter/material/ButtonStyleButton/onLongPress.html) → [VoidCallback](https://api.flutter.dev/flutter/dart-ui/VoidCallback.html)
+##### [onLongPress](https://api.flutter.dev/flutter/material/ButtonStyleButton/onLongPress.html) → [VoidCallback](https://api.flutter.dev/flutter/dart-ui/VoidCallback.html)?
@@ -110,7 +111,7 @@ _final, inherited_
-##### [onPressed](https://api.flutter.dev/flutter/material/ButtonStyleButton/onPressed.html) → [VoidCallback](https://api.flutter.dev/flutter/dart-ui/VoidCallback.html)
+##### [onPressed](https://api.flutter.dev/flutter/material/ButtonStyleButton/onPressed.html) → [VoidCallback](https://api.flutter.dev/flutter/dart-ui/VoidCallback.html)?
@@ -128,7 +129,7 @@ _read-only, inherited_
-##### [style](https://api.flutter.dev/flutter/material/ButtonStyleButton/style.html) → [ButtonStyle](https://api.flutter.dev/flutter/material/ButtonStyle-class.html)
+##### [style](https://api.flutter.dev/flutter/material/ButtonStyleButton/style.html) → [ButtonStyle](https://api.flutter.dev/flutter/material/ButtonStyle-class.html)?
@@ -149,7 +150,7 @@ _inherited_
-##### [createState](https://api.flutter.dev/flutter/material/ButtonStyleButton/createState.html)() _ButtonStyleState
+##### [createState](https://api.flutter.dev/flutter/material/ButtonStyleButton/createState.html)() [State](https://api.flutter.dev/flutter/widgets/State-class.html)<[ButtonStyleButton](https://api.flutter.dev/flutter/material/ButtonStyleButton-class.html)>
@@ -164,7 +165,7 @@ _inherited_
Returns a list of DiagnosticsNode
objects describing this node's
children. [...](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/debugDescribeChildren.html)
-_@[protected](https://pub.dev/documentation/meta/1.3.0/meta/protected-constant.html), inherited_
+_@[protected](https://pub.dev/documentation/meta/1.7.0/meta/protected-constant.html), inherited_
@@ -195,7 +196,7 @@ _inherited_
-##### [themeStyleOf](https://api.flutter.dev/flutter/material/ElevatedButton/themeStyleOf.html)([BuildContext](https://api.flutter.dev/flutter/widgets/BuildContext-class.html) context) [ButtonStyle](https://api.flutter.dev/flutter/material/ButtonStyle-class.html)
+##### [themeStyleOf](https://api.flutter.dev/flutter/material/ElevatedButton/themeStyleOf.html)([BuildContext](https://api.flutter.dev/flutter/widgets/BuildContext-class.html) context) [ButtonStyle](https://api.flutter.dev/flutter/material/ButtonStyle-class.html)?
@@ -205,7 +206,7 @@ _inherited_
-##### [toDiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toDiagnosticsNode.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) name, [DiagnosticsTreeStyle](https://api.flutter.dev/flutter/foundation/DiagnosticsTreeStyle-class.html) style}) [DiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticsNode-class.html)
+##### [toDiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toDiagnosticsNode.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html)? name, [DiagnosticsTreeStyle](https://api.flutter.dev/flutter/foundation/DiagnosticsTreeStyle.html)? style}) [DiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticsNode-class.html)
@@ -215,7 +216,7 @@ _inherited_
-##### [toString](https://api.flutter.dev/flutter/foundation/Diagnosticable/toString.html)({[DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel-class.html) minLevel = DiagnosticLevel.info}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html)
+##### [toString](https://api.flutter.dev/flutter/foundation/Diagnosticable/toString.html)({[DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.info}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html)
@@ -224,7 +225,7 @@ _inherited_
-##### [toStringDeep](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toStringDeep.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) prefixLineOne = '', [String](https://api.flutter.dev/flutter/dart-core/String-class.html) prefixOtherLines, [DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel-class.html) minLevel = DiagnosticLevel.debug}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html)
+##### [toStringDeep](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toStringDeep.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) prefixLineOne = '', [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? prefixOtherLines, [DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.debug}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html)
@@ -233,7 +234,7 @@ _inherited_
-##### [toStringShallow](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toStringShallow.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) joiner = ', ', [DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel-class.html) minLevel = DiagnosticLevel.debug}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html)
+##### [toStringShallow](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toStringShallow.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) joiner = ', ', [DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.debug}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html)
@@ -259,7 +260,7 @@ _inherited_
The equality operator. [...](https://api.flutter.dev/flutter/widgets/Widget/operator_equals.html)
-_@[nonVirtual](https://pub.dev/documentation/meta/1.3.0/meta/nonVirtual-constant.html), inherited_
+_@[nonVirtual](https://pub.dev/documentation/meta/1.7.0/meta/nonVirtual-constant.html), inherited_
diff --git a/doc/api/components_modes_toolbar/ModeIconButton/ModeIconButton.md b/doc/api/components_modes_toolbar/ModeIconButton/ModeIconButton.md
index 3d3e2ce6..635992df 100644
--- a/doc/api/components_modes_toolbar/ModeIconButton/ModeIconButton.md
+++ b/doc/api/components_modes_toolbar/ModeIconButton/ModeIconButton.md
@@ -6,10 +6,11 @@
+ *[](https://dart.dev/null-safety)*
-ModeIconButton({[Key](https://api.flutter.dev/flutter/foundation/Key-class.html) key, @[required](https://pub.dev/documentation/meta/1.3.0/meta/required-constant.html) [VoidCallback](https://api.flutter.dev/flutter/dart-ui/VoidCallback.html) onPressed, [VoidCallback](https://api.flutter.dev/flutter/dart-ui/VoidCallback.html) onLongPress, @[required](https://pub.dev/documentation/meta/1.3.0/meta/required-constant.html) [Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) icon})
+ModeIconButton({[Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? key, required [VoidCallback](https://api.flutter.dev/flutter/dart-ui/VoidCallback.html) onPressed, [VoidCallback](https://api.flutter.dev/flutter/dart-ui/VoidCallback.html)? onLongPress, required [Widget](https://api.flutter.dev/flutter/widgets/Widget-class.html) icon})
@@ -19,12 +20,11 @@ ModeIconButton({[Key](https://api.flutter.dev/flutter/foundation/Key-class.html)
```dart
ModeIconButton({
- Key key,
- @required VoidCallback onPressed,
- VoidCallback onLongPress,
- @required Widget icon,
-}) : assert(icon != null),
- super(
+ Key? key,
+ required VoidCallback onPressed,
+ VoidCallback? onLongPress,
+ required Widget icon,
+}) : super(
key: key,
onPressed: onPressed,
onLongPress: onLongPress,
diff --git a/doc/api/components_modes_toolbar/ModeIconButton/defaultStyleOf.md b/doc/api/components_modes_toolbar/ModeIconButton/defaultStyleOf.md
index a5bde15d..8cfd020b 100644
--- a/doc/api/components_modes_toolbar/ModeIconButton/defaultStyleOf.md
+++ b/doc/api/components_modes_toolbar/ModeIconButton/defaultStyleOf.md
@@ -6,6 +6,7 @@
+ *[](https://dart.dev/null-safety)*
@@ -28,7 +29,7 @@ color.
"Theme.foo" is shorthand for Theme.of(context).foo
. Color
scheme values like "onSurface(0.38)" are shorthand for
onSurface.withOpacity(0.38)
. MaterialStateProperty valued
-properties that are not followed by by a sublist have the same
+properties that are not followed by a sublist have the same
value for all states, otherwise the values are as specified for
each state, and "others" means all other states.
The textScaleFactor
is the value of
@@ -75,6 +76,8 @@ abbreviated for readability.
minimumSize
- Size(64, 36)
+fixedSize
- null
+maximumSize
- Size.infinite
side
- null
shape
- RoundedRectangleBorder(borderRadius: BorderRadius.circular(4))
mouseCursor
@@ -88,6 +91,7 @@ abbreviated for readability.
animationDuration
- kThemeChangeDuration
enableFeedback
- true
alignment
- Alignment.center
+splashFactory
- InkRipple.splashFactory
The default padding values for the ElevatedButton.icon factory are slightly different:
diff --git a/doc/api/components_modes_toolbar/ModesToolbar-class.md b/doc/api/components_modes_toolbar/ModesToolbar-class.md
index 78d1fe09..fa521f16 100644
--- a/doc/api/components_modes_toolbar/ModesToolbar-class.md
+++ b/doc/api/components_modes_toolbar/ModesToolbar-class.md
@@ -8,6 +8,7 @@
+ *[](https://dart.dev/null-safety)*
@@ -28,14 +29,14 @@
## Constructors
-[ModesToolbar](../components_modes_toolbar/ModesToolbar/ModesToolbar.md) ({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) deviceId})
+[ModesToolbar](../components_modes_toolbar/ModesToolbar/ModesToolbar.md) ({[String](https://api.flutter.dev/flutter/dart-core/String-class.html)? deviceId})
## Properties
-##### [deviceId](../components_modes_toolbar/ModesToolbar/deviceId.md) → [String](https://api.flutter.dev/flutter/dart-core/String-class.html)
+##### [deviceId](../components_modes_toolbar/ModesToolbar/deviceId.md) → [String](https://api.flutter.dev/flutter/dart-core/String-class.html)?
@@ -49,11 +50,11 @@ _final_
The hash code for this object. [...](https://api.flutter.dev/flutter/widgets/Widget/hashCode.html)
-_@[nonVirtual](https://pub.dev/documentation/meta/1.3.0/meta/nonVirtual-constant.html), read-only, inherited_
+_@[nonVirtual](https://pub.dev/documentation/meta/1.7.0/meta/nonVirtual-constant.html), read-only, inherited_
-##### [key](https://api.flutter.dev/flutter/widgets/Widget/key.html) → [Key](https://api.flutter.dev/flutter/foundation/Key-class.html)
+##### [key](https://api.flutter.dev/flutter/widgets/Widget/key.html) → [Key](https://api.flutter.dev/flutter/foundation/Key-class.html)?
@@ -98,7 +99,7 @@ _inherited_
Returns a list of DiagnosticsNode
objects describing this node's
children. [...](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/debugDescribeChildren.html)
-_@[protected](https://pub.dev/documentation/meta/1.3.0/meta/protected-constant.html), inherited_
+_@[protected](https://pub.dev/documentation/meta/1.7.0/meta/protected-constant.html), inherited_
@@ -120,7 +121,7 @@ _inherited_
-##### [toDiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toDiagnosticsNode.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) name, [DiagnosticsTreeStyle](https://api.flutter.dev/flutter/foundation/DiagnosticsTreeStyle-class.html) style}) [DiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticsNode-class.html)
+##### [toDiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toDiagnosticsNode.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html)? name, [DiagnosticsTreeStyle](https://api.flutter.dev/flutter/foundation/DiagnosticsTreeStyle.html)? style}) [DiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticsNode-class.html)
@@ -130,7 +131,7 @@ _inherited_
-##### [toString](https://api.flutter.dev/flutter/foundation/Diagnosticable/toString.html)({[DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel-class.html) minLevel = DiagnosticLevel.info}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html)
+##### [toString](https://api.flutter.dev/flutter/foundation/Diagnosticable/toString.html)({[DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.info}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html)
@@ -139,7 +140,7 @@ _inherited_
-##### [toStringDeep](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toStringDeep.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) prefixLineOne = '', [String](https://api.flutter.dev/flutter/dart-core/String-class.html) prefixOtherLines, [DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel-class.html) minLevel = DiagnosticLevel.debug}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html)
+##### [toStringDeep](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toStringDeep.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) prefixLineOne = '', [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? prefixOtherLines, [DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.debug}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html)
@@ -148,7 +149,7 @@ _inherited_
-##### [toStringShallow](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toStringShallow.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) joiner = ', ', [DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel-class.html) minLevel = DiagnosticLevel.debug}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html)
+##### [toStringShallow](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toStringShallow.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) joiner = ', ', [DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.debug}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html)
@@ -174,7 +175,7 @@ _inherited_
The equality operator. [...](https://api.flutter.dev/flutter/widgets/Widget/operator_equals.html)
-_@[nonVirtual](https://pub.dev/documentation/meta/1.3.0/meta/nonVirtual-constant.html), inherited_
+_@[nonVirtual](https://pub.dev/documentation/meta/1.7.0/meta/nonVirtual-constant.html), inherited_
diff --git a/doc/api/components_modes_toolbar/ModesToolbar/ModesToolbar.md b/doc/api/components_modes_toolbar/ModesToolbar/ModesToolbar.md
index 36cc23bd..01109820 100644
--- a/doc/api/components_modes_toolbar/ModesToolbar/ModesToolbar.md
+++ b/doc/api/components_modes_toolbar/ModesToolbar/ModesToolbar.md
@@ -6,10 +6,11 @@
+ *[](https://dart.dev/null-safety)*
-ModesToolbar({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) deviceId})
+ModesToolbar({[String](https://api.flutter.dev/flutter/dart-core/String-class.html)? deviceId})
diff --git a/doc/api/components_modes_toolbar/ModesToolbar/build.md b/doc/api/components_modes_toolbar/ModesToolbar/build.md
index 9d1c4f11..8af25777 100644
--- a/doc/api/components_modes_toolbar/ModesToolbar/build.md
+++ b/doc/api/components_modes_toolbar/ModesToolbar/build.md
@@ -6,6 +6,7 @@
+ *[](https://dart.dev/null-safety)*
@@ -68,8 +69,8 @@ Widget build(BuildContext context) {
icon: Text("A"),
onPressed: () {
if (deviceId != null) {
- thermostatProvider?.setThermostatMode(
- deviceId, ThermostatMode.auto);
+ thermostatProvider.setThermostatMode(
+ deviceId!, GThermostatMode.AUTO);
}
},
),
@@ -77,8 +78,8 @@ Widget build(BuildContext context) {
icon: Icon(Icons.ac_unit),
onPressed: () {
if (deviceId != null) {
- thermostatProvider?.setThermostatMode(
- deviceId, ThermostatMode.cool);
+ thermostatProvider.setThermostatMode(
+ deviceId!, GThermostatMode.COOL);
}
},
),
@@ -86,8 +87,8 @@ Widget build(BuildContext context) {
icon: Icon(Icons.whatshot),
onPressed: () {
if (deviceId != null) {
- thermostatProvider?.setThermostatMode(
- deviceId, ThermostatMode.heat);
+ thermostatProvider.setThermostatMode(
+ deviceId!, GThermostatMode.HEAT);
}
},
),
@@ -95,8 +96,8 @@ Widget build(BuildContext context) {
icon: Icon(Icons.eco),
onPressed: () {
if (deviceId != null) {
- thermostatProvider?.setThermostatMode(
- deviceId, ThermostatMode.airflow);
+ thermostatProvider.setThermostatMode(
+ deviceId!, GThermostatMode.AIRFLOW);
}
},
),
diff --git a/doc/api/components_modes_toolbar/ModesToolbar/deviceId.md b/doc/api/components_modes_toolbar/ModesToolbar/deviceId.md
index 1c98862a..f1ae9f2d 100644
--- a/doc/api/components_modes_toolbar/ModesToolbar/deviceId.md
+++ b/doc/api/components_modes_toolbar/ModesToolbar/deviceId.md
@@ -6,9 +6,10 @@
+ *[](https://dart.dev/null-safety)*
-[String](https://api.flutter.dev/flutter/dart-core/String-class.html) deviceId
+[String](https://api.flutter.dev/flutter/dart-core/String-class.html)? deviceId
_final_
@@ -20,7 +21,7 @@ _final_
## Implementation
```dart
-final String deviceId;
+final String? deviceId;
```
diff --git a/doc/api/components_modes_toolbar/components_modes_toolbar-library.md b/doc/api/components_modes_toolbar/components_modes_toolbar-library.md
index 924a24ef..4a8787da 100644
--- a/doc/api/components_modes_toolbar/components_modes_toolbar-library.md
+++ b/doc/api/components_modes_toolbar/components_modes_toolbar-library.md
@@ -8,6 +8,7 @@
+ *[](https://dart.dev/null-safety)*
diff --git a/doc/api/components_thermostat_widget/ThermostatWidget-class.md b/doc/api/components_thermostat_widget/ThermostatWidget-class.md
index 0323f4a5..72027158 100644
--- a/doc/api/components_thermostat_widget/ThermostatWidget-class.md
+++ b/doc/api/components_thermostat_widget/ThermostatWidget-class.md
@@ -8,6 +8,7 @@
+ *[](https://dart.dev/null-safety)*
@@ -40,11 +41,11 @@
The hash code for this object. [...](https://api.flutter.dev/flutter/widgets/Widget/hashCode.html)
-_@[nonVirtual](https://pub.dev/documentation/meta/1.3.0/meta/nonVirtual-constant.html), read-only, inherited_
+_@[nonVirtual](https://pub.dev/documentation/meta/1.7.0/meta/nonVirtual-constant.html), read-only, inherited_
-##### [key](https://api.flutter.dev/flutter/widgets/Widget/key.html) → [Key](https://api.flutter.dev/flutter/foundation/Key-class.html)
+##### [key](https://api.flutter.dev/flutter/widgets/Widget/key.html) → [Key](https://api.flutter.dev/flutter/foundation/Key-class.html)?
@@ -89,7 +90,7 @@ _inherited_
Returns a list of DiagnosticsNode
objects describing this node's
children. [...](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/debugDescribeChildren.html)
-_@[protected](https://pub.dev/documentation/meta/1.3.0/meta/protected-constant.html), inherited_
+_@[protected](https://pub.dev/documentation/meta/1.7.0/meta/protected-constant.html), inherited_
@@ -111,7 +112,7 @@ _inherited_
-##### [toDiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toDiagnosticsNode.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) name, [DiagnosticsTreeStyle](https://api.flutter.dev/flutter/foundation/DiagnosticsTreeStyle-class.html) style}) [DiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticsNode-class.html)
+##### [toDiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toDiagnosticsNode.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html)? name, [DiagnosticsTreeStyle](https://api.flutter.dev/flutter/foundation/DiagnosticsTreeStyle.html)? style}) [DiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticsNode-class.html)
@@ -121,7 +122,7 @@ _inherited_
-##### [toString](https://api.flutter.dev/flutter/foundation/Diagnosticable/toString.html)({[DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel-class.html) minLevel = DiagnosticLevel.info}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html)
+##### [toString](https://api.flutter.dev/flutter/foundation/Diagnosticable/toString.html)({[DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.info}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html)
@@ -130,7 +131,7 @@ _inherited_
-##### [toStringDeep](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toStringDeep.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) prefixLineOne = '', [String](https://api.flutter.dev/flutter/dart-core/String-class.html) prefixOtherLines, [DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel-class.html) minLevel = DiagnosticLevel.debug}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html)
+##### [toStringDeep](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toStringDeep.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) prefixLineOne = '', [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? prefixOtherLines, [DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.debug}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html)
@@ -139,7 +140,7 @@ _inherited_
-##### [toStringShallow](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toStringShallow.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) joiner = ', ', [DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel-class.html) minLevel = DiagnosticLevel.debug}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html)
+##### [toStringShallow](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toStringShallow.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) joiner = ', ', [DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.debug}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html)
@@ -165,7 +166,7 @@ _inherited_
The equality operator. [...](https://api.flutter.dev/flutter/widgets/Widget/operator_equals.html)
-_@[nonVirtual](https://pub.dev/documentation/meta/1.3.0/meta/nonVirtual-constant.html), inherited_
+_@[nonVirtual](https://pub.dev/documentation/meta/1.7.0/meta/nonVirtual-constant.html), inherited_
diff --git a/doc/api/components_thermostat_widget/ThermostatWidget/ThermostatWidget.md b/doc/api/components_thermostat_widget/ThermostatWidget/ThermostatWidget.md
index 711d8a98..464cd06f 100644
--- a/doc/api/components_thermostat_widget/ThermostatWidget/ThermostatWidget.md
+++ b/doc/api/components_thermostat_widget/ThermostatWidget/ThermostatWidget.md
@@ -6,6 +6,7 @@
+ *[](https://dart.dev/null-safety)*
diff --git a/doc/api/components_thermostat_widget/ThermostatWidget/build.md b/doc/api/components_thermostat_widget/ThermostatWidget/build.md
index 1de05dec..52aeda3f 100644
--- a/doc/api/components_thermostat_widget/ThermostatWidget/build.md
+++ b/doc/api/components_thermostat_widget/ThermostatWidget/build.md
@@ -6,6 +6,7 @@
+ *[](https://dart.dev/null-safety)*
@@ -67,25 +68,21 @@ Widget build(BuildContext context) {
Row(
children: [
Text(
- thermostatProvider?.deviceDetail?.displayName ?? '',
+ thermostatProvider.deviceDetail?.displayName ?? '',
style: Theme.of(context).textTheme.headline6,
),
],
),
Padding(
padding: const EdgeInsets.only(top: 16.0),
- child:
- ModesToolbar(deviceId: thermostatProvider?.deviceDetail?.id)),
+ child: ModesToolbar(deviceId: thermostatProvider.deviceDetail?.id)),
SizedBox(
height: 60,
),
Center(
child: Arc(
centerWidget: Text(
- thermostatProvider.thermostatTargetTemperature
- ?.toInt()
- ?.toString() ??
- '0',
+ thermostatProvider.thermostatTargetTemperature.toInt().toString(),
style: Theme.of(context).textTheme.headline2,
),
initialValue: 20.0,
diff --git a/doc/api/components_thermostat_widget/components_thermostat_widget-library.md b/doc/api/components_thermostat_widget/components_thermostat_widget-library.md
index a0ae6b8c..642603bf 100644
--- a/doc/api/components_thermostat_widget/components_thermostat_widget-library.md
+++ b/doc/api/components_thermostat_widget/components_thermostat_widget-library.md
@@ -8,6 +8,7 @@
+ *[](https://dart.dev/null-safety)*
diff --git a/doc/api/devices_lock/Lock-class.md b/doc/api/devices_lock/Lock-class.md
index cd394218..0b1ef461 100644
--- a/doc/api/devices_lock/Lock-class.md
+++ b/doc/api/devices_lock/Lock-class.md
@@ -8,6 +8,7 @@
+ *[](https://dart.dev/null-safety)*
@@ -28,7 +29,7 @@
## Constructors
-[Lock](../devices_lock/Lock/Lock.md) ({[Key](https://api.flutter.dev/flutter/foundation/Key-class.html) key, @[required](https://pub.dev/documentation/meta/1.3.0/meta/required-constant.html) [Request](https://pub.dev/documentation/yonomi_platform_sdk/1.0.5/request_request/Request-class.html) request, @[required](https://pub.dev/documentation/meta/1.3.0/meta/required-constant.html) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) deviceId})
+[Lock](../devices_lock/Lock/Lock.md) ({[Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? key, required [Request](https://yonomi.co/yonomi-sdk/Request-class.html) request, required [String](https://api.flutter.dev/flutter/dart-core/String-class.html) deviceId})
_const_
@@ -49,11 +50,11 @@ _final_
The hash code for this object. [...](https://api.flutter.dev/flutter/widgets/Widget/hashCode.html)
-_@[nonVirtual](https://pub.dev/documentation/meta/1.3.0/meta/nonVirtual-constant.html), read-only, inherited_
+_@[nonVirtual](https://pub.dev/documentation/meta/1.7.0/meta/nonVirtual-constant.html), read-only, inherited_
-##### [key](https://api.flutter.dev/flutter/widgets/Widget/key.html) → [Key](https://api.flutter.dev/flutter/foundation/Key-class.html)
+##### [key](https://api.flutter.dev/flutter/widgets/Widget/key.html) → [Key](https://api.flutter.dev/flutter/foundation/Key-class.html)?
@@ -62,7 +63,7 @@ _final, inherited_
-##### [request](../devices_lock/Lock/request.md) → [Request](https://pub.dev/documentation/yonomi_platform_sdk/1.0.5/request_request/Request-class.html)
+##### [request](../devices_lock/Lock/request.md) → [Request](https://yonomi.co/yonomi-sdk/Request-class.html)
@@ -107,7 +108,7 @@ _inherited_
Returns a list of DiagnosticsNode
objects describing this node's
children. [...](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/debugDescribeChildren.html)
-_@[protected](https://pub.dev/documentation/meta/1.3.0/meta/protected-constant.html), inherited_
+_@[protected](https://pub.dev/documentation/meta/1.7.0/meta/protected-constant.html), inherited_
@@ -129,7 +130,7 @@ _inherited_
-##### [toDiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toDiagnosticsNode.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) name, [DiagnosticsTreeStyle](https://api.flutter.dev/flutter/foundation/DiagnosticsTreeStyle-class.html) style}) [DiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticsNode-class.html)
+##### [toDiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toDiagnosticsNode.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html)? name, [DiagnosticsTreeStyle](https://api.flutter.dev/flutter/foundation/DiagnosticsTreeStyle.html)? style}) [DiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticsNode-class.html)
@@ -139,7 +140,7 @@ _inherited_
-##### [toString](https://api.flutter.dev/flutter/foundation/Diagnosticable/toString.html)({[DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel-class.html) minLevel = DiagnosticLevel.info}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html)
+##### [toString](https://api.flutter.dev/flutter/foundation/Diagnosticable/toString.html)({[DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.info}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html)
@@ -148,7 +149,7 @@ _inherited_
-##### [toStringDeep](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toStringDeep.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) prefixLineOne = '', [String](https://api.flutter.dev/flutter/dart-core/String-class.html) prefixOtherLines, [DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel-class.html) minLevel = DiagnosticLevel.debug}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html)
+##### [toStringDeep](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toStringDeep.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) prefixLineOne = '', [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? prefixOtherLines, [DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.debug}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html)
@@ -157,7 +158,7 @@ _inherited_
-##### [toStringShallow](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toStringShallow.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) joiner = ', ', [DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel-class.html) minLevel = DiagnosticLevel.debug}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html)
+##### [toStringShallow](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toStringShallow.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) joiner = ', ', [DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.debug}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html)
@@ -183,7 +184,7 @@ _inherited_
The equality operator. [...](https://api.flutter.dev/flutter/widgets/Widget/operator_equals.html)
-_@[nonVirtual](https://pub.dev/documentation/meta/1.3.0/meta/nonVirtual-constant.html), inherited_
+_@[nonVirtual](https://pub.dev/documentation/meta/1.7.0/meta/nonVirtual-constant.html), inherited_
diff --git a/doc/api/devices_lock/Lock/Lock.md b/doc/api/devices_lock/Lock/Lock.md
index 2fa0f4b5..fd9d3e45 100644
--- a/doc/api/devices_lock/Lock/Lock.md
+++ b/doc/api/devices_lock/Lock/Lock.md
@@ -6,10 +6,11 @@
+ *[](https://dart.dev/null-safety)*
const
-Lock({[Key](https://api.flutter.dev/flutter/foundation/Key-class.html) key, @[required](https://pub.dev/documentation/meta/1.3.0/meta/required-constant.html) [Request](https://pub.dev/documentation/yonomi_platform_sdk/1.0.5/request_request/Request-class.html) request, @[required](https://pub.dev/documentation/meta/1.3.0/meta/required-constant.html) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) deviceId})
+Lock({[Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? key, required [Request](https://yonomi.co/yonomi-sdk/Request-class.html) request, required [String](https://api.flutter.dev/flutter/dart-core/String-class.html) deviceId})
@@ -18,7 +19,7 @@ Lock({[Key](https://api.flutter.dev/flutter/foundation/Key-class.html) key, @[re
## Implementation
```dart
-const Lock({Key key, @required this.request, @required this.deviceId})
+const Lock({Key? key, required this.request, required this.deviceId})
: super(key: key);
```
diff --git a/doc/api/devices_lock/Lock/build.md b/doc/api/devices_lock/Lock/build.md
index 9da08876..99b15834 100644
--- a/doc/api/devices_lock/Lock/build.md
+++ b/doc/api/devices_lock/Lock/build.md
@@ -6,6 +6,7 @@
+ *[](https://dart.dev/null-safety)*
diff --git a/doc/api/devices_lock/Lock/deviceId.md b/doc/api/devices_lock/Lock/deviceId.md
index 1c98862a..34b8f530 100644
--- a/doc/api/devices_lock/Lock/deviceId.md
+++ b/doc/api/devices_lock/Lock/deviceId.md
@@ -6,6 +6,7 @@
+ *[](https://dart.dev/null-safety)*
[String](https://api.flutter.dev/flutter/dart-core/String-class.html) deviceId
diff --git a/doc/api/devices_lock/Lock/request.md b/doc/api/devices_lock/Lock/request.md
index b14a2709..c1241862 100644
--- a/doc/api/devices_lock/Lock/request.md
+++ b/doc/api/devices_lock/Lock/request.md
@@ -6,9 +6,10 @@
+ *[](https://dart.dev/null-safety)*
-[Request](https://pub.dev/documentation/yonomi_platform_sdk/1.0.5/request_request/Request-class.html) request
+[Request](https://yonomi.co/yonomi-sdk/Request-class.html) request
_final_
diff --git a/doc/api/devices_lock/devices_lock-library.md b/doc/api/devices_lock/devices_lock-library.md
index 0e18efc2..8c829097 100644
--- a/doc/api/devices_lock/devices_lock-library.md
+++ b/doc/api/devices_lock/devices_lock-library.md
@@ -8,6 +8,7 @@
+ *[](https://dart.dev/null-safety)*
diff --git a/doc/api/devices_thermostat/Thermostat-class.md b/doc/api/devices_thermostat/Thermostat-class.md
index 1cf565ba..2feba71c 100644
--- a/doc/api/devices_thermostat/Thermostat-class.md
+++ b/doc/api/devices_thermostat/Thermostat-class.md
@@ -8,6 +8,7 @@
+ *[](https://dart.dev/null-safety)*
@@ -28,7 +29,7 @@
## Constructors
-[Thermostat](../devices_thermostat/Thermostat/Thermostat.md) ({[Key](https://api.flutter.dev/flutter/foundation/Key-class.html) key, @[required](https://pub.dev/documentation/meta/1.3.0/meta/required-constant.html) [Request](https://pub.dev/documentation/yonomi_platform_sdk/1.0.5/request_request/Request-class.html) request, @[required](https://pub.dev/documentation/meta/1.3.0/meta/required-constant.html) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) deviceId})
+[Thermostat](../devices_thermostat/Thermostat/Thermostat.md) ({[Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? key, required [Request](https://yonomi.co/yonomi-sdk/Request-class.html) request, required [String](https://api.flutter.dev/flutter/dart-core/String-class.html) deviceId})
_const_
@@ -49,11 +50,11 @@ _final_
The hash code for this object. [...](https://api.flutter.dev/flutter/widgets/Widget/hashCode.html)
-_@[nonVirtual](https://pub.dev/documentation/meta/1.3.0/meta/nonVirtual-constant.html), read-only, inherited_
+_@[nonVirtual](https://pub.dev/documentation/meta/1.7.0/meta/nonVirtual-constant.html), read-only, inherited_
-##### [key](https://api.flutter.dev/flutter/widgets/Widget/key.html) → [Key](https://api.flutter.dev/flutter/foundation/Key-class.html)
+##### [key](https://api.flutter.dev/flutter/widgets/Widget/key.html) → [Key](https://api.flutter.dev/flutter/foundation/Key-class.html)?
@@ -62,7 +63,7 @@ _final, inherited_
-##### [request](../devices_thermostat/Thermostat/request.md) → [Request](https://pub.dev/documentation/yonomi_platform_sdk/1.0.5/request_request/Request-class.html)
+##### [request](../devices_thermostat/Thermostat/request.md) → [Request](https://yonomi.co/yonomi-sdk/Request-class.html)
@@ -107,7 +108,7 @@ _inherited_
Returns a list of DiagnosticsNode
objects describing this node's
children. [...](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/debugDescribeChildren.html)
-_@[protected](https://pub.dev/documentation/meta/1.3.0/meta/protected-constant.html), inherited_
+_@[protected](https://pub.dev/documentation/meta/1.7.0/meta/protected-constant.html), inherited_
@@ -129,7 +130,7 @@ _inherited_
-##### [toDiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toDiagnosticsNode.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) name, [DiagnosticsTreeStyle](https://api.flutter.dev/flutter/foundation/DiagnosticsTreeStyle-class.html) style}) [DiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticsNode-class.html)
+##### [toDiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toDiagnosticsNode.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html)? name, [DiagnosticsTreeStyle](https://api.flutter.dev/flutter/foundation/DiagnosticsTreeStyle.html)? style}) [DiagnosticsNode](https://api.flutter.dev/flutter/foundation/DiagnosticsNode-class.html)
@@ -139,7 +140,7 @@ _inherited_
-##### [toString](https://api.flutter.dev/flutter/foundation/Diagnosticable/toString.html)({[DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel-class.html) minLevel = DiagnosticLevel.info}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html)
+##### [toString](https://api.flutter.dev/flutter/foundation/Diagnosticable/toString.html)({[DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.info}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html)
@@ -148,7 +149,7 @@ _inherited_
-##### [toStringDeep](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toStringDeep.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) prefixLineOne = '', [String](https://api.flutter.dev/flutter/dart-core/String-class.html) prefixOtherLines, [DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel-class.html) minLevel = DiagnosticLevel.debug}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html)
+##### [toStringDeep](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toStringDeep.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) prefixLineOne = '', [String](https://api.flutter.dev/flutter/dart-core/String-class.html)? prefixOtherLines, [DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.debug}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html)
@@ -157,7 +158,7 @@ _inherited_
-##### [toStringShallow](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toStringShallow.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) joiner = ', ', [DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel-class.html) minLevel = DiagnosticLevel.debug}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html)
+##### [toStringShallow](https://api.flutter.dev/flutter/foundation/DiagnosticableTree/toStringShallow.html)({[String](https://api.flutter.dev/flutter/dart-core/String-class.html) joiner = ', ', [DiagnosticLevel](https://api.flutter.dev/flutter/foundation/DiagnosticLevel.html) minLevel = DiagnosticLevel.debug}) [String](https://api.flutter.dev/flutter/dart-core/String-class.html)
@@ -183,7 +184,7 @@ _inherited_
The equality operator. [...](https://api.flutter.dev/flutter/widgets/Widget/operator_equals.html)
-_@[nonVirtual](https://pub.dev/documentation/meta/1.3.0/meta/nonVirtual-constant.html), inherited_
+_@[nonVirtual](https://pub.dev/documentation/meta/1.7.0/meta/nonVirtual-constant.html), inherited_
diff --git a/doc/api/devices_thermostat/Thermostat/Thermostat.md b/doc/api/devices_thermostat/Thermostat/Thermostat.md
index fa6318e5..31d0ca2a 100644
--- a/doc/api/devices_thermostat/Thermostat/Thermostat.md
+++ b/doc/api/devices_thermostat/Thermostat/Thermostat.md
@@ -6,10 +6,11 @@
+ *[](https://dart.dev/null-safety)*
const
-Thermostat({[Key](https://api.flutter.dev/flutter/foundation/Key-class.html) key, @[required](https://pub.dev/documentation/meta/1.3.0/meta/required-constant.html) [Request](https://pub.dev/documentation/yonomi_platform_sdk/1.0.5/request_request/Request-class.html) request, @[required](https://pub.dev/documentation/meta/1.3.0/meta/required-constant.html) [String](https://api.flutter.dev/flutter/dart-core/String-class.html) deviceId})
+Thermostat({[Key](https://api.flutter.dev/flutter/foundation/Key-class.html)? key, required [Request](https://yonomi.co/yonomi-sdk/Request-class.html) request, required [String](https://api.flutter.dev/flutter/dart-core/String-class.html) deviceId})
@@ -18,7 +19,7 @@ Thermostat({[Key](https://api.flutter.dev/flutter/foundation/Key-class.html) key
## Implementation
```dart
-const Thermostat({Key key, @required this.request, @required this.deviceId})
+const Thermostat({Key? key, required this.request, required this.deviceId})
: super(key: key);
```
diff --git a/doc/api/devices_thermostat/Thermostat/build.md b/doc/api/devices_thermostat/Thermostat/build.md
index 1dc4d3eb..f56cd469 100644
--- a/doc/api/devices_thermostat/Thermostat/build.md
+++ b/doc/api/devices_thermostat/Thermostat/build.md
@@ -6,6 +6,7 @@
+ *[](https://dart.dev/null-safety)*
diff --git a/doc/api/devices_thermostat/Thermostat/deviceId.md b/doc/api/devices_thermostat/Thermostat/deviceId.md
index 1c98862a..34b8f530 100644
--- a/doc/api/devices_thermostat/Thermostat/deviceId.md
+++ b/doc/api/devices_thermostat/Thermostat/deviceId.md
@@ -6,6 +6,7 @@
+ *[](https://dart.dev/null-safety)*
[String](https://api.flutter.dev/flutter/dart-core/String-class.html) deviceId
diff --git a/doc/api/devices_thermostat/Thermostat/request.md b/doc/api/devices_thermostat/Thermostat/request.md
index b14a2709..c1241862 100644
--- a/doc/api/devices_thermostat/Thermostat/request.md
+++ b/doc/api/devices_thermostat/Thermostat/request.md
@@ -6,9 +6,10 @@
+ *[](https://dart.dev/null-safety)*
-[Request](https://pub.dev/documentation/yonomi_platform_sdk/1.0.5/request_request/Request-class.html) request
+[Request](https://yonomi.co/yonomi-sdk/Request-class.html) request
_final_
diff --git a/doc/api/devices_thermostat/devices_thermostat-library.md b/doc/api/devices_thermostat/devices_thermostat-library.md
index 4df65202..f428ad22 100644
--- a/doc/api/devices_thermostat/devices_thermostat-library.md
+++ b/doc/api/devices_thermostat/devices_thermostat-library.md
@@ -8,6 +8,7 @@
+ *[](https://dart.dev/null-safety)*
diff --git a/doc/api/providers_lock_provider/GetLockDetailsFunction.md b/doc/api/providers_lock_provider/GetLockDetailsFunction.md
index 27f81805..c7b1d61e 100644
--- a/doc/api/providers_lock_provider/GetLockDetailsFunction.md
+++ b/doc/api/providers_lock_provider/GetLockDetailsFunction.md
@@ -8,11 +8,12 @@
+ *[](https://dart.dev/null-safety)*
- [Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<[Device](https://pub.dev/documentation/yonomi_platform_sdk/1.0.5/repository_devices_devices_repository/Device-class.html)> GetLockDetailsFunction = [Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<[Device](https://pub.dev/documentation/yonomi_platform_sdk/1.0.5/repository_devices_devices_repository/Device-class.html)> Function([Request](https://pub.dev/documentation/yonomi_platform_sdk/1.0.5/request_request/Request-class.html) request, [String](https://api.flutter.dev/flutter/dart-core/String-class.html) id)
+ [Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<[Device](https://yonomi.co/yonomi-sdk/Device-class.html)> GetLockDetailsFunction = [Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<[Device](https://yonomi.co/yonomi-sdk/Device-class.html)> Function([Request](https://yonomi.co/yonomi-sdk/Request-class.html) request, [String](https://api.flutter.dev/flutter/dart-core/String-class.html) id)
diff --git a/doc/api/providers_lock_provider/LockProvider-class.md b/doc/api/providers_lock_provider/LockProvider-class.md
index 46111fd4..698ae19c 100644
--- a/doc/api/providers_lock_provider/LockProvider-class.md
+++ b/doc/api/providers_lock_provider/LockProvider-class.md
@@ -8,6 +8,7 @@
+ *[](https://dart.dev/null-safety)*
@@ -26,14 +27,14 @@
## Constructors
-[LockProvider](../providers_lock_provider/LockProvider/LockProvider.md) ([Request](https://pub.dev/documentation/yonomi_platform_sdk/1.0.5/request_request/Request-class.html) request, [String](https://api.flutter.dev/flutter/dart-core/String-class.html) deviceId, {[GetLockDetailsFunction](../providers_lock_provider/GetLockDetailsFunction.md) injectLockDetailsMethod})
+[LockProvider](../providers_lock_provider/LockProvider/LockProvider.md) ([Request](https://yonomi.co/yonomi-sdk/Request-class.html) request, [String](https://api.flutter.dev/flutter/dart-core/String-class.html) deviceId, {[GetLockDetailsFunction](../providers_lock_provider/GetLockDetailsFunction.md) getLockDetails = DevicesRepository.getLockDetails})
## Properties
-##### [deviceDetail](../providers_lock_provider/LockProvider/deviceDetail.md) → [Device](https://pub.dev/documentation/yonomi_platform_sdk/1.0.5/repository_devices_devices_repository/Device-class.html)
+##### [deviceDetail](../providers_lock_provider/LockProvider/deviceDetail.md) → [Device](https://yonomi.co/yonomi-sdk/Device-class.html)
@@ -56,7 +57,7 @@ _read-only, inherited_
Whether any listeners are currently registered. [...](https://api.flutter.dev/flutter/foundation/ChangeNotifier/hasListeners.html)
-_@[protected](https://pub.dev/documentation/meta/1.3.0/meta/protected-constant.html), read-only, inherited_
+_@[protected](https://pub.dev/documentation/meta/1.7.0/meta/protected-constant.html), read-only, inherited_
@@ -116,11 +117,11 @@ Discards any resources used by the object. After this is called, the
object is not in a usable state and should be discarded (calls to
addListener and removeListener will throw after the object is
disposed). [...](https://api.flutter.dev/flutter/foundation/ChangeNotifier/dispose.html)
-_@[mustCallSuper](https://pub.dev/documentation/meta/1.3.0/meta/mustCallSuper-constant.html), inherited_
+_@[mustCallSuper](https://pub.dev/documentation/meta/1.7.0/meta/mustCallSuper-constant.html), inherited_
-##### [getDeviceDetail](../providers_lock_provider/LockProvider/getDeviceDetail.md)([String](https://api.flutter.dev/flutter/dart-core/String-class.html) deviceId, {[GetLockDetailsFunction](../providers_lock_provider/GetLockDetailsFunction.md) injectLockDetailsMethod}) [Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<void>
+##### [getDeviceDetail](../providers_lock_provider/LockProvider/getDeviceDetail.md)([String](https://api.flutter.dev/flutter/dart-core/String-class.html) deviceId, {[GetLockDetailsFunction](../providers_lock_provider/GetLockDetailsFunction.md) getLockDetails = DevicesRepository.getLockDetails}) [Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<void>
@@ -129,7 +130,7 @@ _@[mustCallSuper](https://pub.dev/documentation/meta/1.3.0/meta/mustCallSuper-co
-##### [getLockTrait](../providers_lock_provider/LockProvider/getLockTrait.md)() [LockUnlockTrait](https://pub.dev/documentation/yonomi_platform_sdk/1.0.5/repository_devices_devices_repository/LockUnlockTrait-class.html)
+##### [getLockTrait](../providers_lock_provider/LockProvider/getLockTrait.md)() [LockTrait](https://yonomi.co/yonomi-sdk/LockTrait-class.html)?
@@ -152,7 +153,7 @@ _inherited_
Call all the registered listeners. [...](https://api.flutter.dev/flutter/foundation/ChangeNotifier/notifyListeners.html)
-_@[protected](https://pub.dev/documentation/meta/1.3.0/meta/protected-constant.html), @[visibleForTesting](https://pub.dev/documentation/meta/1.3.0/meta/visibleForTesting-constant.html), inherited_
+_@[protected](https://pub.dev/documentation/meta/1.7.0/meta/protected-constant.html), @[visibleForTesting](https://pub.dev/documentation/meta/1.7.0/meta/visibleForTesting-constant.html), inherited_
@@ -166,7 +167,7 @@ _inherited_
-##### [setLockUnlockAction](../providers_lock_provider/LockProvider/setLockUnlockAction.md)([String](https://api.flutter.dev/flutter/dart-core/String-class.html) deviceId, [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) setLock, {[GetLockDetailsFunction](../providers_lock_provider/GetLockDetailsFunction.md) injectLockDetailsMethod, [SendLockUnlockFunction](../providers_lock_provider/SendLockUnlockFunction.md) injectSendLockUnlockMethod}) [Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<void>
+##### [setLockUnlockAction](../providers_lock_provider/LockProvider/setLockUnlockAction.md)([String](https://api.flutter.dev/flutter/dart-core/String-class.html) deviceId, [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) setLock, {[GetLockDetailsFunction](../providers_lock_provider/GetLockDetailsFunction.md) lockDetails = DevicesRepository.getLockDetails, [SendLockUnlockFunction](../providers_lock_provider/SendLockUnlockFunction.md) sendLockUnlock = LockRepository.sendLockUnlockAction}) [Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<void>
diff --git a/doc/api/providers_lock_provider/LockProvider/LockProvider.md b/doc/api/providers_lock_provider/LockProvider/LockProvider.md
index 9793f033..c00ecc49 100644
--- a/doc/api/providers_lock_provider/LockProvider/LockProvider.md
+++ b/doc/api/providers_lock_provider/LockProvider/LockProvider.md
@@ -6,10 +6,11 @@
+ *[](https://dart.dev/null-safety)*
-LockProvider([Request](https://pub.dev/documentation/yonomi_platform_sdk/1.0.5/request_request/Request-class.html) request, [String](https://api.flutter.dev/flutter/dart-core/String-class.html) deviceId, {[GetLockDetailsFunction](../../providers_lock_provider/GetLockDetailsFunction.md) injectLockDetailsMethod})
+LockProvider([Request](https://yonomi.co/yonomi-sdk/Request-class.html) request, [String](https://api.flutter.dev/flutter/dart-core/String-class.html) deviceId, {[GetLockDetailsFunction](../../providers_lock_provider/GetLockDetailsFunction.md) getLockDetails = DevicesRepository.getLockDetails})
@@ -19,9 +20,10 @@ LockProvider([Request](https://pub.dev/documentation/yonomi_platform_sdk/1.0.5/r
```dart
LockProvider(Request request, String deviceId,
- {GetLockDetailsFunction injectLockDetailsMethod}) {
+ {GetLockDetailsFunction getLockDetails =
+ DevicesRepository.getLockDetails}) {
_request = request;
- getDeviceDetail(deviceId, injectLockDetailsMethod: injectLockDetailsMethod);
+ getDeviceDetail(deviceId, getLockDetails: getLockDetails);
}
```
diff --git a/doc/api/providers_lock_provider/LockProvider/deviceDetail.md b/doc/api/providers_lock_provider/LockProvider/deviceDetail.md
index bedd5ed5..60b87f80 100644
--- a/doc/api/providers_lock_provider/LockProvider/deviceDetail.md
+++ b/doc/api/providers_lock_provider/LockProvider/deviceDetail.md
@@ -6,11 +6,12 @@
+ *[](https://dart.dev/null-safety)*
-[Device](https://pub.dev/documentation/yonomi_platform_sdk/1.0.5/repository_devices_devices_repository/Device-class.html) deviceDetail
+[Device](https://yonomi.co/yonomi-sdk/Device-class.html) deviceDetail
diff --git a/doc/api/providers_lock_provider/LockProvider/getDeviceDetail.md b/doc/api/providers_lock_provider/LockProvider/getDeviceDetail.md
index d61257f4..1f0cd0a2 100644
--- a/doc/api/providers_lock_provider/LockProvider/getDeviceDetail.md
+++ b/doc/api/providers_lock_provider/LockProvider/getDeviceDetail.md
@@ -6,12 +6,13 @@
+ *[](https://dart.dev/null-safety)*
[Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<void> getDeviceDetail
-([String](https://api.flutter.dev/flutter/dart-core/String-class.html) deviceId, {[GetLockDetailsFunction](../../providers_lock_provider/GetLockDetailsFunction.md) injectLockDetailsMethod})
+([String](https://api.flutter.dev/flutter/dart-core/String-class.html) deviceId, {[GetLockDetailsFunction](../../providers_lock_provider/GetLockDetailsFunction.md) getLockDetails = DevicesRepository.getLockDetails})
@@ -24,14 +25,12 @@
```dart
Future getDeviceDetail(String deviceId,
- {GetLockDetailsFunction injectLockDetailsMethod}) async {
- final getLockDetailsMethod =
- injectLockDetailsMethod ?? DevicesRepository.getLockDetails;
-
+ {GetLockDetailsFunction getLockDetails =
+ DevicesRepository.getLockDetails}) async {
loadingDetail = true;
notifyListeners();
- _deviceDetail = await getLockDetailsMethod(_request, deviceId);
+ _deviceDetail = await getLockDetails(_request, deviceId);
loadingDetail = false;
notifyListeners();
diff --git a/doc/api/providers_lock_provider/LockProvider/getLockTrait.md b/doc/api/providers_lock_provider/LockProvider/getLockTrait.md
index 93030d89..42641eae 100644
--- a/doc/api/providers_lock_provider/LockProvider/getLockTrait.md
+++ b/doc/api/providers_lock_provider/LockProvider/getLockTrait.md
@@ -6,11 +6,12 @@
+ *[](https://dart.dev/null-safety)*
-[LockUnlockTrait](https://pub.dev/documentation/yonomi_platform_sdk/1.0.5/repository_devices_devices_repository/LockUnlockTrait-class.html) getLockTrait
+[LockTrait](https://yonomi.co/yonomi-sdk/LockTrait-class.html)? getLockTrait
()
@@ -23,8 +24,8 @@
## Implementation
```dart
-LockUnlockTrait getLockTrait() {
- return _deviceDetail?.traits?.first;
+LockTrait? getLockTrait() {
+ return _deviceDetail.traits.first as LockTrait?;
}
```
diff --git a/doc/api/providers_lock_provider/LockProvider/isLocked.md b/doc/api/providers_lock_provider/LockProvider/isLocked.md
index 5f419779..2ffe81df 100644
--- a/doc/api/providers_lock_provider/LockProvider/isLocked.md
+++ b/doc/api/providers_lock_provider/LockProvider/isLocked.md
@@ -6,6 +6,7 @@
+ *[](https://dart.dev/null-safety)*
@@ -22,7 +23,7 @@
## Implementation
```dart
-bool get isLocked => getLockTrait()?.state?.value ?? false;
+bool get isLocked => getLockTrait()?.state.value ?? false;
```
diff --git a/doc/api/providers_lock_provider/LockProvider/loadingAction.md b/doc/api/providers_lock_provider/LockProvider/loadingAction.md
index 299aa3d6..a2424594 100644
--- a/doc/api/providers_lock_provider/LockProvider/loadingAction.md
+++ b/doc/api/providers_lock_provider/LockProvider/loadingAction.md
@@ -6,6 +6,7 @@
+ *[](https://dart.dev/null-safety)*
[bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) loadingAction
diff --git a/doc/api/providers_lock_provider/LockProvider/loadingDetail.md b/doc/api/providers_lock_provider/LockProvider/loadingDetail.md
index 2bcc5a19..582653d8 100644
--- a/doc/api/providers_lock_provider/LockProvider/loadingDetail.md
+++ b/doc/api/providers_lock_provider/LockProvider/loadingDetail.md
@@ -6,6 +6,7 @@
+ *[](https://dart.dev/null-safety)*
[bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) loadingDetail
diff --git a/doc/api/providers_lock_provider/LockProvider/setLockUnlockAction.md b/doc/api/providers_lock_provider/LockProvider/setLockUnlockAction.md
index a7ecea9f..d761f783 100644
--- a/doc/api/providers_lock_provider/LockProvider/setLockUnlockAction.md
+++ b/doc/api/providers_lock_provider/LockProvider/setLockUnlockAction.md
@@ -6,12 +6,13 @@
+ *[](https://dart.dev/null-safety)*
[Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<void> setLockUnlockAction
-([String](https://api.flutter.dev/flutter/dart-core/String-class.html) deviceId, [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) setLock, {[GetLockDetailsFunction](../../providers_lock_provider/GetLockDetailsFunction.md) injectLockDetailsMethod, [SendLockUnlockFunction](../../providers_lock_provider/SendLockUnlockFunction.md) injectSendLockUnlockMethod})
+([String](https://api.flutter.dev/flutter/dart-core/String-class.html) deviceId, [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) setLock, {[GetLockDetailsFunction](../../providers_lock_provider/GetLockDetailsFunction.md) lockDetails = DevicesRepository.getLockDetails, [SendLockUnlockFunction](../../providers_lock_provider/SendLockUnlockFunction.md) sendLockUnlock = LockRepository.sendLockUnlockAction})
@@ -24,24 +25,20 @@
```dart
Future setLockUnlockAction(String deviceId, bool setLock,
- {GetLockDetailsFunction injectLockDetailsMethod,
- SendLockUnlockFunction injectSendLockUnlockMethod}) async {
- final getLockDetailsMethod =
- injectLockDetailsMethod ?? DevicesRepository.getLockDetails;
- final sendLockUnlockMethod =
- injectSendLockUnlockMethod ?? LockRepository.sendLockUnlockAction;
-
+ {GetLockDetailsFunction lockDetails = DevicesRepository.getLockDetails,
+ SendLockUnlockFunction sendLockUnlock =
+ LockRepository.sendLockUnlockAction}) async {
if (!loadingAction) {
loadingAction = true;
notifyListeners();
- await sendLockUnlockMethod(_request, deviceId, setLock);
+ await sendLockUnlock(_request, deviceId, setLock);
var maxRetries = 0;
- while (getLockTrait()?.state?.value != setLock && maxRetries < 10) {
+ while (getLockTrait()?.state.value != setLock && maxRetries < 10) {
// Wait more time
- _deviceDetail = await getLockDetailsMethod(_request, deviceId);
+ _deviceDetail = await lockDetails(_request, deviceId);
await Future.delayed(Duration(milliseconds: 750));
maxRetries++;
}
diff --git a/doc/api/providers_lock_provider/SendLockUnlockFunction.md b/doc/api/providers_lock_provider/SendLockUnlockFunction.md
index c192f8cc..36d448d6 100644
--- a/doc/api/providers_lock_provider/SendLockUnlockFunction.md
+++ b/doc/api/providers_lock_provider/SendLockUnlockFunction.md
@@ -8,11 +8,12 @@
+ *[](https://dart.dev/null-safety)*
- [Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<void> SendLockUnlockFunction = [Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<void> Function([Request](https://pub.dev/documentation/yonomi_platform_sdk/1.0.5/request_request/Request-class.html) request, [String](https://api.flutter.dev/flutter/dart-core/String-class.html) id, [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) lockUnlock)
+ [Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<void> SendLockUnlockFunction = [Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<void> Function([Request](https://yonomi.co/yonomi-sdk/Request-class.html) request, [String](https://api.flutter.dev/flutter/dart-core/String-class.html) id, [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) lockUnlock)
diff --git a/doc/api/providers_lock_provider/providers_lock_provider-library.md b/doc/api/providers_lock_provider/providers_lock_provider-library.md
index b286caa3..9f8b1be6 100644
--- a/doc/api/providers_lock_provider/providers_lock_provider-library.md
+++ b/doc/api/providers_lock_provider/providers_lock_provider-library.md
@@ -8,6 +8,7 @@
+ *[](https://dart.dev/null-safety)*
@@ -32,7 +33,7 @@
## Typedefs
- ##### [GetLockDetailsFunction](../providers_lock_provider/GetLockDetailsFunction.md) = [Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<[Device](https://pub.dev/documentation/yonomi_platform_sdk/1.0.5/repository_devices_devices_repository/Device-class.html)> Function([Request](https://pub.dev/documentation/yonomi_platform_sdk/1.0.5/request_request/Request-class.html) request, [String](https://api.flutter.dev/flutter/dart-core/String-class.html) id)
+ ##### [GetLockDetailsFunction](../providers_lock_provider/GetLockDetailsFunction.md) = [Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<[Device](https://yonomi.co/yonomi-sdk/Device-class.html)> Function([Request](https://yonomi.co/yonomi-sdk/Request-class.html) request, [String](https://api.flutter.dev/flutter/dart-core/String-class.html) id)
@@ -42,7 +43,7 @@
- ##### [SendLockUnlockFunction](../providers_lock_provider/SendLockUnlockFunction.md) = [Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<void> Function([Request](https://pub.dev/documentation/yonomi_platform_sdk/1.0.5/request_request/Request-class.html) request, [String](https://api.flutter.dev/flutter/dart-core/String-class.html) id, [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) lockUnlock)
+ ##### [SendLockUnlockFunction](../providers_lock_provider/SendLockUnlockFunction.md) = [Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<void> Function([Request](https://yonomi.co/yonomi-sdk/Request-class.html) request, [String](https://api.flutter.dev/flutter/dart-core/String-class.html) id, [bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) lockUnlock)
diff --git a/doc/api/providers_thermostat_provider/GetThermostatDetailsFunction.md b/doc/api/providers_thermostat_provider/GetThermostatDetailsFunction.md
index ece71b4d..07a51b78 100644
--- a/doc/api/providers_thermostat_provider/GetThermostatDetailsFunction.md
+++ b/doc/api/providers_thermostat_provider/GetThermostatDetailsFunction.md
@@ -8,11 +8,12 @@
+ *[](https://dart.dev/null-safety)*
- [Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<[Device](https://pub.dev/documentation/yonomi_platform_sdk/1.0.5/repository_devices_devices_repository/Device-class.html)> GetThermostatDetailsFunction = [Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<[Device](https://pub.dev/documentation/yonomi_platform_sdk/1.0.5/repository_devices_devices_repository/Device-class.html)> Function([Request](https://pub.dev/documentation/yonomi_platform_sdk/1.0.5/request_request/Request-class.html) request, [String](https://api.flutter.dev/flutter/dart-core/String-class.html) id)
+ [Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<[Device](https://yonomi.co/yonomi-sdk/Device-class.html)> GetThermostatDetailsFunction = [Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<[Device](https://yonomi.co/yonomi-sdk/Device-class.html)> Function([Request](https://yonomi.co/yonomi-sdk/Request-class.html) request, [String](https://api.flutter.dev/flutter/dart-core/String-class.html) id)
diff --git a/doc/api/providers_thermostat_provider/SetModeFunction.md b/doc/api/providers_thermostat_provider/SetModeFunction.md
index 3c35d22f..ab937254 100644
--- a/doc/api/providers_thermostat_provider/SetModeFunction.md
+++ b/doc/api/providers_thermostat_provider/SetModeFunction.md
@@ -8,11 +8,12 @@
+ *[](https://dart.dev/null-safety)*
- [Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<void> SetModeFunction = [Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<void> Function([Request](https://pub.dev/documentation/yonomi_platform_sdk/1.0.5/request_request/Request-class.html) request, [String](https://api.flutter.dev/flutter/dart-core/String-class.html) id, [ThermostatMode](https://pub.dev/documentation/yonomi_platform_sdk/1.0.5/graphql_devices_thermostat_thermostat_queries.graphql/ThermostatMode-class.html) mode)
+ [Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<void> SetModeFunction = [Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<void> Function([Request](https://yonomi.co/yonomi-sdk/Request-class.html) request, [String](https://api.flutter.dev/flutter/dart-core/String-class.html) id, [GThermostatMode](https://yonomi.co/third_party_yonomi_graphql_schema_schema.docs.schema.gql/GThermostatMode-class.html) mode)
@@ -23,7 +24,7 @@
```dart
typedef SetModeFunction = Future Function(
- Request request, String id, ThermostatMode mode);
+ Request request, String id, GThermostatMode mode);
```
diff --git a/doc/api/providers_thermostat_provider/SetPointActionFunction.md b/doc/api/providers_thermostat_provider/SetPointActionFunction.md
index 408c364a..d551d9fc 100644
--- a/doc/api/providers_thermostat_provider/SetPointActionFunction.md
+++ b/doc/api/providers_thermostat_provider/SetPointActionFunction.md
@@ -8,11 +8,12 @@
+ *[](https://dart.dev/null-safety)*
- [Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<void> SetPointActionFunction = [Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<void> Function([Request](https://pub.dev/documentation/yonomi_platform_sdk/1.0.5/request_request/Request-class.html) request, [String](https://api.flutter.dev/flutter/dart-core/String-class.html) id, [double](https://api.flutter.dev/flutter/dart-core/double-class.html) temperature)
+ [Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<void> SetPointActionFunction = [Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<void> Function([Request](https://yonomi.co/yonomi-sdk/Request-class.html) request, [String](https://api.flutter.dev/flutter/dart-core/String-class.html) id, [double](https://api.flutter.dev/flutter/dart-core/double-class.html) temperature)
diff --git a/doc/api/providers_thermostat_provider/ThermostatProvider-class.md b/doc/api/providers_thermostat_provider/ThermostatProvider-class.md
index 384c2428..a156fbd8 100644
--- a/doc/api/providers_thermostat_provider/ThermostatProvider-class.md
+++ b/doc/api/providers_thermostat_provider/ThermostatProvider-class.md
@@ -8,6 +8,7 @@
+ *[](https://dart.dev/null-safety)*
@@ -26,14 +27,14 @@
## Constructors
-[ThermostatProvider](../providers_thermostat_provider/ThermostatProvider/ThermostatProvider.md) ([Request](https://pub.dev/documentation/yonomi_platform_sdk/1.0.5/request_request/Request-class.html) request, [String](https://api.flutter.dev/flutter/dart-core/String-class.html) deviceId, {[GetThermostatDetailsFunction](../providers_thermostat_provider/GetThermostatDetailsFunction.md) injectGetThermostatDetailsMethod})
+[ThermostatProvider](../providers_thermostat_provider/ThermostatProvider/ThermostatProvider.md) ([Request](https://yonomi.co/yonomi-sdk/Request-class.html) request, [String](https://api.flutter.dev/flutter/dart-core/String-class.html) deviceId, {[GetThermostatDetailsFunction](../providers_thermostat_provider/GetThermostatDetailsFunction.md) getThermostatDetails = DevicesRepository.getThermostatDetails})
## Properties
-##### [deviceDetail](../providers_thermostat_provider/ThermostatProvider/deviceDetail.md) → [Device](https://pub.dev/documentation/yonomi_platform_sdk/1.0.5/repository_devices_devices_repository/Device-class.html)
+##### [deviceDetail](../providers_thermostat_provider/ThermostatProvider/deviceDetail.md) → [Device](https://yonomi.co/yonomi-sdk/Device-class.html)?
@@ -56,7 +57,7 @@ _read-only, inherited_
Whether any listeners are currently registered. [...](https://api.flutter.dev/flutter/foundation/ChangeNotifier/hasListeners.html)
-_@[protected](https://pub.dev/documentation/meta/1.3.0/meta/protected-constant.html), read-only, inherited_
+_@[protected](https://pub.dev/documentation/meta/1.7.0/meta/protected-constant.html), read-only, inherited_
@@ -98,11 +99,11 @@ Discards any resources used by the object. After this is called, the
object is not in a usable state and should be discarded (calls to
addListener and removeListener will throw after the object is
disposed). [...](https://api.flutter.dev/flutter/foundation/ChangeNotifier/dispose.html)
-_@[mustCallSuper](https://pub.dev/documentation/meta/1.3.0/meta/mustCallSuper-constant.html), inherited_
+_@[mustCallSuper](https://pub.dev/documentation/meta/1.7.0/meta/mustCallSuper-constant.html), inherited_
-##### [getDeviceDetail](../providers_thermostat_provider/ThermostatProvider/getDeviceDetail.md)([String](https://api.flutter.dev/flutter/dart-core/String-class.html) deviceId, {[GetThermostatDetailsFunction](../providers_thermostat_provider/GetThermostatDetailsFunction.md) injectGetThermostatDetailsMethod}) [Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<void>
+##### [getDeviceDetail](../providers_thermostat_provider/ThermostatProvider/getDeviceDetail.md)([String](https://api.flutter.dev/flutter/dart-core/String-class.html) deviceId, {[GetThermostatDetailsFunction](../providers_thermostat_provider/GetThermostatDetailsFunction.md) getThermostatDetails = DevicesRepository.getThermostatDetails}) [Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<void>
@@ -111,7 +112,7 @@ _@[mustCallSuper](https://pub.dev/documentation/meta/1.3.0/meta/mustCallSuper-co
-##### [getThermostatTrait](../providers_thermostat_provider/ThermostatProvider/getThermostatTrait.md)() [ThermostatTrait](https://pub.dev/documentation/yonomi_platform_sdk/1.0.5/repository_devices_devices_repository/ThermostatTrait-class.html)
+##### [getThermostatTrait](../providers_thermostat_provider/ThermostatProvider/getThermostatTrait.md)() [ThermostatTrait](https://yonomi.co/yonomi-sdk/ThermostatTrait-class.html)?
@@ -134,7 +135,7 @@ _inherited_
Call all the registered listeners. [...](https://api.flutter.dev/flutter/foundation/ChangeNotifier/notifyListeners.html)
-_@[protected](https://pub.dev/documentation/meta/1.3.0/meta/protected-constant.html), @[visibleForTesting](https://pub.dev/documentation/meta/1.3.0/meta/visibleForTesting-constant.html), inherited_
+_@[protected](https://pub.dev/documentation/meta/1.7.0/meta/protected-constant.html), @[visibleForTesting](https://pub.dev/documentation/meta/1.7.0/meta/visibleForTesting-constant.html), inherited_
@@ -148,7 +149,7 @@ _inherited_
-##### [setPointAction](../providers_thermostat_provider/ThermostatProvider/setPointAction.md)([String](https://api.flutter.dev/flutter/dart-core/String-class.html) deviceId, [double](https://api.flutter.dev/flutter/dart-core/double-class.html) temperature, {[SetPointActionFunction](../providers_thermostat_provider/SetPointActionFunction.md) injectSetPointThermostatMethod}) [Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<void>
+##### [setPointAction](../providers_thermostat_provider/ThermostatProvider/setPointAction.md)([String](https://api.flutter.dev/flutter/dart-core/String-class.html) deviceId, [double](https://api.flutter.dev/flutter/dart-core/double-class.html) temperature, {[SetPointActionFunction](../providers_thermostat_provider/SetPointActionFunction.md) setPoint = ThermostatRepository.setPointThermostat}) [Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<void>
@@ -157,7 +158,7 @@ _inherited_
-##### [setThermostatMode](../providers_thermostat_provider/ThermostatProvider/setThermostatMode.md)([String](https://api.flutter.dev/flutter/dart-core/String-class.html) deviceId, [ThermostatMode](https://pub.dev/documentation/yonomi_platform_sdk/1.0.5/graphql_devices_thermostat_thermostat_queries.graphql/ThermostatMode-class.html) mode, {[SetModeFunction](../providers_thermostat_provider/SetModeFunction.md) injectSetModeMethod}) [Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<void>
+##### [setThermostatMode](../providers_thermostat_provider/ThermostatProvider/setThermostatMode.md)([String](https://api.flutter.dev/flutter/dart-core/String-class.html) deviceId, [GThermostatMode](https://yonomi.co/third_party_yonomi_graphql_schema_schema.docs.schema.gql/GThermostatMode-class.html) mode, {[SetModeFunction](../providers_thermostat_provider/SetModeFunction.md) setMode = ThermostatRepository.setMode}) [Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<void>
diff --git a/doc/api/providers_thermostat_provider/ThermostatProvider/ThermostatProvider.md b/doc/api/providers_thermostat_provider/ThermostatProvider/ThermostatProvider.md
index 3bb9a04d..855b5aec 100644
--- a/doc/api/providers_thermostat_provider/ThermostatProvider/ThermostatProvider.md
+++ b/doc/api/providers_thermostat_provider/ThermostatProvider/ThermostatProvider.md
@@ -6,10 +6,11 @@
+ *[](https://dart.dev/null-safety)*
-ThermostatProvider([Request](https://pub.dev/documentation/yonomi_platform_sdk/1.0.5/request_request/Request-class.html) request, [String](https://api.flutter.dev/flutter/dart-core/String-class.html) deviceId, {[GetThermostatDetailsFunction](../../providers_thermostat_provider/GetThermostatDetailsFunction.md) injectGetThermostatDetailsMethod})
+ThermostatProvider([Request](https://yonomi.co/yonomi-sdk/Request-class.html) request, [String](https://api.flutter.dev/flutter/dart-core/String-class.html) deviceId, {[GetThermostatDetailsFunction](../../providers_thermostat_provider/GetThermostatDetailsFunction.md) getThermostatDetails = DevicesRepository.getThermostatDetails})
@@ -19,10 +20,10 @@ ThermostatProvider([Request](https://pub.dev/documentation/yonomi_platform_sdk/1
```dart
ThermostatProvider(Request request, String deviceId,
- {GetThermostatDetailsFunction injectGetThermostatDetailsMethod}) {
- _request = request;
- getDeviceDetail(deviceId,
- injectGetThermostatDetailsMethod: injectGetThermostatDetailsMethod);
+ {GetThermostatDetailsFunction getThermostatDetails =
+ DevicesRepository.getThermostatDetails}) {
+ this._request = request;
+ getDeviceDetail(deviceId, getThermostatDetails: getThermostatDetails);
}
```
diff --git a/doc/api/providers_thermostat_provider/ThermostatProvider/deviceDetail.md b/doc/api/providers_thermostat_provider/ThermostatProvider/deviceDetail.md
index bedd5ed5..4ad665a3 100644
--- a/doc/api/providers_thermostat_provider/ThermostatProvider/deviceDetail.md
+++ b/doc/api/providers_thermostat_provider/ThermostatProvider/deviceDetail.md
@@ -6,11 +6,12 @@
+ *[](https://dart.dev/null-safety)*
-[Device](https://pub.dev/documentation/yonomi_platform_sdk/1.0.5/repository_devices_devices_repository/Device-class.html) deviceDetail
+[Device](https://yonomi.co/yonomi-sdk/Device-class.html)? deviceDetail
@@ -22,7 +23,7 @@
## Implementation
```dart
-Device get deviceDetail => _deviceDetail;
+Device? get deviceDetail => _deviceDetail;
```
diff --git a/doc/api/providers_thermostat_provider/ThermostatProvider/getDeviceDetail.md b/doc/api/providers_thermostat_provider/ThermostatProvider/getDeviceDetail.md
index d684af8a..317bb057 100644
--- a/doc/api/providers_thermostat_provider/ThermostatProvider/getDeviceDetail.md
+++ b/doc/api/providers_thermostat_provider/ThermostatProvider/getDeviceDetail.md
@@ -6,12 +6,13 @@
+ *[](https://dart.dev/null-safety)*
[Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<void> getDeviceDetail
-([String](https://api.flutter.dev/flutter/dart-core/String-class.html) deviceId, {[GetThermostatDetailsFunction](../../providers_thermostat_provider/GetThermostatDetailsFunction.md) injectGetThermostatDetailsMethod})
+([String](https://api.flutter.dev/flutter/dart-core/String-class.html) deviceId, {[GetThermostatDetailsFunction](../../providers_thermostat_provider/GetThermostatDetailsFunction.md) getThermostatDetails = DevicesRepository.getThermostatDetails})
@@ -24,10 +25,9 @@
```dart
Future getDeviceDetail(String deviceId,
- {GetThermostatDetailsFunction injectGetThermostatDetailsMethod}) async {
- final getThermostatDetailsMethod = injectGetThermostatDetailsMethod ??
- DevicesRepository.getThermostatDetails;
- _deviceDetail = await getThermostatDetailsMethod(_request, deviceId);
+ {GetThermostatDetailsFunction getThermostatDetails =
+ DevicesRepository.getThermostatDetails}) async {
+ _deviceDetail = await getThermostatDetails(_request, deviceId);
notifyListeners();
}
```
diff --git a/doc/api/providers_thermostat_provider/ThermostatProvider/getThermostatTrait.md b/doc/api/providers_thermostat_provider/ThermostatProvider/getThermostatTrait.md
index 693e43c7..271ad4f9 100644
--- a/doc/api/providers_thermostat_provider/ThermostatProvider/getThermostatTrait.md
+++ b/doc/api/providers_thermostat_provider/ThermostatProvider/getThermostatTrait.md
@@ -6,11 +6,12 @@
+ *[](https://dart.dev/null-safety)*
-[ThermostatTrait](https://pub.dev/documentation/yonomi_platform_sdk/1.0.5/repository_devices_devices_repository/ThermostatTrait-class.html) getThermostatTrait
+[ThermostatTrait](https://yonomi.co/yonomi-sdk/ThermostatTrait-class.html)? getThermostatTrait
()
@@ -23,8 +24,8 @@
## Implementation
```dart
-ThermostatTrait getThermostatTrait() {
- return _deviceDetail?.traits?.first;
+ThermostatTrait? getThermostatTrait() {
+ return _deviceDetail?.traits.first as ThermostatTrait?;
}
```
diff --git a/doc/api/providers_thermostat_provider/ThermostatProvider/setPointAction.md b/doc/api/providers_thermostat_provider/ThermostatProvider/setPointAction.md
index 94888803..c3e93f8b 100644
--- a/doc/api/providers_thermostat_provider/ThermostatProvider/setPointAction.md
+++ b/doc/api/providers_thermostat_provider/ThermostatProvider/setPointAction.md
@@ -6,12 +6,13 @@
+ *[](https://dart.dev/null-safety)*
[Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<void> setPointAction
-([String](https://api.flutter.dev/flutter/dart-core/String-class.html) deviceId, [double](https://api.flutter.dev/flutter/dart-core/double-class.html) temperature, {[SetPointActionFunction](../../providers_thermostat_provider/SetPointActionFunction.md) injectSetPointThermostatMethod})
+([String](https://api.flutter.dev/flutter/dart-core/String-class.html) deviceId, [double](https://api.flutter.dev/flutter/dart-core/double-class.html) temperature, {[SetPointActionFunction](../../providers_thermostat_provider/SetPointActionFunction.md) setPoint = ThermostatRepository.setPointThermostat})
@@ -24,10 +25,9 @@
```dart
Future setPointAction(String deviceId, double temperature,
- {SetPointActionFunction injectSetPointThermostatMethod}) async {
- final setPointThermostatMethod = injectSetPointThermostatMethod ??
- ThermostatRepository.setPointThermostat;
- setPointThermostatMethod(_request, deviceId, temperature);
+ {SetPointActionFunction setPoint =
+ ThermostatRepository.setPointThermostat}) async {
+ setPoint(_request, deviceId, temperature);
}
```
diff --git a/doc/api/providers_thermostat_provider/ThermostatProvider/setThermostatMode.md b/doc/api/providers_thermostat_provider/ThermostatProvider/setThermostatMode.md
index eace588c..b7659fc3 100644
--- a/doc/api/providers_thermostat_provider/ThermostatProvider/setThermostatMode.md
+++ b/doc/api/providers_thermostat_provider/ThermostatProvider/setThermostatMode.md
@@ -6,12 +6,13 @@
+ *[](https://dart.dev/null-safety)*
[Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<void> setThermostatMode
-([String](https://api.flutter.dev/flutter/dart-core/String-class.html) deviceId, [ThermostatMode](https://pub.dev/documentation/yonomi_platform_sdk/1.0.5/graphql_devices_thermostat_thermostat_queries.graphql/ThermostatMode-class.html) mode, {[SetModeFunction](../../providers_thermostat_provider/SetModeFunction.md) injectSetModeMethod})
+([String](https://api.flutter.dev/flutter/dart-core/String-class.html) deviceId, [GThermostatMode](https://yonomi.co/third_party_yonomi_graphql_schema_schema.docs.schema.gql/GThermostatMode-class.html) mode, {[SetModeFunction](../../providers_thermostat_provider/SetModeFunction.md) setMode = ThermostatRepository.setMode})
@@ -23,10 +24,9 @@
## Implementation
```dart
-Future setThermostatMode(String deviceId, ThermostatMode mode,
- {SetModeFunction injectSetModeMethod}) async {
- final setModeMethod = injectSetModeMethod ?? ThermostatRepository.setMode;
- setModeMethod(_request, deviceId, mode);
+Future setThermostatMode(String deviceId, GThermostatMode mode,
+ {SetModeFunction setMode = ThermostatRepository.setMode}) async {
+ setMode(_request, deviceId, mode);
}
```
diff --git a/doc/api/providers_thermostat_provider/ThermostatProvider/thermostatTargetTemperature.md b/doc/api/providers_thermostat_provider/ThermostatProvider/thermostatTargetTemperature.md
index 34fccd62..821b7d98 100644
--- a/doc/api/providers_thermostat_provider/ThermostatProvider/thermostatTargetTemperature.md
+++ b/doc/api/providers_thermostat_provider/ThermostatProvider/thermostatTargetTemperature.md
@@ -6,6 +6,7 @@
+ *[](https://dart.dev/null-safety)*
@@ -23,7 +24,7 @@
```dart
double get thermostatTargetTemperature =>
- getThermostatTrait()?.state?.value ?? 0;
+ getThermostatTrait()?.state.value ?? 0;
```
diff --git a/doc/api/providers_thermostat_provider/providers_thermostat_provider-library.md b/doc/api/providers_thermostat_provider/providers_thermostat_provider-library.md
index da542fd1..a247f8b6 100644
--- a/doc/api/providers_thermostat_provider/providers_thermostat_provider-library.md
+++ b/doc/api/providers_thermostat_provider/providers_thermostat_provider-library.md
@@ -8,6 +8,7 @@
+ *[](https://dart.dev/null-safety)*
@@ -32,7 +33,7 @@
## Typedefs
- ##### [GetThermostatDetailsFunction](../providers_thermostat_provider/GetThermostatDetailsFunction.md) = [Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<[Device](https://pub.dev/documentation/yonomi_platform_sdk/1.0.5/repository_devices_devices_repository/Device-class.html)> Function([Request](https://pub.dev/documentation/yonomi_platform_sdk/1.0.5/request_request/Request-class.html) request, [String](https://api.flutter.dev/flutter/dart-core/String-class.html) id)
+ ##### [GetThermostatDetailsFunction](../providers_thermostat_provider/GetThermostatDetailsFunction.md) = [Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<[Device](https://yonomi.co/yonomi-sdk/Device-class.html)> Function([Request](https://yonomi.co/yonomi-sdk/Request-class.html) request, [String](https://api.flutter.dev/flutter/dart-core/String-class.html) id)
@@ -42,7 +43,7 @@
- ##### [SetModeFunction](../providers_thermostat_provider/SetModeFunction.md) = [Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<void> Function([Request](https://pub.dev/documentation/yonomi_platform_sdk/1.0.5/request_request/Request-class.html) request, [String](https://api.flutter.dev/flutter/dart-core/String-class.html) id, [ThermostatMode](https://pub.dev/documentation/yonomi_platform_sdk/1.0.5/graphql_devices_thermostat_thermostat_queries.graphql/ThermostatMode-class.html) mode)
+ ##### [SetModeFunction](../providers_thermostat_provider/SetModeFunction.md) = [Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<void> Function([Request](https://yonomi.co/yonomi-sdk/Request-class.html) request, [String](https://api.flutter.dev/flutter/dart-core/String-class.html) id, [GThermostatMode](https://yonomi.co/third_party_yonomi_graphql_schema_schema.docs.schema.gql/GThermostatMode-class.html) mode)
@@ -52,7 +53,7 @@
- ##### [SetPointActionFunction](../providers_thermostat_provider/SetPointActionFunction.md) = [Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<void> Function([Request](https://pub.dev/documentation/yonomi_platform_sdk/1.0.5/request_request/Request-class.html) request, [String](https://api.flutter.dev/flutter/dart-core/String-class.html) id, [double](https://api.flutter.dev/flutter/dart-core/double-class.html) temperature)
+ ##### [SetPointActionFunction](../providers_thermostat_provider/SetPointActionFunction.md) = [Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)<void> Function([Request](https://yonomi.co/yonomi-sdk/Request-class.html) request, [String](https://api.flutter.dev/flutter/dart-core/String-class.html) id, [double](https://api.flutter.dev/flutter/dart-core/double-class.html) temperature)
diff --git a/doc/api/ui_color_constants/ColorConstants-class.md b/doc/api/ui_color_constants/ColorConstants-class.md
index 4a621dbf..a27eb58e 100644
--- a/doc/api/ui_color_constants/ColorConstants-class.md
+++ b/doc/api/ui_color_constants/ColorConstants-class.md
@@ -8,6 +8,7 @@
+ *[](https://dart.dev/null-safety)*
diff --git a/doc/api/ui_color_constants/ColorConstants/ColorConstants.md b/doc/api/ui_color_constants/ColorConstants/ColorConstants.md
index 1465391b..a0b9776e 100644
--- a/doc/api/ui_color_constants/ColorConstants/ColorConstants.md
+++ b/doc/api/ui_color_constants/ColorConstants/ColorConstants.md
@@ -6,6 +6,7 @@
+ *[](https://dart.dev/null-safety)*
diff --git a/doc/api/ui_color_constants/ColorConstants/modesButtonPressedColor-constant.md b/doc/api/ui_color_constants/ColorConstants/modesButtonPressedColor-constant.md
index 13c14088..db2013d6 100644
--- a/doc/api/ui_color_constants/ColorConstants/modesButtonPressedColor-constant.md
+++ b/doc/api/ui_color_constants/ColorConstants/modesButtonPressedColor-constant.md
@@ -6,6 +6,7 @@
+ *[](https://dart.dev/null-safety)*
[Color](https://api.flutter.dev/flutter/dart-ui/Color-class.html) const modesButtonPressedColor
diff --git a/doc/api/ui_color_constants/ColorConstants/modesButtonUnpressedColor-constant.md b/doc/api/ui_color_constants/ColorConstants/modesButtonUnpressedColor-constant.md
index a94d347f..c988a1c7 100644
--- a/doc/api/ui_color_constants/ColorConstants/modesButtonUnpressedColor-constant.md
+++ b/doc/api/ui_color_constants/ColorConstants/modesButtonUnpressedColor-constant.md
@@ -6,6 +6,7 @@
+ *[](https://dart.dev/null-safety)*
[Color](https://api.flutter.dev/flutter/dart-ui/Color-class.html) const modesButtonUnpressedColor
diff --git a/doc/api/ui_color_constants/ui_color_constants-library.md b/doc/api/ui_color_constants/ui_color_constants-library.md
index 193e4164..1fd75afc 100644
--- a/doc/api/ui_color_constants/ui_color_constants-library.md
+++ b/doc/api/ui_color_constants/ui_color_constants-library.md
@@ -8,6 +8,7 @@
+ *[](https://dart.dev/null-safety)*
diff --git a/doc/api/ui_ring_border/RingBorder-class.md b/doc/api/ui_ring_border/RingBorder-class.md
index e5611138..5f58a389 100644
--- a/doc/api/ui_ring_border/RingBorder-class.md
+++ b/doc/api/ui_ring_border/RingBorder-class.md
@@ -8,6 +8,7 @@
+ *[](https://dart.dev/null-safety)*
@@ -85,17 +86,17 @@ _final, inherited_
## Methods
-##### [add](https://api.flutter.dev/flutter/painting/ShapeBorder/add.html)([ShapeBorder](https://api.flutter.dev/flutter/painting/ShapeBorder-class.html) other, {[bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) reversed = false}) [ShapeBorder](https://api.flutter.dev/flutter/painting/ShapeBorder-class.html)
+##### [add](https://api.flutter.dev/flutter/painting/ShapeBorder/add.html)([ShapeBorder](https://api.flutter.dev/flutter/painting/ShapeBorder-class.html) other, {[bool](https://api.flutter.dev/flutter/dart-core/bool-class.html) reversed = false}) [ShapeBorder](https://api.flutter.dev/flutter/painting/ShapeBorder-class.html)?
Attempts to create a new object that represents the amalgamation of this
border and the other
border. [...](https://api.flutter.dev/flutter/painting/ShapeBorder/add.html)
-_@[protected](https://pub.dev/documentation/meta/1.3.0/meta/protected-constant.html), inherited_
+_@[protected](https://pub.dev/documentation/meta/1.7.0/meta/protected-constant.html), inherited_
-##### [copyWith](../ui_ring_border/RingBorder/copyWith.md)({[BorderSide](https://api.flutter.dev/flutter/painting/BorderSide-class.html) side}) [RingBorder](../ui_ring_border/RingBorder-class.md)
+##### [copyWith](../ui_ring_border/RingBorder/copyWith.md)({[BorderSide](https://api.flutter.dev/flutter/painting/BorderSide-class.html)? side}) [RingBorder](../ui_ring_border/RingBorder-class.md)
@@ -105,7 +106,7 @@ _override_
-##### [getInnerPath](https://api.flutter.dev/flutter/painting/CircleBorder/getInnerPath.html)([Rect](https://api.flutter.dev/flutter/dart-ui/Rect-class.html) rect, {[TextDirection](https://api.flutter.dev/flutter/dart-ui/TextDirection-class.html) textDirection}) [Path](https://api.flutter.dev/flutter/dart-ui/Path-class.html)
+##### [getInnerPath](https://api.flutter.dev/flutter/painting/CircleBorder/getInnerPath.html)([Rect](https://api.flutter.dev/flutter/dart-ui/Rect-class.html) rect, {[TextDirection](https://api.flutter.dev/flutter/dart-ui/TextDirection.html)? textDirection}) [Path](https://api.flutter.dev/flutter/dart-ui/Path-class.html)
@@ -114,7 +115,7 @@ _inherited_
-##### [getOuterPath](https://api.flutter.dev/flutter/painting/CircleBorder/getOuterPath.html)([Rect](https://api.flutter.dev/flutter/dart-ui/Rect-class.html) rect, {[TextDirection](https://api.flutter.dev/flutter/dart-ui/TextDirection-class.html) textDirection}) [Path](https://api.flutter.dev/flutter/dart-ui/Path-class.html)
+##### [getOuterPath](https://api.flutter.dev/flutter/painting/CircleBorder/getOuterPath.html)([Rect](https://api.flutter.dev/flutter/dart-ui/Rect-class.html) rect, {[TextDirection](https://api.flutter.dev/flutter/dart-ui/TextDirection.html)? textDirection}) [Path](https://api.flutter.dev/flutter/dart-ui/Path-class.html)
@@ -123,7 +124,7 @@ _inherited_
-##### [lerpFrom](https://api.flutter.dev/flutter/painting/CircleBorder/lerpFrom.html)([ShapeBorder](https://api.flutter.dev/flutter/painting/ShapeBorder-class.html) a, [double](https://api.flutter.dev/flutter/dart-core/double-class.html) t) [ShapeBorder](https://api.flutter.dev/flutter/painting/ShapeBorder-class.html)
+##### [lerpFrom](https://api.flutter.dev/flutter/painting/CircleBorder/lerpFrom.html)([ShapeBorder](https://api.flutter.dev/flutter/painting/ShapeBorder-class.html)? a, [double](https://api.flutter.dev/flutter/dart-core/double-class.html) t) [ShapeBorder](https://api.flutter.dev/flutter/painting/ShapeBorder-class.html)?
@@ -133,7 +134,7 @@ _inherited_
-##### [lerpTo](https://api.flutter.dev/flutter/painting/CircleBorder/lerpTo.html)([ShapeBorder](https://api.flutter.dev/flutter/painting/ShapeBorder-class.html) b, [double](https://api.flutter.dev/flutter/dart-core/double-class.html) t) [ShapeBorder](https://api.flutter.dev/flutter/painting/ShapeBorder-class.html)
+##### [lerpTo](https://api.flutter.dev/flutter/painting/CircleBorder/lerpTo.html)([ShapeBorder](https://api.flutter.dev/flutter/painting/ShapeBorder-class.html)? b, [double](https://api.flutter.dev/flutter/dart-core/double-class.html) t) [ShapeBorder](https://api.flutter.dev/flutter/painting/ShapeBorder-class.html)?
@@ -152,7 +153,7 @@ _inherited_
-##### [paint](../ui_ring_border/RingBorder/paint.md)([Canvas](https://api.flutter.dev/flutter/dart-ui/Canvas-class.html) canvas, [Rect](https://api.flutter.dev/flutter/dart-ui/Rect-class.html) rect, {[TextDirection](https://api.flutter.dev/flutter/dart-ui/TextDirection-class.html) textDirection}) void
+##### [paint](../ui_ring_border/RingBorder/paint.md)([Canvas](https://api.flutter.dev/flutter/dart-ui/Canvas-class.html) canvas, [Rect](https://api.flutter.dev/flutter/dart-ui/Rect-class.html) rect, {[TextDirection](https://api.flutter.dev/flutter/dart-ui/TextDirection.html)? textDirection}) void
diff --git a/doc/api/ui_ring_border/RingBorder/RingBorder.md b/doc/api/ui_ring_border/RingBorder/RingBorder.md
index a9559955..8f4e9e1c 100644
--- a/doc/api/ui_ring_border/RingBorder/RingBorder.md
+++ b/doc/api/ui_ring_border/RingBorder/RingBorder.md
@@ -6,6 +6,7 @@
+ *[](https://dart.dev/null-safety)*
const
diff --git a/doc/api/ui_ring_border/RingBorder/copyWith.md b/doc/api/ui_ring_border/RingBorder/copyWith.md
index 5b3360aa..78738320 100644
--- a/doc/api/ui_ring_border/RingBorder/copyWith.md
+++ b/doc/api/ui_ring_border/RingBorder/copyWith.md
@@ -6,13 +6,14 @@
+ *[](https://dart.dev/null-safety)*
- @[override](https://api.flutter.dev/flutter/dart-core/override-constant.html)
[RingBorder](../../ui_ring_border/RingBorder-class.md) copyWith
-({[BorderSide](https://api.flutter.dev/flutter/painting/BorderSide-class.html) side})
+({[BorderSide](https://api.flutter.dev/flutter/painting/BorderSide-class.html)? side})
_override_
@@ -27,7 +28,7 @@ specified side
, if side
is non-null.
```dart
@override
-RingBorder copyWith({BorderSide side}) {
+RingBorder copyWith({BorderSide? side}) {
return RingBorder(side: side ?? this.side);
}
```
diff --git a/doc/api/ui_ring_border/RingBorder/paint.md b/doc/api/ui_ring_border/RingBorder/paint.md
index b67e1efc..5baae892 100644
--- a/doc/api/ui_ring_border/RingBorder/paint.md
+++ b/doc/api/ui_ring_border/RingBorder/paint.md
@@ -6,13 +6,14 @@
+ *[](https://dart.dev/null-safety)*
- @[override](https://api.flutter.dev/flutter/dart-core/override-constant.html)
void paint
-([Canvas](https://api.flutter.dev/flutter/dart-ui/Canvas-class.html) canvas, [Rect](https://api.flutter.dev/flutter/dart-ui/Rect-class.html) rect, {[TextDirection](https://api.flutter.dev/flutter/dart-ui/TextDirection-class.html) textDirection})
+([Canvas](https://api.flutter.dev/flutter/dart-ui/Canvas-class.html) canvas, [Rect](https://api.flutter.dev/flutter/dart-ui/Rect-class.html) rect, {[TextDirection](https://api.flutter.dev/flutter/dart-ui/TextDirection.html)? textDirection})
_override_
@@ -30,7 +31,7 @@ the border will not need the text direction to paint itself.
```dart
@override
-void paint(Canvas canvas, Rect rect, {TextDirection textDirection}) {
+void paint(Canvas canvas, Rect rect, {TextDirection? textDirection}) {
switch (side.style) {
case BorderStyle.none:
break;
diff --git a/doc/api/ui_ring_border/RingBorder/scale.md b/doc/api/ui_ring_border/RingBorder/scale.md
index bafa4187..e19a81b1 100644
--- a/doc/api/ui_ring_border/RingBorder/scale.md
+++ b/doc/api/ui_ring_border/RingBorder/scale.md
@@ -6,6 +6,7 @@
+ *[](https://dart.dev/null-safety)*
diff --git a/doc/api/ui_ring_border/ui_ring_border-library.md b/doc/api/ui_ring_border/ui_ring_border-library.md
index ccd89c6e..43cc2d93 100644
--- a/doc/api/ui_ring_border/ui_ring_border-library.md
+++ b/doc/api/ui_ring_border/ui_ring_border-library.md
@@ -8,6 +8,7 @@
+ *[](https://dart.dev/null-safety)*
diff --git a/doc/api/ui_widget_style_constants/WidgetStyleConstants-class.md b/doc/api/ui_widget_style_constants/WidgetStyleConstants-class.md
index bfb1c2bb..4450e7e6 100644
--- a/doc/api/ui_widget_style_constants/WidgetStyleConstants-class.md
+++ b/doc/api/ui_widget_style_constants/WidgetStyleConstants-class.md
@@ -8,6 +8,7 @@
+ *[](https://dart.dev/null-safety)*
diff --git a/doc/api/ui_widget_style_constants/WidgetStyleConstants/WidgetStyleConstants.md b/doc/api/ui_widget_style_constants/WidgetStyleConstants/WidgetStyleConstants.md
index 7dd70d59..1ccb1896 100644
--- a/doc/api/ui_widget_style_constants/WidgetStyleConstants/WidgetStyleConstants.md
+++ b/doc/api/ui_widget_style_constants/WidgetStyleConstants/WidgetStyleConstants.md
@@ -6,6 +6,7 @@
+ *[](https://dart.dev/null-safety)*
diff --git a/doc/api/ui_widget_style_constants/WidgetStyleConstants/defaultArcColor-constant.md b/doc/api/ui_widget_style_constants/WidgetStyleConstants/defaultArcColor-constant.md
index a20d7412..68e1066f 100644
--- a/doc/api/ui_widget_style_constants/WidgetStyleConstants/defaultArcColor-constant.md
+++ b/doc/api/ui_widget_style_constants/WidgetStyleConstants/defaultArcColor-constant.md
@@ -6,6 +6,7 @@
+ *[](https://dart.dev/null-safety)*
[Color](https://api.flutter.dev/flutter/dart-ui/Color-class.html) const defaultArcColor
diff --git a/doc/api/ui_widget_style_constants/WidgetStyleConstants/deviceDetailIconColorActive-constant.md b/doc/api/ui_widget_style_constants/WidgetStyleConstants/deviceDetailIconColorActive-constant.md
index 0b862a02..abcd3cbe 100644
--- a/doc/api/ui_widget_style_constants/WidgetStyleConstants/deviceDetailIconColorActive-constant.md
+++ b/doc/api/ui_widget_style_constants/WidgetStyleConstants/deviceDetailIconColorActive-constant.md
@@ -6,6 +6,7 @@
+ *[](https://dart.dev/null-safety)*
[Color](https://api.flutter.dev/flutter/dart-ui/Color-class.html) const deviceDetailIconColorActive
diff --git a/doc/api/ui_widget_style_constants/WidgetStyleConstants/deviceDetailIconColorInactive-constant.md b/doc/api/ui_widget_style_constants/WidgetStyleConstants/deviceDetailIconColorInactive-constant.md
index 881fcab7..ac1bc99d 100644
--- a/doc/api/ui_widget_style_constants/WidgetStyleConstants/deviceDetailIconColorInactive-constant.md
+++ b/doc/api/ui_widget_style_constants/WidgetStyleConstants/deviceDetailIconColorInactive-constant.md
@@ -6,6 +6,7 @@
+ *[](https://dart.dev/null-safety)*
[Color](https://api.flutter.dev/flutter/dart-ui/Color-class.html) const deviceDetailIconColorInactive
diff --git a/doc/api/ui_widget_style_constants/WidgetStyleConstants/deviceIconColor-constant.md b/doc/api/ui_widget_style_constants/WidgetStyleConstants/deviceIconColor-constant.md
index eabdcc49..0f67719d 100644
--- a/doc/api/ui_widget_style_constants/WidgetStyleConstants/deviceIconColor-constant.md
+++ b/doc/api/ui_widget_style_constants/WidgetStyleConstants/deviceIconColor-constant.md
@@ -6,6 +6,7 @@
+ *[](https://dart.dev/null-safety)*
[Color](https://api.flutter.dev/flutter/dart-ui/Color-class.html) const deviceIconColor
diff --git a/doc/api/ui_widget_style_constants/WidgetStyleConstants/deviceItemTextPrimaryState.md b/doc/api/ui_widget_style_constants/WidgetStyleConstants/deviceItemTextPrimaryState.md
index 6a2715e7..15906cc2 100644
--- a/doc/api/ui_widget_style_constants/WidgetStyleConstants/deviceItemTextPrimaryState.md
+++ b/doc/api/ui_widget_style_constants/WidgetStyleConstants/deviceItemTextPrimaryState.md
@@ -6,6 +6,7 @@
+ *[](https://dart.dev/null-safety)*
[TextStyle](https://api.flutter.dev/flutter/painting/TextStyle-class.html) deviceItemTextPrimaryState
diff --git a/doc/api/ui_widget_style_constants/WidgetStyleConstants/modesButtonPressedColor-constant.md b/doc/api/ui_widget_style_constants/WidgetStyleConstants/modesButtonPressedColor-constant.md
index 13c14088..db2013d6 100644
--- a/doc/api/ui_widget_style_constants/WidgetStyleConstants/modesButtonPressedColor-constant.md
+++ b/doc/api/ui_widget_style_constants/WidgetStyleConstants/modesButtonPressedColor-constant.md
@@ -6,6 +6,7 @@
+ *[](https://dart.dev/null-safety)*
[Color](https://api.flutter.dev/flutter/dart-ui/Color-class.html) const modesButtonPressedColor
diff --git a/doc/api/ui_widget_style_constants/WidgetStyleConstants/modesButtonUnpressedColor-constant.md b/doc/api/ui_widget_style_constants/WidgetStyleConstants/modesButtonUnpressedColor-constant.md
index a94d347f..c988a1c7 100644
--- a/doc/api/ui_widget_style_constants/WidgetStyleConstants/modesButtonUnpressedColor-constant.md
+++ b/doc/api/ui_widget_style_constants/WidgetStyleConstants/modesButtonUnpressedColor-constant.md
@@ -6,6 +6,7 @@
+ *[](https://dart.dev/null-safety)*
[Color](https://api.flutter.dev/flutter/dart-ui/Color-class.html) const modesButtonUnpressedColor
diff --git a/doc/api/ui_widget_style_constants/WidgetStyleConstants/textColorState-constant.md b/doc/api/ui_widget_style_constants/WidgetStyleConstants/textColorState-constant.md
index 9f175349..3da5debd 100644
--- a/doc/api/ui_widget_style_constants/WidgetStyleConstants/textColorState-constant.md
+++ b/doc/api/ui_widget_style_constants/WidgetStyleConstants/textColorState-constant.md
@@ -6,6 +6,7 @@
+ *[](https://dart.dev/null-safety)*
[Color](https://api.flutter.dev/flutter/dart-ui/Color-class.html) const textColorState
diff --git a/doc/api/ui_widget_style_constants/ui_widget_style_constants-library.md b/doc/api/ui_widget_style_constants/ui_widget_style_constants-library.md
index 5788c76e..d2361bff 100644
--- a/doc/api/ui_widget_style_constants/ui_widget_style_constants-library.md
+++ b/doc/api/ui_widget_style_constants/ui_widget_style_constants-library.md
@@ -8,6 +8,7 @@
+ *[](https://dart.dev/null-safety)*
diff --git a/lib/assets/traits/device_item_icon.dart b/lib/assets/traits/device_item_icon.dart
index 92143a03..3271fd79 100644
--- a/lib/assets/traits/device_item_icon.dart
+++ b/lib/assets/traits/device_item_icon.dart
@@ -1,11 +1,11 @@
-import 'package:yonomi_device_widgets/ui/widget_style_constants.dart';
import 'package:flutter/material.dart';
-import 'package:yonomi_platform_sdk/repository/devices/devices_repository.dart';
+import 'package:yonomi_device_widgets/ui/widget_style_constants.dart';
+import 'package:yonomi_platform_sdk/yonomi-sdk.dart';
class DeviceItemIcon {
static Widget getIcon(List traits) {
Trait determiningTrait = traits[0];
- if (determiningTrait is LockUnlockTrait) {
+ if (determiningTrait is LockTrait) {
return (determiningTrait.state.value)
? buildLockIcon()
: buildUnlockIcon();
@@ -38,7 +38,7 @@ class DeviceItemIcon {
);
}
- static Widget buildThermostatIcon(double thermostatState) {
+ static Widget buildThermostatIcon(double? thermostatState) {
return Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(100),
diff --git a/lib/components/arc.dart b/lib/components/arc.dart
index 4da71f4b..b4132f78 100644
--- a/lib/components/arc.dart
+++ b/lib/components/arc.dart
@@ -5,7 +5,7 @@ import 'package:yonomi_device_widgets/ui/widget_style_constants.dart';
class Arc extends StatefulWidget {
final Widget centerWidget;
- final Color color;
+ final Color? color;
final ValueChanged onFinalSetPoint;
final double maxValue;
@@ -14,12 +14,12 @@ class Arc extends StatefulWidget {
final bool showThumb;
Arc({
- Key key,
+ Key? key,
this.showThumb = true,
- @required this.centerWidget,
- @required this.initialValue,
- @required this.maxValue,
- @required this.onFinalSetPoint,
+ required this.centerWidget,
+ required this.initialValue,
+ required this.maxValue,
+ required this.onFinalSetPoint,
this.color,
}) : super(key: key);
@@ -28,8 +28,8 @@ class Arc extends StatefulWidget {
}
class _ArcState extends State {
- double _thumbx = 0;
- double _thumby = 0;
+ double? _thumbx = 0;
+ double? _thumby = 0;
double value = 0;
@override
@@ -62,7 +62,7 @@ class _ArcState extends State {
}
double calculateMagnitude() {
- return calculateMagnitudeFromXY(_thumbx, _thumby);
+ return calculateMagnitudeFromXY(_thumbx!, _thumby!);
}
double calculateMagnitudeFromXY(double x, double y) {
@@ -152,7 +152,7 @@ class _ArcState extends State {
);
}
- Map compensatedXY(double dx, double dy, double width) {
+ Map? compensatedXY(double dx, double dy, double width) {
if (dx > 0 && dy > 0 && dx < width && dy < width) {
final angle = atan2(dy - width / 2, dx - width / 2);
final x = width / 2 * cos(angle) - 5 + width / 2;
@@ -165,7 +165,7 @@ class _ArcState extends State {
}
class ArcPainter extends CustomPainter {
- final Color color;
+ final Color? color;
final double width;
final double height;
@@ -193,17 +193,17 @@ class ArcPainter extends CustomPainter {
}
class ThumbPainter extends CustomPainter {
- final double thumbx;
- final double thumby;
+ final double? thumbx;
+ final double? thumby;
ThumbPainter(this.thumbx, this.thumby);
@override
void paint(Canvas canvas, Size size) {
var thumbPaint = Paint()
- ..color = Colors.red[400]
+ ..color = Colors.red[400]!
..style = PaintingStyle.fill;
- canvas.drawCircle(Offset(thumbx + 5, thumby + 5), 10, thumbPaint);
+ canvas.drawCircle(Offset(thumbx! + 5, thumby! + 5), 10, thumbPaint);
}
@override
diff --git a/lib/components/device_control.dart b/lib/components/device_control.dart
index bc28daed..18ab2a83 100644
--- a/lib/components/device_control.dart
+++ b/lib/components/device_control.dart
@@ -3,8 +3,8 @@ import 'package:flutter/material.dart';
class DeviceControl extends StatelessWidget {
final bool onOff;
const DeviceControl({
- Key key,
- @required this.onOff,
+ Key? key,
+ required this.onOff,
}) : super(key: key);
@override
@@ -13,7 +13,7 @@ class DeviceControl extends StatelessWidget {
width: 300,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(5),
- border: Border.all(color: Colors.teal[200], width: 3)),
+ border: Border.all(color: Colors.teal[200]!, width: 3)),
child: ListTile(
dense: false,
leading: Row(
diff --git a/lib/components/lock_widget.dart b/lib/components/lock_widget.dart
index 8b70e889..32661f87 100644
--- a/lib/components/lock_widget.dart
+++ b/lib/components/lock_widget.dart
@@ -1,9 +1,9 @@
+import 'package:flutter/material.dart';
+import 'package:provider/provider.dart';
import 'package:yonomi_device_widgets/assets/traits/device_item_icon.dart';
import 'package:yonomi_device_widgets/components/arc.dart';
import 'package:yonomi_device_widgets/providers/lock_provider.dart';
import 'package:yonomi_device_widgets/ui/widget_style_constants.dart';
-import 'package:flutter/material.dart';
-import 'package:provider/provider.dart';
class LockWidget extends StatelessWidget {
@override
@@ -16,7 +16,7 @@ class LockWidget extends StatelessWidget {
Row(
children: [
Text(
- lockProvider?.deviceDetail?.displayName ?? '',
+ lockProvider.deviceDetail.displayName,
style: Theme.of(context).textTheme.headline6,
),
],
@@ -35,7 +35,7 @@ class LockWidget extends StatelessWidget {
onTap: () {
bool setLock = !lockProvider.isLocked;
lockProvider.setLockUnlockAction(
- lockProvider?.deviceDetail?.id, setLock);
+ lockProvider.deviceDetail.id, setLock);
},
)),
color: lockProvider.isLocked
diff --git a/lib/components/modes_toolbar.dart b/lib/components/modes_toolbar.dart
index 1e438f77..575be5e3 100644
--- a/lib/components/modes_toolbar.dart
+++ b/lib/components/modes_toolbar.dart
@@ -1,12 +1,12 @@
+import 'package:flutter/material.dart';
+import 'package:provider/provider.dart';
import 'package:yonomi_device_widgets/providers/thermostat_provider.dart';
import 'package:yonomi_device_widgets/ui/ring_border.dart';
import 'package:yonomi_device_widgets/ui/widget_style_constants.dart';
-import 'package:flutter/material.dart';
-import 'package:provider/provider.dart';
-import 'package:yonomi_platform_sdk/graphql/devices/thermostat/thermostat_queries.dart';
+import 'package:yonomi_platform_sdk/third_party/yonomi_graphql_schema/schema.docs.schema.gql.dart';
class ModesToolbar extends StatelessWidget {
- final String deviceId;
+ final String? deviceId;
ModesToolbar({this.deviceId});
@@ -21,8 +21,8 @@ class ModesToolbar extends StatelessWidget {
icon: Text("A"),
onPressed: () {
if (deviceId != null) {
- thermostatProvider?.setThermostatMode(
- deviceId, ThermostatMode.auto);
+ thermostatProvider.setThermostatMode(
+ deviceId!, GThermostatMode.AUTO);
}
},
),
@@ -30,8 +30,8 @@ class ModesToolbar extends StatelessWidget {
icon: Icon(Icons.ac_unit),
onPressed: () {
if (deviceId != null) {
- thermostatProvider?.setThermostatMode(
- deviceId, ThermostatMode.cool);
+ thermostatProvider.setThermostatMode(
+ deviceId!, GThermostatMode.COOL);
}
},
),
@@ -39,8 +39,8 @@ class ModesToolbar extends StatelessWidget {
icon: Icon(Icons.whatshot),
onPressed: () {
if (deviceId != null) {
- thermostatProvider?.setThermostatMode(
- deviceId, ThermostatMode.heat);
+ thermostatProvider.setThermostatMode(
+ deviceId!, GThermostatMode.HEAT);
}
},
),
@@ -48,8 +48,8 @@ class ModesToolbar extends StatelessWidget {
icon: Icon(Icons.eco),
onPressed: () {
if (deviceId != null) {
- thermostatProvider?.setThermostatMode(
- deviceId, ThermostatMode.airflow);
+ thermostatProvider.setThermostatMode(
+ deviceId!, GThermostatMode.AIRFLOW);
}
},
),
@@ -60,12 +60,11 @@ class ModesToolbar extends StatelessWidget {
class ModeIconButton extends ElevatedButton {
ModeIconButton({
- Key key,
- @required VoidCallback onPressed,
- VoidCallback onLongPress,
- @required Widget icon,
- }) : assert(icon != null),
- super(
+ Key? key,
+ required VoidCallback onPressed,
+ VoidCallback? onLongPress,
+ required Widget icon,
+ }) : super(
key: key,
onPressed: onPressed,
onLongPress: onLongPress,
@@ -110,7 +109,7 @@ class ModeIconButton extends ElevatedButton {
}
class ModeButtonIconChild extends StatelessWidget {
- ModeButtonIconChild({Key key, @required this.icon}) : super(key: key);
+ ModeButtonIconChild({Key? key, required this.icon}) : super(key: key);
final Widget icon;
diff --git a/lib/components/thermostat_widget.dart b/lib/components/thermostat_widget.dart
index f6fd5027..73d2ec00 100644
--- a/lib/components/thermostat_widget.dart
+++ b/lib/components/thermostat_widget.dart
@@ -1,9 +1,9 @@
+import 'package:flutter/material.dart';
+import 'package:provider/provider.dart';
import 'package:yonomi_device_widgets/components/arc.dart';
import 'package:yonomi_device_widgets/components/device_control.dart';
import 'package:yonomi_device_widgets/components/modes_toolbar.dart';
import 'package:yonomi_device_widgets/providers/thermostat_provider.dart';
-import 'package:flutter/material.dart';
-import 'package:provider/provider.dart';
class ThermostatWidget extends StatelessWidget {
@override
@@ -16,25 +16,21 @@ class ThermostatWidget extends StatelessWidget {
Row(
children: [
Text(
- thermostatProvider?.deviceDetail?.displayName ?? '',
+ thermostatProvider.deviceDetail?.displayName ?? '',
style: Theme.of(context).textTheme.headline6,
),
],
),
Padding(
padding: const EdgeInsets.only(top: 16.0),
- child:
- ModesToolbar(deviceId: thermostatProvider?.deviceDetail?.id)),
+ child: ModesToolbar(deviceId: thermostatProvider.deviceDetail?.id)),
SizedBox(
height: 60,
),
Center(
child: Arc(
centerWidget: Text(
- thermostatProvider.thermostatTargetTemperature
- ?.toInt()
- ?.toString() ??
- '0',
+ thermostatProvider.thermostatTargetTemperature.toInt().toString(),
style: Theme.of(context).textTheme.headline2,
),
initialValue: 20.0,
diff --git a/lib/devices/lock.dart b/lib/devices/lock.dart
index 5d5b48dd..65107ae2 100644
--- a/lib/devices/lock.dart
+++ b/lib/devices/lock.dart
@@ -2,13 +2,13 @@ import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import 'package:yonomi_device_widgets/components/lock_widget.dart';
import 'package:yonomi_device_widgets/providers/lock_provider.dart';
-import 'package:yonomi_platform_sdk/request/request.dart';
+import 'package:yonomi_platform_sdk/yonomi-sdk.dart';
class Lock extends StatelessWidget {
final Request request;
final String deviceId;
- const Lock({Key key, @required this.request, @required this.deviceId})
+ const Lock({Key? key, required this.request, required this.deviceId})
: super(key: key);
@override
diff --git a/lib/devices/thermostat.dart b/lib/devices/thermostat.dart
index 62f08de5..e72e78f6 100644
--- a/lib/devices/thermostat.dart
+++ b/lib/devices/thermostat.dart
@@ -2,13 +2,13 @@ import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import 'package:yonomi_device_widgets/components/thermostat_widget.dart';
import 'package:yonomi_device_widgets/providers/thermostat_provider.dart';
-import 'package:yonomi_platform_sdk/request/request.dart';
+import 'package:yonomi_platform_sdk/yonomi-sdk.dart';
class Thermostat extends StatelessWidget {
final Request request;
final String deviceId;
- const Thermostat({Key key, @required this.request, @required this.deviceId})
+ const Thermostat({Key? key, required this.request, required this.deviceId})
: super(key: key);
@override
diff --git a/lib/providers/lock_provider.dart b/lib/providers/lock_provider.dart
index bf85929e..6156ebb4 100644
--- a/lib/providers/lock_provider.dart
+++ b/lib/providers/lock_provider.dart
@@ -1,7 +1,5 @@
import 'package:flutter/cupertino.dart';
-import 'package:yonomi_platform_sdk/repository/devices/devices_repository.dart';
-import 'package:yonomi_platform_sdk/repository/devices/lock_repository.dart';
-import 'package:yonomi_platform_sdk/request/request.dart';
+import 'package:yonomi_platform_sdk/yonomi-sdk.dart';
typedef GetLockDetailsFunction = Future Function(
Request request, String id);
@@ -14,55 +12,50 @@ class LockProvider extends ChangeNotifier {
bool loadingAction = false;
LockProvider(Request request, String deviceId,
- {GetLockDetailsFunction injectLockDetailsMethod}) {
+ {GetLockDetailsFunction getLockDetails =
+ DevicesRepository.getLockDetails}) {
_request = request;
- getDeviceDetail(deviceId, injectLockDetailsMethod: injectLockDetailsMethod);
+ getDeviceDetail(deviceId, getLockDetails: getLockDetails);
}
- Request _request;
- Device _deviceDetail;
+ late Request _request;
+ late Device _deviceDetail;
Device get deviceDetail => _deviceDetail;
- bool get isLocked => getLockTrait()?.state?.value ?? false;
+ bool get isLocked => getLockTrait()?.state.value ?? false;
- LockUnlockTrait getLockTrait() {
- return _deviceDetail?.traits?.first;
+ LockTrait? getLockTrait() {
+ return _deviceDetail.traits.first as LockTrait?;
}
Future getDeviceDetail(String deviceId,
- {GetLockDetailsFunction injectLockDetailsMethod}) async {
- final getLockDetailsMethod =
- injectLockDetailsMethod ?? DevicesRepository.getLockDetails;
-
+ {GetLockDetailsFunction getLockDetails =
+ DevicesRepository.getLockDetails}) async {
loadingDetail = true;
notifyListeners();
- _deviceDetail = await getLockDetailsMethod(_request, deviceId);
+ _deviceDetail = await getLockDetails(_request, deviceId);
loadingDetail = false;
notifyListeners();
}
Future setLockUnlockAction(String deviceId, bool setLock,
- {GetLockDetailsFunction injectLockDetailsMethod,
- SendLockUnlockFunction injectSendLockUnlockMethod}) async {
- final getLockDetailsMethod =
- injectLockDetailsMethod ?? DevicesRepository.getLockDetails;
- final sendLockUnlockMethod =
- injectSendLockUnlockMethod ?? LockRepository.sendLockUnlockAction;
-
+ {GetLockDetailsFunction lockDetails = DevicesRepository.getLockDetails,
+ SendLockUnlockFunction sendLockUnlock =
+ LockRepository.sendLockUnlockAction}) async {
if (!loadingAction) {
loadingAction = true;
notifyListeners();
- await sendLockUnlockMethod(_request, deviceId, setLock);
+ await sendLockUnlock(_request, deviceId, setLock);
var maxRetries = 0;
- while (getLockTrait()?.state?.value != setLock && maxRetries < 10) {
+ while (getLockTrait()?.state.value != setLock && maxRetries < 10) {
// Wait more time
- _deviceDetail = await getLockDetailsMethod(_request, deviceId);
+ _deviceDetail = await lockDetails(_request, deviceId);
await Future.delayed(Duration(milliseconds: 750));
maxRetries++;
}
diff --git a/lib/providers/thermostat_provider.dart b/lib/providers/thermostat_provider.dart
index b19f4e92..e3e5499e 100644
--- a/lib/providers/thermostat_provider.dart
+++ b/lib/providers/thermostat_provider.dart
@@ -1,14 +1,12 @@
import 'package:flutter/material.dart';
-import 'package:yonomi_platform_sdk/graphql/devices/thermostat/thermostat_queries.dart';
-import 'package:yonomi_platform_sdk/repository/devices/devices_repository.dart';
-import 'package:yonomi_platform_sdk/repository/devices/thermostat_repository.dart';
-import 'package:yonomi_platform_sdk/request/request.dart';
+import 'package:yonomi_platform_sdk/third_party/yonomi_graphql_schema/schema.docs.schema.gql.dart';
+import 'package:yonomi_platform_sdk/yonomi-sdk.dart';
typedef SetPointActionFunction = Future Function(
Request request, String id, double temperature);
typedef SetModeFunction = Future Function(
- Request request, String id, ThermostatMode mode);
+ Request request, String id, GThermostatMode mode);
typedef GetThermostatDetailsFunction = Future Function(
Request request,
@@ -17,42 +15,39 @@ typedef GetThermostatDetailsFunction = Future Function(
class ThermostatProvider extends ChangeNotifier {
ThermostatProvider(Request request, String deviceId,
- {GetThermostatDetailsFunction injectGetThermostatDetailsMethod}) {
- _request = request;
- getDeviceDetail(deviceId,
- injectGetThermostatDetailsMethod: injectGetThermostatDetailsMethod);
+ {GetThermostatDetailsFunction getThermostatDetails =
+ DevicesRepository.getThermostatDetails}) {
+ this._request = request;
+ getDeviceDetail(deviceId, getThermostatDetails: getThermostatDetails);
}
- Request _request;
- Device _deviceDetail;
+ late Request _request;
+ Device? _deviceDetail;
- ThermostatTrait getThermostatTrait() {
- return _deviceDetail?.traits?.first;
+ ThermostatTrait? getThermostatTrait() {
+ return _deviceDetail?.traits.first as ThermostatTrait?;
}
Future setPointAction(String deviceId, double temperature,
- {SetPointActionFunction injectSetPointThermostatMethod}) async {
- final setPointThermostatMethod = injectSetPointThermostatMethod ??
- ThermostatRepository.setPointThermostat;
- setPointThermostatMethod(_request, deviceId, temperature);
+ {SetPointActionFunction setPoint =
+ ThermostatRepository.setPointThermostat}) async {
+ setPoint(_request, deviceId, temperature);
}
- Future setThermostatMode(String deviceId, ThermostatMode mode,
- {SetModeFunction injectSetModeMethod}) async {
- final setModeMethod = injectSetModeMethod ?? ThermostatRepository.setMode;
- setModeMethod(_request, deviceId, mode);
+ Future setThermostatMode(String deviceId, GThermostatMode mode,
+ {SetModeFunction setMode = ThermostatRepository.setMode}) async {
+ setMode(_request, deviceId, mode);
}
Future getDeviceDetail(String deviceId,
- {GetThermostatDetailsFunction injectGetThermostatDetailsMethod}) async {
- final getThermostatDetailsMethod = injectGetThermostatDetailsMethod ??
- DevicesRepository.getThermostatDetails;
- _deviceDetail = await getThermostatDetailsMethod(_request, deviceId);
+ {GetThermostatDetailsFunction getThermostatDetails =
+ DevicesRepository.getThermostatDetails}) async {
+ _deviceDetail = await getThermostatDetails(_request, deviceId);
notifyListeners();
}
- Device get deviceDetail => _deviceDetail;
+ Device? get deviceDetail => _deviceDetail;
double get thermostatTargetTemperature =>
- getThermostatTrait()?.state?.value ?? 0;
+ getThermostatTrait()?.state.value ?? 0;
}
diff --git a/lib/ui/ring_border.dart b/lib/ui/ring_border.dart
index fb40180d..10be7c04 100644
--- a/lib/ui/ring_border.dart
+++ b/lib/ui/ring_border.dart
@@ -19,7 +19,7 @@ class RingBorder extends CircleBorder {
super(side: side);
@override
- RingBorder copyWith({BorderSide side}) {
+ RingBorder copyWith({BorderSide? side}) {
return RingBorder(side: side ?? this.side);
}
@@ -27,7 +27,7 @@ class RingBorder extends CircleBorder {
ShapeBorder scale(double t) => RingBorder(side: side.scale(t));
@override
- void paint(Canvas canvas, Rect rect, {TextDirection textDirection}) {
+ void paint(Canvas canvas, Rect rect, {TextDirection? textDirection}) {
switch (side.style) {
case BorderStyle.none:
break;
diff --git a/pubspec.yaml b/pubspec.yaml
index 4dcab370..6f094f38 100644
--- a/pubspec.yaml
+++ b/pubspec.yaml
@@ -4,16 +4,16 @@ version: 1.1.0
homepage: https://www.yonomi.co
environment:
- sdk: ">=2.7.0 <3.0.0"
- flutter: ">=1.17.0"
+ sdk: '>=2.12.0 <3.0.0'
dependencies:
- provider: ^4.3.3
+ provider: ^6.0.1
flutter:
sdk: flutter
- yonomi_platform_sdk: ^1.0.5
+ yonomi_platform_sdk: 1.0.7
dev_dependencies:
- mockito: ^4.1.4
+ mockito: ^5.0.15
flutter_test:
- sdk: flutter
\ No newline at end of file
+ sdk: flutter
+ build_runner: ^2.1.5
diff --git a/test/assets/device_item_icon_test.dart b/test/assets/device_item_icon_test.dart
index 35579735..7ed8eaf4 100644
--- a/test/assets/device_item_icon_test.dart
+++ b/test/assets/device_item_icon_test.dart
@@ -1,8 +1,7 @@
+import 'package:yonomi_platform_sdk/yonomi-sdk.dart' as Devices;
import 'package:yonomi_device_widgets/assets/traits/device_item_icon.dart';
import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';
-import 'package:yonomi_platform_sdk/repository/devices/devices_repository.dart'
- as Devices;
Widget createIconWidget(List traits) {
return MaterialApp(
@@ -38,7 +37,7 @@ void main() {
testWidgets('should render correct Lock trait icon when unlocked',
(WidgetTester tester) async {
final lockDevice = [
- Devices.LockUnlockTrait('lockunlock', Devices.IsLocked(false))
+ Devices.LockTrait('lockunlock', Devices.IsLocked(false))
];
await tester.pumpWidget(createIconWidget(lockDevice));
expect(find.byIcon(Icons.lock_open), findsOneWidget);
@@ -47,7 +46,7 @@ void main() {
testWidgets('should render correct Lock trait icon when locked',
(WidgetTester tester) async {
final lockDevice = [
- Devices.LockUnlockTrait('lockunlock', Devices.IsLocked(true))
+ Devices.LockTrait('lockunlock', Devices.IsLocked(true))
];
await tester.pumpWidget(createIconWidget(lockDevice));
expect(find.byIcon(Icons.lock), findsOneWidget);
diff --git a/test/components/arc_test.dart b/test/components/arc_test.dart
index 721e15c9..89b034fb 100644
--- a/test/components/arc_test.dart
+++ b/test/components/arc_test.dart
@@ -12,13 +12,13 @@ import 'package:yonomi_device_widgets/components/arc.dart';
///
/// ```flutter test --update-goldens test/components/arc_test.dart```
///
-Widget createArcWidget({ValueChanged callback}) {
+Widget createArcWidget({ValueChanged? callback}) {
return MaterialApp(
home: Column(children: [
Arc(
centerWidget: Text('centerWidget'),
initialValue: 5,
- onFinalSetPoint: callback ?? (double value) => print(value),
+ onFinalSetPoint: callback ?? ((double value) => print(value)),
maxValue: 100)
]),
);
@@ -45,13 +45,14 @@ void main() {
testWidgets('Widget - starting point', (WidgetTester tester) async {
int endValue = 0;
- ValueChanged endValueCallback(double value) {
+ ValueChanged? endValueCallback(double value) {
endValue = value.round();
}
;
- MaterialApp arc = createArcWidget(callback: endValueCallback);
+ MaterialApp arc =
+ createArcWidget(callback: endValueCallback) as MaterialApp;
await tester.pumpWidget(arc);
await tester.pumpAndSettle();
@@ -69,13 +70,14 @@ void main() {
testWidgets('Widget - last value', (WidgetTester tester) async {
int endValue = 0;
- ValueChanged endValueCallback(double value) {
+ ValueChanged? endValueCallback(double value) {
endValue = value.round();
}
;
- MaterialApp arc = createArcWidget(callback: endValueCallback);
+ MaterialApp arc =
+ createArcWidget(callback: endValueCallback) as MaterialApp;
await tester.pumpWidget(arc);
await tester.pumpAndSettle();
diff --git a/test/components/lock_widget_test.dart b/test/components/lock_widget_test.dart
index fbf05b01..647c3fcb 100644
--- a/test/components/lock_widget_test.dart
+++ b/test/components/lock_widget_test.dart
@@ -1,30 +1,42 @@
-import 'package:yonomi_device_widgets/components/lock_widget.dart';
-import 'package:yonomi_device_widgets/providers/lock_provider.dart';
import 'package:flutter/material.dart';
import 'package:flutter/widgets.dart';
import 'package:flutter_test/flutter_test.dart';
+import 'package:mockito/annotations.dart';
import 'package:mockito/mockito.dart';
import 'package:provider/provider.dart';
-import 'package:yonomi_platform_sdk/repository/devices/devices_repository.dart';
-
-class MockLockProvider extends Mock implements LockProvider {}
-
-class MockDevice extends Mock implements Device {}
-
-MockDevice mockDeviceDetail = MockDevice();
-MockLockProvider mockProvider = MockLockProvider();
+import 'package:yonomi_device_widgets/components/lock_widget.dart';
+import 'package:yonomi_device_widgets/providers/lock_provider.dart';
+import 'package:yonomi_platform_sdk/third_party/yonomi_graphql_schema/schema.docs.schema.gql.dart';
+import 'package:yonomi_platform_sdk/yonomi-sdk.dart';
-Widget getAppWithLockWidget() {
- return MaterialApp(
- home: ChangeNotifierProvider.value(
- value: mockProvider,
- child: LockWidget(),
- ));
-}
+import 'lock_widget_test.mocks.dart';
+@GenerateMocks([LockProvider])
void main() {
+ final mockProvider = MockLockProvider();
+ final device = Device(
+ 'id',
+ 'name',
+ 'description',
+ 'manufacturerName',
+ 'model',
+ null,
+ GDateTime('value'),
+ GDateTime('value'),
+ [LockTrait('name', IsLocked(true))]);
+
+ Widget getAppWithLockWidget() {
+ return MaterialApp(
+ home: ChangeNotifierProvider.value(
+ value: mockProvider,
+ child: LockWidget(),
+ ));
+ }
+
setUp(() {
- when(mockProvider.deviceDetail).thenReturn(mockDeviceDetail);
+ when(mockProvider.deviceDetail).thenReturn(device);
+ when(mockProvider.setLockUnlockAction(any, any))
+ .thenAnswer((_) => Future.value());
});
testWidgets('Circular progress indicator should be shown when loading',
@@ -37,7 +49,6 @@ void main() {
});
testWidgets('Lock Widget shows device name', (WidgetTester tester) async {
- when(mockDeviceDetail.displayName).thenReturn("LockDeviceUnderTest");
when(mockProvider.loadingDetail).thenReturn(false);
when(mockProvider.loadingAction).thenReturn(false);
@@ -45,7 +56,7 @@ void main() {
await tester.pumpWidget(getAppWithLockWidget());
- expect(find.text("LockDeviceUnderTest"), findsOneWidget);
+ expect(find.text('name'), findsOneWidget);
});
testWidgets('Lock Widget shows Unlocked Icon when state is Unlocked',
diff --git a/test/components/lock_widget_test.mocks.dart b/test/components/lock_widget_test.mocks.dart
new file mode 100644
index 00000000..3d010019
--- /dev/null
+++ b/test/components/lock_widget_test.mocks.dart
@@ -0,0 +1,99 @@
+// Mocks generated by Mockito 5.0.15 from annotations
+// in yonomi_device_widgets/test/components/lock_widget_test.dart.
+// Do not manually edit this file.
+
+import 'dart:async' as _i4;
+import 'dart:ui' as _i7;
+
+import 'package:mockito/mockito.dart' as _i1;
+import 'package:yonomi_device_widgets/providers/lock_provider.dart' as _i3;
+import 'package:yonomi_platform_sdk/src/repository/devices/devices_repository.dart'
+ as _i5;
+import 'package:yonomi_platform_sdk/src/repository/devices/lock_repository.dart'
+ as _i6;
+import 'package:yonomi_platform_sdk/yonomi-sdk.dart' as _i2;
+
+// ignore_for_file: avoid_redundant_argument_values
+// ignore_for_file: avoid_setters_without_getters
+// ignore_for_file: comment_references
+// ignore_for_file: implementation_imports
+// ignore_for_file: invalid_use_of_visible_for_testing_member
+// ignore_for_file: prefer_const_constructors
+// ignore_for_file: unnecessary_parenthesis
+
+class _FakeDevice_0 extends _i1.Fake implements _i2.Device {}
+
+/// A class which mocks [LockProvider].
+///
+/// See the documentation for Mockito's code generation for more information.
+class MockLockProvider extends _i1.Mock implements _i3.LockProvider {
+ MockLockProvider() {
+ _i1.throwOnMissingStub(this);
+ }
+
+ @override
+ bool get loadingDetail =>
+ (super.noSuchMethod(Invocation.getter(#loadingDetail), returnValue: false)
+ as bool);
+ @override
+ set loadingDetail(bool? _loadingDetail) =>
+ super.noSuchMethod(Invocation.setter(#loadingDetail, _loadingDetail),
+ returnValueForMissingStub: null);
+ @override
+ bool get loadingAction =>
+ (super.noSuchMethod(Invocation.getter(#loadingAction), returnValue: false)
+ as bool);
+ @override
+ set loadingAction(bool? _loadingAction) =>
+ super.noSuchMethod(Invocation.setter(#loadingAction, _loadingAction),
+ returnValueForMissingStub: null);
+ @override
+ _i2.Device get deviceDetail =>
+ (super.noSuchMethod(Invocation.getter(#deviceDetail),
+ returnValue: _FakeDevice_0()) as _i2.Device);
+ @override
+ bool get isLocked =>
+ (super.noSuchMethod(Invocation.getter(#isLocked), returnValue: false)
+ as bool);
+ @override
+ bool get hasListeners =>
+ (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false)
+ as bool);
+ @override
+ _i4.Future getDeviceDetail(String? deviceId,
+ {_i3.GetLockDetailsFunction? getLockDetails =
+ _i5.DevicesRepository.getLockDetails}) =>
+ (super.noSuchMethod(
+ Invocation.method(
+ #getDeviceDetail, [deviceId], {#getLockDetails: getLockDetails}),
+ returnValue: Future.value(),
+ returnValueForMissingStub: Future.value()) as _i4.Future);
+ @override
+ _i4.Future setLockUnlockAction(String? deviceId, bool? setLock,
+ {_i3.GetLockDetailsFunction? lockDetails =
+ _i5.DevicesRepository.getLockDetails,
+ _i3.SendLockUnlockFunction? sendLockUnlock =
+ _i6.LockRepository.sendLockUnlockAction}) =>
+ (super.noSuchMethod(
+ Invocation.method(#setLockUnlockAction, [deviceId, setLock],
+ {#lockDetails: lockDetails, #sendLockUnlock: sendLockUnlock}),
+ returnValue: Future.value(),
+ returnValueForMissingStub: Future.value()) as _i4.Future);
+ @override
+ void addListener(_i7.VoidCallback? listener) =>
+ super.noSuchMethod(Invocation.method(#addListener, [listener]),
+ returnValueForMissingStub: null);
+ @override
+ void removeListener(_i7.VoidCallback? listener) =>
+ super.noSuchMethod(Invocation.method(#removeListener, [listener]),
+ returnValueForMissingStub: null);
+ @override
+ void dispose() => super.noSuchMethod(Invocation.method(#dispose, []),
+ returnValueForMissingStub: null);
+ @override
+ void notifyListeners() =>
+ super.noSuchMethod(Invocation.method(#notifyListeners, []),
+ returnValueForMissingStub: null);
+ @override
+ String toString() => super.toString();
+}
diff --git a/test/components/modes_toolbar_test.dart b/test/components/modes_toolbar_test.dart
index cf4510ec..f709ebfb 100644
--- a/test/components/modes_toolbar_test.dart
+++ b/test/components/modes_toolbar_test.dart
@@ -1,28 +1,33 @@
import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';
+import 'package:mockito/annotations.dart';
import 'package:mockito/mockito.dart';
import 'package:provider/provider.dart';
import 'package:yonomi_device_widgets/components/modes_toolbar.dart';
import 'package:yonomi_device_widgets/providers/thermostat_provider.dart';
import 'package:yonomi_device_widgets/ui/ring_border.dart';
-import 'package:yonomi_platform_sdk/graphql/devices/thermostat/thermostat_queries.graphql.dart';
+import 'package:yonomi_platform_sdk/third_party/yonomi_graphql_schema/schema.docs.schema.gql.dart';
-class MockThermostatProvider extends Mock implements ThermostatProvider {}
-
-MockThermostatProvider mockProvider = MockThermostatProvider();
-
-Widget createModesToolbar() {
- return MaterialApp(
- home: ChangeNotifierProvider(
- create: (_) => mockProvider,
- child: Column(children: [
- ModesToolbar(deviceId: ""),
- ]),
- ),
- );
-}
+import 'modes_toolbar_test.mocks.dart';
+@GenerateMocks([ThermostatProvider])
void main() {
+ final mockProvider = MockThermostatProvider();
+ Widget createModesToolbar() {
+ return MaterialApp(
+ home: ChangeNotifierProvider(
+ create: (_) => mockProvider,
+ child: Column(children: [
+ ModesToolbar(deviceId: ""),
+ ]),
+ ),
+ );
+ }
+
+ // setUp(() {
+ // when(mockProvider.setThermostatMode(any, any))
+ // .thenAnswer((_) => Future.value(null));
+ // });
testWidgets('Setup - ModesToolbar should contain specific icons',
(WidgetTester tester) async {
await tester.pumpWidget(createModesToolbar());
@@ -39,7 +44,7 @@ void main() {
await tester.tap(find.widgetWithText(ModeIconButton, "A"));
- verify(mockProvider.setThermostatMode(any, ThermostatMode.auto)).called(1);
+ verify(mockProvider.setThermostatMode(any, GThermostatMode.AUTO)).called(1);
});
testWidgets('ModesToolbar - button should set mode to cool when pressed',
@@ -48,7 +53,7 @@ void main() {
await tester.tap(find.widgetWithIcon(ModeIconButton, Icons.ac_unit));
- verify(mockProvider.setThermostatMode(any, ThermostatMode.cool)).called(1);
+ verify(mockProvider.setThermostatMode(any, GThermostatMode.COOL)).called(1);
});
testWidgets('ModesToolbar - button should set mode to heat when pressed',
@@ -57,7 +62,7 @@ void main() {
await tester.tap(find.widgetWithIcon(ModeIconButton, Icons.whatshot));
- verify(mockProvider.setThermostatMode(any, ThermostatMode.heat)).called(1);
+ verify(mockProvider.setThermostatMode(any, GThermostatMode.HEAT)).called(1);
});
testWidgets('ModesToolbar - button should set mode to eco when pressed',
@@ -66,7 +71,7 @@ void main() {
await tester.tap(find.widgetWithIcon(ModeIconButton, Icons.eco));
- verify(mockProvider.setThermostatMode(any, ThermostatMode.airflow))
+ verify(mockProvider.setThermostatMode(any, GThermostatMode.AIRFLOW))
.called(1);
});
@@ -86,7 +91,7 @@ void main() {
final modeButton = tester.widget(modeIconButtonFinder);
- expect(modeButton.style.shape.resolve(pressed), isA());
+ expect(modeButton.style!.shape!.resolve(pressed), isA());
});
testWidgets(
@@ -105,6 +110,6 @@ void main() {
final modeButton = tester.widget(modeIconButtonFinder);
- expect(modeButton.style.shape.resolve(focused), isA());
+ expect(modeButton.style!.shape!.resolve(focused), isA());
});
}
diff --git a/test/components/modes_toolbar_test.mocks.dart b/test/components/modes_toolbar_test.mocks.dart
new file mode 100644
index 00000000..c3912583
--- /dev/null
+++ b/test/components/modes_toolbar_test.mocks.dart
@@ -0,0 +1,87 @@
+// Mocks generated by Mockito 5.0.15 from annotations
+// in yonomi_device_widgets/test/components/modes_toolbar_test.dart.
+// Do not manually edit this file.
+
+import 'dart:async' as _i3;
+import 'dart:ui' as _i7;
+
+import 'package:mockito/mockito.dart' as _i1;
+import 'package:yonomi_device_widgets/providers/thermostat_provider.dart'
+ as _i2;
+import 'package:yonomi_platform_sdk/src/repository/devices/devices_repository.dart'
+ as _i6;
+import 'package:yonomi_platform_sdk/src/repository/devices/thermostat_repository.dart'
+ as _i4;
+import 'package:yonomi_platform_sdk/third_party/yonomi_graphql_schema/schema.docs.schema.gql.dart'
+ as _i5;
+
+// ignore_for_file: avoid_redundant_argument_values
+// ignore_for_file: avoid_setters_without_getters
+// ignore_for_file: comment_references
+// ignore_for_file: implementation_imports
+// ignore_for_file: invalid_use_of_visible_for_testing_member
+// ignore_for_file: prefer_const_constructors
+// ignore_for_file: unnecessary_parenthesis
+
+/// A class which mocks [ThermostatProvider].
+///
+/// See the documentation for Mockito's code generation for more information.
+class MockThermostatProvider extends _i1.Mock
+ implements _i2.ThermostatProvider {
+ MockThermostatProvider() {
+ _i1.throwOnMissingStub(this);
+ }
+
+ @override
+ double get thermostatTargetTemperature =>
+ (super.noSuchMethod(Invocation.getter(#thermostatTargetTemperature),
+ returnValue: 0.0) as double);
+ @override
+ bool get hasListeners =>
+ (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false)
+ as bool);
+ @override
+ _i3.Future setPointAction(String? deviceId, double? temperature,
+ {_i2.SetPointActionFunction? setPoint =
+ _i4.ThermostatRepository.setPointThermostat}) =>
+ (super.noSuchMethod(
+ Invocation.method(
+ #setPointAction, [deviceId, temperature], {#setPoint: setPoint}),
+ returnValue: Future.value(),
+ returnValueForMissingStub: Future.value()) as _i3.Future);
+ @override
+ _i3.Future setThermostatMode(
+ String? deviceId, _i5.GThermostatMode? mode,
+ {_i2.SetModeFunction? setMode = _i4.ThermostatRepository.setMode}) =>
+ (super.noSuchMethod(
+ Invocation.method(
+ #setThermostatMode, [deviceId, mode], {#setMode: setMode}),
+ returnValue: Future.value(),
+ returnValueForMissingStub: Future.value()) as _i3.Future);
+ @override
+ _i3.Future getDeviceDetail(String? deviceId,
+ {_i2.GetThermostatDetailsFunction? getThermostatDetails =
+ _i6.DevicesRepository.getThermostatDetails}) =>
+ (super.noSuchMethod(
+ Invocation.method(#getDeviceDetail, [deviceId],
+ {#getThermostatDetails: getThermostatDetails}),
+ returnValue: Future.value(),
+ returnValueForMissingStub: Future.value()) as _i3.Future);
+ @override
+ void addListener(_i7.VoidCallback? listener) =>
+ super.noSuchMethod(Invocation.method(#addListener, [listener]),
+ returnValueForMissingStub: null);
+ @override
+ void removeListener(_i7.VoidCallback? listener) =>
+ super.noSuchMethod(Invocation.method(#removeListener, [listener]),
+ returnValueForMissingStub: null);
+ @override
+ void dispose() => super.noSuchMethod(Invocation.method(#dispose, []),
+ returnValueForMissingStub: null);
+ @override
+ void notifyListeners() =>
+ super.noSuchMethod(Invocation.method(#notifyListeners, []),
+ returnValueForMissingStub: null);
+ @override
+ String toString() => super.toString();
+}
diff --git a/test/providers/lock_provider_test.dart b/test/providers/lock_provider_test.dart
index a6e799e4..fd84653f 100644
--- a/test/providers/lock_provider_test.dart
+++ b/test/providers/lock_provider_test.dart
@@ -1,70 +1,125 @@
import 'package:flutter_test/flutter_test.dart';
+import 'package:mockito/annotations.dart';
import 'package:mockito/mockito.dart';
import 'package:yonomi_device_widgets/providers/lock_provider.dart';
-import 'package:yonomi_platform_sdk/repository/devices/devices_repository.dart';
-import 'package:yonomi_platform_sdk/request/request.dart';
+import 'package:yonomi_platform_sdk/third_party/yonomi_graphql_schema/schema.docs.schema.gql.dart';
+import 'package:yonomi_platform_sdk/yonomi-sdk.dart';
-class MockGetLockDetailsFunction extends Mock {
+import 'lock_provider_test.mocks.dart';
+
+class GetLockDetails extends Mock {
Future call(Request request, String id);
}
-class MockSendLockUnlockFunction extends Mock {
+class SendLockUnlock extends Mock {
Future call(Request request, String id, bool lockUnlock);
}
+@GenerateMocks([GetLockDetails, SendLockUnlock])
void main() {
test('Calling setLockUnlockAction calls repository method', () async {
Request request = Request("", {});
- GetLockDetailsFunction mockLockDetailsMethod = MockGetLockDetailsFunction();
- SendLockUnlockFunction mockSendLockUnlockMethod =
- MockSendLockUnlockFunction();
- LockProvider lockProvider = LockProvider(request, "deviceId",
- injectLockDetailsMethod: mockLockDetailsMethod);
+ final mockLockDetailsMethod = MockGetLockDetails();
+ final device = Device(
+ 'id',
+ 'name',
+ 'description',
+ 'manufacturerName',
+ 'model',
+ null,
+ GDateTime('value'),
+ GDateTime('value'),
+ [LockTrait('name', IsLocked(true))]);
+ when(mockLockDetailsMethod.call(request, "deviceId"))
+ .thenAnswer((_) => Future.value(device));
+ final mockSendLockUnlockMethod = MockSendLockUnlock();
+ LockProvider lockProvider = LockProvider(request, 'deviceId',
+ getLockDetails: mockLockDetailsMethod);
+ await lockProvider.setLockUnlockAction('deviceId', true,
+ lockDetails: mockLockDetailsMethod,
+ sendLockUnlock: mockSendLockUnlockMethod);
+ verify(mockLockDetailsMethod(request, 'deviceId')).called(1);
+
+ verify(mockSendLockUnlockMethod(request, 'deviceId', true)).called(1);
+ });
+
+ test(
+ 'setLockUnlockAction will retry calling repository method multiple times if state value has not yet changed',
+ () async {
+ Request request = Request("", {});
+ final mockLockDetailsMethod = MockGetLockDetails();
+ final device = Device(
+ 'id',
+ 'name',
+ 'description',
+ 'manufacturerName',
+ 'model',
+ null,
+ GDateTime('value'),
+ GDateTime('value'),
+ [LockTrait('name', IsLocked(false))]);
+ when(mockLockDetailsMethod.call(request, "deviceId"))
+ .thenAnswer((_) => Future.value(device));
+ final mockSendLockUnlockMethod = MockSendLockUnlock();
+ LockProvider lockProvider = LockProvider(request, 'deviceId',
+ getLockDetails: mockLockDetailsMethod);
- await lockProvider.setLockUnlockAction("deviceId", true,
- injectLockDetailsMethod: mockLockDetailsMethod,
- injectSendLockUnlockMethod: mockSendLockUnlockMethod);
+ await lockProvider.setLockUnlockAction('deviceId', true,
+ lockDetails: mockLockDetailsMethod,
+ sendLockUnlock: mockSendLockUnlockMethod);
- verify(mockSendLockUnlockMethod(any, any, any)).called(1);
+ verify(mockSendLockUnlockMethod(request, 'deviceId', true)).called(1);
+ verify(mockLockDetailsMethod(request, 'deviceId')).called(11);
});
test('Calling getDeviceDetail calls repository method', () async {
Request request = Request("", {});
- GetLockDetailsFunction mockLockDetailsMethod = MockGetLockDetailsFunction();
- LockProvider lockProvider = LockProvider(request, "deviceId",
- injectLockDetailsMethod: mockLockDetailsMethod);
+ final mockLockDetailsMethod = MockGetLockDetails();
+ final device = Device(
+ 'test',
+ 'name',
+ 'description',
+ 'manufacturerName',
+ 'model',
+ null,
+ GDateTime('value'),
+ GDateTime('value'),
+ [LockTrait('name', IsLocked(true))]);
+ when(mockLockDetailsMethod.call(request, 'test'))
+ .thenAnswer((_) => Future.value(device));
+ LockProvider lockProvider =
+ LockProvider(request, 'test', getLockDetails: mockLockDetailsMethod);
- await lockProvider.getDeviceDetail("test",
- injectLockDetailsMethod: mockLockDetailsMethod);
+ await lockProvider.getDeviceDetail('test',
+ getLockDetails: mockLockDetailsMethod);
- verify(mockLockDetailsMethod(any, any)).called(2);
+ verify(mockLockDetailsMethod(request, 'test')).called(2);
});
test('Device data is set using DeviceRepository\'s return values', () async {
Request request = Request("", {});
- GetLockDetailsFunction mockLockDetailsMethod = MockGetLockDetailsFunction();
- when(mockLockDetailsMethod(any, any)).thenAnswer((_) => Future.value(
- Device(
- "someId",
- "someDisplayName",
- "someDescription",
- "someManufacturerName",
- "someModel",
- "someFirmwareV",
- "someSoftwareV",
- "someSerialNumber",
- DateTime.now(),
- DateTime.now(),
- [],
- ),
- ));
- LockProvider lockProvider = LockProvider(request, "deviceId",
- injectLockDetailsMethod: mockLockDetailsMethod);
+ GetLockDetailsFunction mockLockDetailsMethod = MockGetLockDetails();
+ when(mockLockDetailsMethod.call(request, 'deviceId'))
+ .thenAnswer((_) => Future.value(
+ Device(
+ "someId",
+ "someDisplayName",
+ "someDescription",
+ "someManufacturerName",
+ "someModel",
+ "someFirmwareV",
+ GDateTime('value'),
+ GDateTime('value'),
+ [],
+ ),
+ ));
+ LockProvider lockProvider = LockProvider(request, 'deviceId',
+ getLockDetails: mockLockDetailsMethod);
- await lockProvider.getDeviceDetail("test",
- injectLockDetailsMethod: mockLockDetailsMethod);
+ await lockProvider.getDeviceDetail('deviceId',
+ getLockDetails: mockLockDetailsMethod);
- expect(lockProvider.deviceDetail.displayName, "someDisplayName");
+ expect(lockProvider.deviceDetail.displayName, 'someDisplayName');
});
}
diff --git a/test/providers/lock_provider_test.mocks.dart b/test/providers/lock_provider_test.mocks.dart
new file mode 100644
index 00000000..7f85d129
--- /dev/null
+++ b/test/providers/lock_provider_test.mocks.dart
@@ -0,0 +1,54 @@
+// Mocks generated by Mockito 5.0.15 from annotations
+// in yonomi_device_widgets/test/providers/lock_provider_test.dart.
+// Do not manually edit this file.
+
+import 'dart:async' as _i4;
+
+import 'package:mockito/mockito.dart' as _i1;
+import 'package:yonomi_platform_sdk/yonomi-sdk.dart' as _i2;
+
+import 'lock_provider_test.dart' as _i3;
+
+// ignore_for_file: avoid_redundant_argument_values
+// ignore_for_file: avoid_setters_without_getters
+// ignore_for_file: comment_references
+// ignore_for_file: implementation_imports
+// ignore_for_file: invalid_use_of_visible_for_testing_member
+// ignore_for_file: prefer_const_constructors
+// ignore_for_file: unnecessary_parenthesis
+
+class _FakeDevice_0 extends _i1.Fake implements _i2.Device {}
+
+/// A class which mocks [GetLockDetails].
+///
+/// See the documentation for Mockito's code generation for more information.
+class MockGetLockDetails extends _i1.Mock implements _i3.GetLockDetails {
+ MockGetLockDetails() {
+ _i1.throwOnMissingStub(this);
+ }
+
+ @override
+ _i4.Future<_i2.Device> call(_i2.Request? request, String? id) =>
+ (super.noSuchMethod(Invocation.method(#call, [request, id]),
+ returnValue: Future<_i2.Device>.value(_FakeDevice_0()))
+ as _i4.Future<_i2.Device>);
+ @override
+ String toString() => super.toString();
+}
+
+/// A class which mocks [SendLockUnlock].
+///
+/// See the documentation for Mockito's code generation for more information.
+class MockSendLockUnlock extends _i1.Mock implements _i3.SendLockUnlock {
+ MockSendLockUnlock() {
+ _i1.throwOnMissingStub(this);
+ }
+
+ @override
+ _i4.Future call(_i2.Request? request, String? id, bool? lockUnlock) =>
+ (super.noSuchMethod(Invocation.method(#call, [request, id, lockUnlock]),
+ returnValue: Future.value(),
+ returnValueForMissingStub: Future.value()) as _i4.Future);
+ @override
+ String toString() => super.toString();
+}
diff --git a/test/providers/thermostat_provider_test.dart b/test/providers/thermostat_provider_test.dart
index 38cdeddd..58f6c47d 100644
--- a/test/providers/thermostat_provider_test.dart
+++ b/test/providers/thermostat_provider_test.dart
@@ -1,97 +1,145 @@
import 'package:flutter_test/flutter_test.dart';
+import 'package:mockito/annotations.dart';
import 'package:mockito/mockito.dart';
import 'package:yonomi_device_widgets/providers/thermostat_provider.dart';
-import 'package:yonomi_platform_sdk/graphql/devices/thermostat/thermostat_queries.dart';
-import 'package:yonomi_platform_sdk/repository/devices/devices_repository.dart';
-import 'package:yonomi_platform_sdk/request/request.dart';
+import 'package:yonomi_platform_sdk/third_party/yonomi_graphql_schema/schema.docs.schema.gql.dart';
+import 'package:yonomi_platform_sdk/yonomi-sdk.dart';
-class MockSetPointActionFunction extends Mock {
+import 'thermostat_provider_test.mocks.dart';
+
+class SetPoint extends Mock {
Future call(Request request, String id, double temperature);
}
-class MockSetModeFunction extends Mock {
- Future call(Request request, String id, ThermostatMode mode);
+class SetMode extends Mock {
+ Future call(Request request, String id, GThermostatMode mode);
}
-class MockGetThermostatDetailsFunction extends Mock {
+class GetThermostatDetails extends Mock {
Future call(Request request, String id);
}
+@GenerateMocks([
+ SetPoint,
+ SetMode,
+ GetThermostatDetails,
+])
void main() {
test('Calling setPointAction calls repository method', () async {
- Request request = Request("", {});
- MockGetThermostatDetailsFunction mockGetThermostatDetailsFunction =
- MockGetThermostatDetailsFunction();
- MockSetPointActionFunction mockSetPointActionFunction =
- MockSetPointActionFunction();
+ Request request = Request('', {});
+ final mockGetThermostatDetailsFunction = MockGetThermostatDetails();
+ final mockSetPointActionFunction = MockSetPoint();
+ when(mockSetPointActionFunction.call(any, any, any))
+ .thenAnswer((_) async => null);
+ when(mockGetThermostatDetailsFunction.call(any, any))
+ .thenAnswer((_) async => Future.value(
+ Device(
+ 'someId',
+ 'someDisplayName',
+ 'someDescription',
+ 'someManufacturerName',
+ 'someModel',
+ 'someFirmwareV',
+ GDateTime('value'),
+ GDateTime('value'),
+ [ThermostatTrait('', TargetTemperature(23.1))],
+ ),
+ ));
ThermostatProvider thermostatProvider = ThermostatProvider(
- request, "deviceId",
- injectGetThermostatDetailsMethod: mockGetThermostatDetailsFunction);
+ request, 'deviceId',
+ getThermostatDetails: mockGetThermostatDetailsFunction);
- await thermostatProvider.setPointAction("DeviceId", 22.0,
- injectSetPointThermostatMethod: mockSetPointActionFunction);
+ await thermostatProvider.setPointAction('DeviceId', 22.0,
+ setPoint: mockSetPointActionFunction);
- verify(mockSetPointActionFunction(any, any, 22.0)).called(1);
+ verify(mockSetPointActionFunction.call(request, 'DeviceId', 22.0))
+ .called(1);
});
test('Calling setThermostatMode calls repository method', () async {
- Request request = Request("", {});
- MockGetThermostatDetailsFunction mockGetThermostatDetailsFunction =
- MockGetThermostatDetailsFunction();
- MockSetModeFunction mockSetModeFunction = MockSetModeFunction();
+ Request request = Request('', {});
+ final mockGetThermostatDetailsFunction = MockGetThermostatDetails();
+ final mockSetModeFunction = MockSetMode();
+ when(mockGetThermostatDetailsFunction.call(any, any))
+ .thenAnswer((_) async => Future.value(
+ Device(
+ 'someId',
+ 'someDisplayName',
+ 'someDescription',
+ 'someManufacturerName',
+ 'someModel',
+ 'someFirmwareV',
+ GDateTime('value'),
+ GDateTime('value'),
+ [ThermostatTrait('', TargetTemperature(23.1))],
+ ),
+ ));
+ when(mockSetModeFunction.call(any, any, any)).thenAnswer((_) async => null);
ThermostatProvider thermostatProvider = ThermostatProvider(
- request, "deviceId",
- injectGetThermostatDetailsMethod: mockGetThermostatDetailsFunction);
+ request, 'deviceId',
+ getThermostatDetails: mockGetThermostatDetailsFunction);
- await thermostatProvider.setThermostatMode("DeviceId", ThermostatMode.auto,
- injectSetModeMethod: mockSetModeFunction);
+ await thermostatProvider.setThermostatMode('DeviceId', GThermostatMode.AUTO,
+ setMode: mockSetModeFunction);
- verify(mockSetModeFunction(any, any, ThermostatMode.auto)).called(1);
+ verify(mockSetModeFunction.call(request, 'DeviceId', GThermostatMode.AUTO))
+ .called(1);
});
test('Calling getDeviceDetail calls repository method', () async {
- Request request = Request("", {});
- MockGetThermostatDetailsFunction mockGetThermostatDetailsFunction =
- MockGetThermostatDetailsFunction();
- ThermostatProvider thermostatProvider = ThermostatProvider(
- request, "deviceId",
- injectGetThermostatDetailsMethod: mockGetThermostatDetailsFunction);
+ Request request = Request('', {});
+ final mockGetThermostatDetailsFunction = MockGetThermostatDetails();
- await thermostatProvider.getDeviceDetail("DeviceId",
- injectGetThermostatDetailsMethod: mockGetThermostatDetailsFunction);
+ when(mockGetThermostatDetailsFunction.call(any, any))
+ .thenAnswer((_) async => Future.value(
+ Device(
+ 'deviceId',
+ 'someDisplayName',
+ 'someDescription',
+ 'someManufacturerName',
+ 'someModel',
+ 'someFirmwareV',
+ GDateTime('value'),
+ GDateTime('value'),
+ [ThermostatTrait('', TargetTemperature(23.1))],
+ ),
+ ));
+ ThermostatProvider thermostatProvider = ThermostatProvider(
+ request, 'deviceId',
+ getThermostatDetails: mockGetThermostatDetailsFunction);
+ await thermostatProvider.getDeviceDetail('deviceId',
+ getThermostatDetails: mockGetThermostatDetailsFunction);
- verify(mockGetThermostatDetailsFunction(any, any)).called(2);
+ verify(mockGetThermostatDetailsFunction.call(request, 'deviceId'))
+ .called(2);
});
test('Device data is set using DeviceRepository\'s return values', () async {
- Request request = Request("", {});
+ Request request = Request('', {});
- MockGetThermostatDetailsFunction mockGetThermostatDetailsFunction =
- MockGetThermostatDetailsFunction();
- when(mockGetThermostatDetailsFunction(any, any))
- .thenAnswer((_) => Future.value(
+ final mockGetThermostatDetailsFunction = MockGetThermostatDetails();
+ when(mockGetThermostatDetailsFunction.call(any, any))
+ .thenAnswer((_) async => Future.value(
Device(
- "someId",
- "someDisplayName",
- "someDescription",
- "someManufacturerName",
- "someModel",
- "someFirmwareV",
- "someSoftwareV",
- "someSerialNumber",
- DateTime.now(),
- DateTime.now(),
- [ThermostatTrait("", TargetTemperature(23.1))],
+ 'someId',
+ 'someDisplayName',
+ 'someDescription',
+ 'someManufacturerName',
+ 'someModel',
+ 'someFirmwareV',
+ GDateTime('value'),
+ GDateTime('value'),
+ [ThermostatTrait('', TargetTemperature(23.1))],
),
));
ThermostatProvider thermostatProvider = ThermostatProvider(
- request, "deviceId",
- injectGetThermostatDetailsMethod: mockGetThermostatDetailsFunction);
+ request, 'deviceId',
+ getThermostatDetails: mockGetThermostatDetailsFunction);
- await thermostatProvider.getDeviceDetail("DeviceId",
- injectGetThermostatDetailsMethod: mockGetThermostatDetailsFunction);
+ await thermostatProvider.getDeviceDetail('deviceId',
+ getThermostatDetails: mockGetThermostatDetailsFunction);
- expect(thermostatProvider.deviceDetail.displayName, "someDisplayName");
+ expect(thermostatProvider.deviceDetail?.displayName, 'someDisplayName');
expect(thermostatProvider.thermostatTargetTemperature, 23.1);
});
}
diff --git a/test/providers/thermostat_provider_test.mocks.dart b/test/providers/thermostat_provider_test.mocks.dart
new file mode 100644
index 00000000..d82abbc1
--- /dev/null
+++ b/test/providers/thermostat_provider_test.mocks.dart
@@ -0,0 +1,76 @@
+// Mocks generated by Mockito 5.0.15 from annotations
+// in yonomi_device_widgets/test/providers/thermostat_provider_test.dart.
+// Do not manually edit this file.
+
+import 'dart:async' as _i4;
+
+import 'package:mockito/mockito.dart' as _i1;
+import 'package:yonomi_platform_sdk/third_party/yonomi_graphql_schema/schema.docs.schema.gql.dart'
+ as _i5;
+import 'package:yonomi_platform_sdk/yonomi-sdk.dart' as _i2;
+
+import 'thermostat_provider_test.dart' as _i3;
+
+// ignore_for_file: avoid_redundant_argument_values
+// ignore_for_file: avoid_setters_without_getters
+// ignore_for_file: comment_references
+// ignore_for_file: implementation_imports
+// ignore_for_file: invalid_use_of_visible_for_testing_member
+// ignore_for_file: prefer_const_constructors
+// ignore_for_file: unnecessary_parenthesis
+
+class _FakeDevice_0 extends _i1.Fake implements _i2.Device {}
+
+/// A class which mocks [SetPoint].
+///
+/// See the documentation for Mockito's code generation for more information.
+class MockSetPoint extends _i1.Mock implements _i3.SetPoint {
+ MockSetPoint() {
+ _i1.throwOnMissingStub(this);
+ }
+
+ @override
+ _i4.Future call(
+ _i2.Request? request, String? id, double? temperature) =>
+ (super.noSuchMethod(Invocation.method(#call, [request, id, temperature]),
+ returnValue: Future.value(),
+ returnValueForMissingStub: Future.value()) as _i4.Future);
+ @override
+ String toString() => super.toString();
+}
+
+/// A class which mocks [SetMode].
+///
+/// See the documentation for Mockito's code generation for more information.
+class MockSetMode extends _i1.Mock implements _i3.SetMode {
+ MockSetMode() {
+ _i1.throwOnMissingStub(this);
+ }
+
+ @override
+ _i4.Future call(
+ _i2.Request? request, String? id, _i5.GThermostatMode? mode) =>
+ (super.noSuchMethod(Invocation.method(#call, [request, id, mode]),
+ returnValue: Future.value(),
+ returnValueForMissingStub: Future.value()) as _i4.Future);
+ @override
+ String toString() => super.toString();
+}
+
+/// A class which mocks [GetThermostatDetails].
+///
+/// See the documentation for Mockito's code generation for more information.
+class MockGetThermostatDetails extends _i1.Mock
+ implements _i3.GetThermostatDetails {
+ MockGetThermostatDetails() {
+ _i1.throwOnMissingStub(this);
+ }
+
+ @override
+ _i4.Future<_i2.Device> call(_i2.Request? request, String? id) =>
+ (super.noSuchMethod(Invocation.method(#call, [request, id]),
+ returnValue: Future<_i2.Device>.value(_FakeDevice_0()))
+ as _i4.Future<_i2.Device>);
+ @override
+ String toString() => super.toString();
+}
diff --git a/test/widgets/components/modes_toolbar_test.dart b/test/widgets/components/modes_toolbar_test.dart
index 4f670290..ac90fcdb 100644
--- a/test/widgets/components/modes_toolbar_test.dart
+++ b/test/widgets/components/modes_toolbar_test.dart
@@ -1,27 +1,29 @@
-import 'package:yonomi_device_widgets/components/modes_toolbar.dart';
-import 'package:yonomi_device_widgets/providers/thermostat_provider.dart';
import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';
+import 'package:mockito/annotations.dart';
import 'package:mockito/mockito.dart';
import 'package:provider/provider.dart';
-import 'package:yonomi_platform_sdk/graphql/devices/thermostat/thermostat_queries.graphql.dart';
-
-class MockThermostatProvider extends Mock implements ThermostatProvider {}
-
-MockThermostatProvider mockProvider = MockThermostatProvider();
+import 'package:yonomi_device_widgets/components/modes_toolbar.dart';
+import 'package:yonomi_device_widgets/providers/thermostat_provider.dart';
+import 'package:yonomi_platform_sdk/third_party/yonomi_graphql_schema/schema.docs.schema.gql.dart';
-Widget createModesToolbar() {
- return MaterialApp(
- home: ChangeNotifierProvider(
- create: (_) => mockProvider,
- child: Column(children: [
- ModesToolbar(deviceId: ""),
- ]),
- ),
- );
-}
+import 'modes_toolbar_test.mocks.dart';
+@GenerateMocks([ThermostatProvider])
void main() {
+ MockThermostatProvider mockProvider = MockThermostatProvider();
+
+ Widget createModesToolbar() {
+ return MaterialApp(
+ home: ChangeNotifierProvider(
+ create: (_) => mockProvider,
+ child: Column(children: [
+ ModesToolbar(deviceId: ""),
+ ]),
+ ),
+ );
+ }
+
testWidgets('Setup - ModesToolbar should contain specific icons',
(WidgetTester tester) async {
await tester.pumpWidget(createModesToolbar());
@@ -38,7 +40,7 @@ void main() {
await tester.tap(find.widgetWithText(ModeIconButton, "A"));
- verify(mockProvider.setThermostatMode(any, ThermostatMode.auto)).called(1);
+ verify(mockProvider.setThermostatMode(any, GThermostatMode.AUTO)).called(1);
});
testWidgets('ModesToolbar - button should set mode to cool when pressed',
@@ -47,7 +49,7 @@ void main() {
await tester.tap(find.widgetWithIcon(ModeIconButton, Icons.ac_unit));
- verify(mockProvider.setThermostatMode(any, ThermostatMode.cool)).called(1);
+ verify(mockProvider.setThermostatMode(any, GThermostatMode.COOL)).called(1);
});
testWidgets('ModesToolbar - button should set mode to heat when pressed',
@@ -56,7 +58,7 @@ void main() {
await tester.tap(find.widgetWithIcon(ModeIconButton, Icons.whatshot));
- verify(mockProvider.setThermostatMode(any, ThermostatMode.heat)).called(1);
+ verify(mockProvider.setThermostatMode(any, GThermostatMode.HEAT)).called(1);
});
testWidgets('ModesToolbar - button should set mode to eco when pressed',
@@ -65,7 +67,7 @@ void main() {
await tester.tap(find.widgetWithIcon(ModeIconButton, Icons.eco));
- verify(mockProvider.setThermostatMode(any, ThermostatMode.airflow))
+ verify(mockProvider.setThermostatMode(any, GThermostatMode.AIRFLOW))
.called(1);
});
}
diff --git a/test/widgets/components/modes_toolbar_test.mocks.dart b/test/widgets/components/modes_toolbar_test.mocks.dart
new file mode 100644
index 00000000..29875dda
--- /dev/null
+++ b/test/widgets/components/modes_toolbar_test.mocks.dart
@@ -0,0 +1,87 @@
+// Mocks generated by Mockito 5.0.15 from annotations
+// in yonomi_device_widgets/test/widgets/components/modes_toolbar_test.dart.
+// Do not manually edit this file.
+
+import 'dart:async' as _i3;
+import 'dart:ui' as _i7;
+
+import 'package:mockito/mockito.dart' as _i1;
+import 'package:yonomi_device_widgets/providers/thermostat_provider.dart'
+ as _i2;
+import 'package:yonomi_platform_sdk/src/repository/devices/devices_repository.dart'
+ as _i6;
+import 'package:yonomi_platform_sdk/src/repository/devices/thermostat_repository.dart'
+ as _i4;
+import 'package:yonomi_platform_sdk/third_party/yonomi_graphql_schema/schema.docs.schema.gql.dart'
+ as _i5;
+
+// ignore_for_file: avoid_redundant_argument_values
+// ignore_for_file: avoid_setters_without_getters
+// ignore_for_file: comment_references
+// ignore_for_file: implementation_imports
+// ignore_for_file: invalid_use_of_visible_for_testing_member
+// ignore_for_file: prefer_const_constructors
+// ignore_for_file: unnecessary_parenthesis
+
+/// A class which mocks [ThermostatProvider].
+///
+/// See the documentation for Mockito's code generation for more information.
+class MockThermostatProvider extends _i1.Mock
+ implements _i2.ThermostatProvider {
+ MockThermostatProvider() {
+ _i1.throwOnMissingStub(this);
+ }
+
+ @override
+ double get thermostatTargetTemperature =>
+ (super.noSuchMethod(Invocation.getter(#thermostatTargetTemperature),
+ returnValue: 0.0) as double);
+ @override
+ bool get hasListeners =>
+ (super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false)
+ as bool);
+ @override
+ _i3.Future setPointAction(String? deviceId, double? temperature,
+ {_i2.SetPointActionFunction? setPoint =
+ _i4.ThermostatRepository.setPointThermostat}) =>
+ (super.noSuchMethod(
+ Invocation.method(
+ #setPointAction, [deviceId, temperature], {#setPoint: setPoint}),
+ returnValue: Future.value(),
+ returnValueForMissingStub: Future.value()) as _i3.Future);
+ @override
+ _i3.Future setThermostatMode(
+ String? deviceId, _i5.GThermostatMode? mode,
+ {_i2.SetModeFunction? setMode = _i4.ThermostatRepository.setMode}) =>
+ (super.noSuchMethod(
+ Invocation.method(
+ #setThermostatMode, [deviceId, mode], {#setMode: setMode}),
+ returnValue: Future.value(),
+ returnValueForMissingStub: Future.value()) as _i3.Future);
+ @override
+ _i3.Future getDeviceDetail(String? deviceId,
+ {_i2.GetThermostatDetailsFunction? getThermostatDetails =
+ _i6.DevicesRepository.getThermostatDetails}) =>
+ (super.noSuchMethod(
+ Invocation.method(#getDeviceDetail, [deviceId],
+ {#getThermostatDetails: getThermostatDetails}),
+ returnValue: Future.value(),
+ returnValueForMissingStub: Future.value()) as _i3.Future);
+ @override
+ void addListener(_i7.VoidCallback? listener) =>
+ super.noSuchMethod(Invocation.method(#addListener, [listener]),
+ returnValueForMissingStub: null);
+ @override
+ void removeListener(_i7.VoidCallback? listener) =>
+ super.noSuchMethod(Invocation.method(#removeListener, [listener]),
+ returnValueForMissingStub: null);
+ @override
+ void dispose() => super.noSuchMethod(Invocation.method(#dispose, []),
+ returnValueForMissingStub: null);
+ @override
+ void notifyListeners() =>
+ super.noSuchMethod(Invocation.method(#notifyListeners, []),
+ returnValueForMissingStub: null);
+ @override
+ String toString() => super.toString();
+}