deleteMedia method Null safety

Future<bool?> deleteMedia(
  1. int fileIndex
)

Deletes a specific media file from the Drone's SD card (by Index).

The fileIndex is used to locate the relevant file from the Media List and delete it. The getMediaList() must be triggered before using deleteMedia().

Implementation

static Future<bool?> deleteMedia(int fileIndex) async {
  final success = await _api?.deleteMedia(fileIndex);
  return success;
}