From 690c9e143952da02542be3a840e28096dfb2b8f4 Mon Sep 17 00:00:00 2001 From: Jonas Greifenhain Date: Fri, 13 Dec 2024 23:18:17 +0100 Subject: [PATCH] example: Don't use deprecated getter --- example/lib/widgets/rgb_led_control_widget.dart | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/example/lib/widgets/rgb_led_control_widget.dart b/example/lib/widgets/rgb_led_control_widget.dart index 20b614b..944a7fc 100644 --- a/example/lib/widgets/rgb_led_control_widget.dart +++ b/example/lib/widgets/rgb_led_control_widget.dart @@ -65,9 +65,9 @@ class _RgbLedControlWidgetState extends State { ElevatedButton( onPressed: () { widget.rgbLed.writeLedColor( - r: _currentColor.red, - g: _currentColor.green, - b: _currentColor.blue, + r: (255 * _currentColor.r).round(), + g: (255 * _currentColor.g).round(), + b: (255 * _currentColor.b).round(), ); }, child: const Text('Set'),