getDevices method

  1. @override
Future<List<MtpDevice>> getDevices()
override

Implementation

@override
Future<List<MtpDevice>> getDevices() async {
  final devices = await methodChannel.invokeListMethod<Object?>('getDevices');
  return (devices ?? <Object?>[])
      .cast<Map<Object?, Object?>>()
      .map(MtpDevice.fromMap)
      .toList(growable: false);
}