Skip to content

Instantly share code, notes, and snippets.

@sbis04
Created February 17, 2021 01:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sbis04/254c7bfd693364fcf71c7651a18f6be9 to your computer and use it in GitHub Desktop.
Save sbis04/254c7bfd693364fcf71c7651a18f6be9 to your computer and use it in GitHub Desktop.
Future<VideoData> checkPostStatus({String videoId}) async {
try {
Response response = await _dio.get(
"/asset",
queryParameters: {
'videoId': videoId,
},
);
if (response.statusCode == 200) {
VideoData videoData = VideoData.fromJson(response.data);
return videoData;
}
} catch (e) {
print('Error starting build: $e');
throw Exception('Failed to check status');
}
return null;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment