Nudge class
Nudge is a centralized SDK manager for handling initialization, user tracking, and event logging within the Nudge SDK.
Constructors
Properties
- apiKey → String
-
API key used for authentication.
final
- debugMode → bool
-
Determines if the SDK is running in debug mode.
final
- externalId ↔ String?
-
External identifier associated with the user.
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- uid ↔ String?
-
User's unique identifier.
getter/setter pair
Methods
-
config(
{GlobalKey< State< ? screenshotKey}) → Future<StatefulWidget> >void> - Configures the SDK with a custom navigator key.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
ping(
) → Future< void> -
toString(
) → String -
A string representation of this object.
inherited
-
track(
{required String event, Map< String, dynamic> ? properties}) → Future<void> - Tracks an event with optional properties.
-
userIdentifier(
{required String? externalId, String? name, String? email, String? phoneNumber, Map< String, dynamic> ? properties}) → Future<void> - Identifies the user and updates their attributes.
-
userSignOut(
) → Future< void> - Logs out the current user from Nudge.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
-
Provides access to the navigator key.
no setter
-
screenshotKey
→ GlobalKey<
State< StatefulWidget> > -
Provides access to the screenshot key.
no setter
- sessionId ↔ String?
-
Unique session identifier.
getter/setter pair
- uidG ↔ String?
-
Global unique user identifier.
getter/setter pair
-
userProps
↔ Map<
String, dynamic> -
Stores user properties for tracking.
getter/setter pair
Static Methods
-
getInstance(
) → Nudge - Retrieves the current instance of Nudge. Throws an exception if the instance is not initialized.