configure method
Configures the Offerwall SDK with the provided apiKey.
This method can also take optional parameters:
subId: An optional subscription ID for tracking.userId: An optional user ID; if not provided, the SDK will generate one.
Throws an UnimplementedError if the platform-specific implementation has not been provided.
Implementation
@override
Future<void> configure(String apiKey, {String? subId, String? userId}) async {
try {
await methodChannel.invokeMethod('configure', {
'apiKey': apiKey,
'subId': subId,
'userId': userId,
});
} on PlatformException {
rethrow;
} catch (e) {
throw PlatformException(
code: 'CONFIGURE_ERROR',
message: 'Failed to configure offerwall: $e');
}
}