config method

Future<void> config({
  1. required GlobalKey<NavigatorState> navigatorKey,
  2. GlobalKey<State<StatefulWidget>>? screenshotKey,
})

Configures the SDK with a custom navigator key.

Implementation

Future<void> config({
  required GlobalKey<NavigatorState> navigatorKey,
  GlobalKey? screenshotKey,
}) async {
  _navigatorKey = navigatorKey;
  _screenshotKey = screenshotKey ?? _screenshotKey;
  // _nudgeCoreV2NativeServices = NudgeCoreV2NativeServices();
  NLogger.d("Navigator key updated for Nudge SDK.");
}