summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoruvok2025-07-31 18:58:18 +0200
committeruvok2025-07-31 18:58:18 +0200
commitb2826d8ca982dea575922c35a40897ac60248b9f (patch)
tree52cc19cc6d7041769f1f8d361bf28822f83a6ac7
parentbb3d3b1947b1139ad34f65d446592681a5792ec1 (diff)
Correct? interfae usage
-rw-r--r--lib/control/scanner_controller.dart2
-rw-r--r--lib/control/scanner_controller_impl.dart2
-rw-r--r--lib/model/connection/device_connection.dart2
-rw-r--r--lib/model/device/device.dart2
4 files changed, 4 insertions, 4 deletions
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<List<Device>> get scanResultsStream;
Stream<ScanStatus> get statusStream;
Stream<ScanAvailability> 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<ScanStatus> _scanStatusController =
BehaviorSubject<ScanStatus>();
final BehaviorSubject<List<Device>> _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<void> connect();
Future<void> disconnect();
ValueNotifier<ConnectionStatus> 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 <https://www.gnu.org/licenses/>.
/// Represents a (badge) device to be connected to.
-abstract class Device {
+abstract interface class Device {
String? get name;
String? get address;
int? get rssi;