getDevices method
Implementation
@override
Future<List<WearableDevice>> getDevices() async {
final raw = await methodChannel.invokeListMethod<dynamic>('getDevices');
if (raw == null) return <WearableDevice>[];
final devices = raw
.map(
(dynamic e) =>
WearableDevice.fromMap(Map<String, dynamic>.from(e as Map)),
)
.toList();
if (kDebugMode) {
debugPrint(
'[MetaWearablesDAT] getDevices → ${devices.length} device(s): ${devices.map((d) => d.type.name).join(', ')}',
);
}
return devices;
}