From 671c6aa65937c914413ce53bbb855ee780b7df21 Mon Sep 17 00:00:00 2001 From: uvok Date: Sun, 3 Aug 2025 16:34:00 +0200 Subject: Avoid late final by using factory ctor/getters --- lib/model/motive_selection/flutter_blue_plus_motive_selection.dart | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'lib/model/motive_selection') diff --git a/lib/model/motive_selection/flutter_blue_plus_motive_selection.dart b/lib/model/motive_selection/flutter_blue_plus_motive_selection.dart index 4046d83..561388a 100644 --- a/lib/model/motive_selection/flutter_blue_plus_motive_selection.dart +++ b/lib/model/motive_selection/flutter_blue_plus_motive_selection.dart @@ -35,12 +35,10 @@ class FlutterBluePlusMotiveSelection List _cachedMotives = []; - late final BluetoothDevice _fbpDevice; + BluetoothDevice get _fbpDevice => _device.scanResult.device; FlutterBluePlusMotiveSelection({required FlutterBluePlusDevice device}) - : _device = device { - _fbpDevice = _device.scanResult.device; - } + : _device = device; @override Future getCurrentMotive() async { -- cgit v1.2.3