getStreamUploadRequestById method
Implementation
@override
Future<StreamUploadRequest?> getStreamUploadRequestById(String id) async {
try {
final jsonString = await methodChannel.invokeMethod<String>(
'getStreamUploadRequestById',
{'id': id},
);
if (jsonString == null || jsonString == '{}') {
return null;
}
final jsonData = jsonDecode(jsonString) as Map<String, dynamic>;
return StreamUploadRequest.fromJson(jsonData);
} on PlatformException catch (e) {
throw PlatformException(
code: 'STREAM_REQUEST_ERROR',
message: e.message,
details: e.toString(),
);
}
}