init method
Initializes the Xandr SDK.
memberId is the Xandr member ID.
publisherId is the optional Xandr publisher ID.
set testMode to true if in a test environment
Implementation
Future<bool> init(
int memberId, {
int? publisherId,
bool testMode = false,
}) async {
debugPrint(
'init xandr with memberId=$memberId, publisherId=$publisherId, '
'testMode=$testMode',
);
if (isInitialized.isCompleted) {
return isInitialized.future;
}
final result = await _platform.init(
memberId,
publisherId: publisherId,
testMode: testMode,
);
isInitialized.complete(result);
return result;
}