showInAppDialog static method

dynamic showInAppDialog(
  1. InAppModel inAppModel
)

Implementation

static showInAppDialog(
    InAppModel inAppModel) async {
  try {
    final currentState = InngageProperties.navigatorKey.currentState;
    final _inngageWebViewProperties = InngageProperties.inngageWebViewProperties;
    showDialog(
        context: currentState!.context,
        builder: (_) {
          return InAppDialog(
              inAppModel: inAppModel,
              inngageWebViewProperties: _inngageWebViewProperties,
              navigatorKey: InngageProperties.navigatorKey);
        });
    const storage =  FlutterSecureStorage();
    await storage.delete(key:'inapp');
  } catch (e) {
    log(e.toString());
  }
}