getInstance static method

Nudge getInstance()

Retrieves the current instance of Nudge. Throws an exception if the instance is not initialized.

Implementation

static Nudge getInstance() {
  if (_instance == null) {
    // Auto-create with safe defaults
    _instance = Nudge(
      apiKey: 'API_KEY_NOT_INITIALIZED',
      debugMode: true,
      disableNudge: true,
      region: Region.IN,
    );
    _autoCreated = true; // mark as auto-init
  }
  return _instance!;
}