doOnLaunch method

dynamic doOnLaunch()

Implementation

doOnLaunch() async {
  var response = await http.get(Uri.parse(
      "${APIMode.BASE_URL}api/v1/subscription/embedded-subscription?clientId=${ConscentInitializer.mClientId}"));
  result = jsonDecode(response.body)["subscriptions"];
  dummy = jsonDecode(response.body);

  model = Embedded.fromJson(dummy);
  tierId = result[i]['tiers'][0]['offers'][0]['_id'];

  if (response.statusCode != 200) {
    ConscentMethods().onPluginError(response.body);
  }

  setState(() {
    isLoaded = true;
  });
}