AppstackPluginPlatform class abstract
The platform interface behind every AppstackPlugin call.
This is public on purpose, as the supported way to fake the plugin in an
app's unit tests. Extend it with MockPlatformInterfaceMixin (from
package:plugin_platform_interface) and set instance:
class FakeAppstack extends AppstackPluginPlatform
with MockPlatformInterfaceMixin {
@override
Future<void> sendEvent(String eventType, String? eventName,
Map<String, dynamic>? parameters) async {}
}
setUp(() => AppstackPluginPlatform.instance = FakeAppstack());
Methods a fake doesn't override throw UnimplementedError.
- Inheritance
-
- Object
- PlatformInterface
- AppstackPluginPlatform
Constructors
- AppstackPluginPlatform()
- Constructs a AppstackPluginPlatform.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
configure(
String apiKey, int logLevel, String? customerUserId) → Future< void> - Configure Appstack SDK with your API key and optional parameters
-
deleteUserData(
) → Future< void> - Permanently delete the current user's Appstack data.
-
enableAppleAdsAttribution(
) → Future< bool> - Enable Apple Search Ads Attribution tracking (iOS only)
-
getAppstackId(
) → Future< String?> - Get the Appstack ID for the current user
-
getAttributionParams(
) → Future< Map< String, dynamic> > - Get attribution parameters
-
handleUniversalLink(
String url, List< String> ? allowedHosts) → Future<Map< String, dynamic> ?> -
isSdkDisabled(
) → Future< bool> - Check if the SDK is disabled
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
sendEvent(
String eventType, String? eventName, Map< String, dynamic> ? parameters) → Future<void> - Send an event with optional parameters
-
setCustomerUserId(
String? customerUserId) → Future< void> - Set — or clear — the customer user id after configure
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- instance ↔ AppstackPluginPlatform
-
The default instance of AppstackPluginPlatform to use.
getter/setter pair