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/a47f61c80264a529dd2fba947c7b5c1b to your computer and use it in GitHub Desktop.
Save sbis04/a47f61c80264a529dd2fba947c7b5c1b to your computer and use it in GitHub Desktop.
Future<AssetData> getAssetList() async {
try {
Response response = await _dio.get(
"/assets",
);
if (response.statusCode == 200) {
AssetData assetData = AssetData.fromJson(response.data);
return assetData;
}
} catch (e) {
print('Error starting build: $e');
throw Exception('Failed to retrieve videos from MUX');
}
return null;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment