downloadPackData static method

Future<PackData> downloadPackData(
  1. int mapID
)

Downloads pack data for a given map ID.

mapID - The ID of the map for which to download the pack data. Returns a map with filePath, eTag, version, and fileName.

Implementation

static Future<PackData> downloadPackData(int mapID) async {
  final result = await _methodChannel.invokeMethod<Map<dynamic, dynamic>>(
    'downloadPackData',
    {'mapID': mapID},
  );
  return PackData(
    filePath: result!['filePath'] as String,
    eTag: result['eTag'] as String,
    version: result['version'] as String,
    fileName: result['fileName'] as String,
  );
}