getBootpayJSBeforeContentLoaded method

Future<List<String>> getBootpayJSBeforeContentLoaded()

Implementation

Future<List<String>> getBootpayJSBeforeContentLoaded() async {
    List<String> result = [];
    if (Platform.isAndroid) {
      result.add("BootPay.setDevice('ANDROID');");
    } else if (Platform.isIOS) {
      result.add("BootPay.setDevice('IOS');");
    }
    result.add(await getAnalyticsData());

    // if (this.widget.payload?.extra?.quickPopup == 1 &&
    //     this.widget.payload?.extra?.popup == 1) {
    //   result.add("setTimeout(function() {BootPay.startQuickPopup();}, 30);");
    // }
  return result;
}