setUnitExtraProps method
Set the extra properties for the unit
Implementation
void setUnitExtraProps(HashMap<String, String> extraProperties) async {
try {
await _initializationWebviewCompleter.future;
if (extraProperties.isEmpty) {
return;
}
for (var property in extraProperties.entries) {
var key = property.key;
var value = property.value;
if (TextUtils.isEmptyOrNull(key) || (TextUtils.isEmptyOrNull(value))) {
continue;
}
switch (key) {
case TBLProperties.KEEP_ALIVE_KEY:
bool? keepAlive = TBLProperties.stringToBool(value);
if (keepAlive != null) {
this._taboolaWebviewController.setIsKeepAlive(keepAlive);
}
break;
default:
_unrecognizedUnitExtraProps[key] = value;
}
}
} catch (e) {
TBLLogger.log("setUnitExtraProps | Error: $e");
}
}