advertisementDrawerApi function

Future advertisementDrawerApi(
  1. String moreLiveAppUrl
)

Implementation

Future advertisementDrawerApi(String moreLiveAppUrl) async {
  if (moreLiveAppUrl != "") {
    final responseAdvertise = await http.get(Uri.parse(moreLiveAppUrl));
    if (responseAdvertise.statusCode == 200) {
      moreLiveApp = MoreLiveApp.fromJson(jsonDecode(responseAdvertise.body));
    } else {
      throw Exception('Failed to load album');
    }
  }
}