Admost.initialize constructor
Admost.initialize({})
Implementation
Admost.initialize(
{required String appId,
String? userConsent,
String? subjectToGDPR,
String? subjectToCCPA}) {
MethodChannel _channel = const MethodChannel('admost_flutter');
if (appId == null) {
print("appId cannot be null!");
} else {
this.appId = appId;
Map<String, String> config = {
"appId": appId,
};
if (userConsent != null) {
config["userConsent"] = userConsent;
}
if (subjectToGDPR != null) {
config["subjectToGDPR"] = subjectToGDPR;
}
if (subjectToCCPA != null) {
config["subjectToCCPA"] = subjectToCCPA;
}
_channel.invokeMethod('initialize', config);
}
}