From b2826d8ca982dea575922c35a40897ac60248b9f Mon Sep 17 00:00:00 2001 From: uvok Date: Thu, 31 Jul 2025 18:58:18 +0200 Subject: Correct? interfae usage --- lib/control/scanner_controller.dart | 2 +- lib/control/scanner_controller_impl.dart | 2 +- lib/model/connection/device_connection.dart | 2 +- lib/model/device/device.dart | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) (limited to 'lib') diff --git a/lib/control/scanner_controller.dart b/lib/control/scanner_controller.dart index 5c934ef..5e330b3 100644 --- a/lib/control/scanner_controller.dart +++ b/lib/control/scanner_controller.dart @@ -24,7 +24,7 @@ enum ScanAvailability { unavailable, available } /// Represents a scanner controller. /// It emits devices which may be connected to later. -abstract class ScannerController { +abstract interface class ScannerController { Stream> get scanResultsStream; Stream get statusStream; Stream get availabilityStream; diff --git a/lib/control/scanner_controller_impl.dart b/lib/control/scanner_controller_impl.dart index 1b55105..e24cabf 100644 --- a/lib/control/scanner_controller_impl.dart +++ b/lib/control/scanner_controller_impl.dart @@ -21,7 +21,7 @@ import 'package:uvok_epaper_badge/model/device/device.dart'; import 'package:rxdart/rxdart.dart'; /// Helper class which provides the setStatus method. -abstract class ScannerControllerImpl extends ScannerController { +abstract class ScannerControllerImpl implements ScannerController { final BehaviorSubject _scanStatusController = BehaviorSubject(); final BehaviorSubject> _deviceContoller = diff --git a/lib/model/connection/device_connection.dart b/lib/model/connection/device_connection.dart index ef8a8fc..f50bd2c 100644 --- a/lib/model/connection/device_connection.dart +++ b/lib/model/connection/device_connection.dart @@ -17,7 +17,7 @@ import 'package:flutter/foundation.dart'; enum ConnectionStatus { disconnected, connected, error } -abstract class DeviceConnection { +abstract interface class DeviceConnection { Future connect(); Future disconnect(); ValueNotifier get status; diff --git a/lib/model/device/device.dart b/lib/model/device/device.dart index 1d9530b..577ac9e 100644 --- a/lib/model/device/device.dart +++ b/lib/model/device/device.dart @@ -14,7 +14,7 @@ // along with this program. If not, see . /// Represents a (badge) device to be connected to. -abstract class Device { +abstract interface class Device { String? get name; String? get address; int? get rssi; -- cgit v1.2.3