type property
String
type
Identifies what kind of target this is.
Can be "page"
, "background_page"
,
"service_worker"
, "shared_worker"
, "browser"
, "webview"
or "other"
.
Implementation
String get type {
var type = _info.type;
if (_possibleTargetTypes.contains(type)) return type;
return 'other';
}
Sets the kind of target this is.
Must be "page"
, "background_page"
,
"service_worker"
, "shared_worker"
, "browser"
or "webview"
.
Implementation
set type(String targetType) {
if (_possibleTargetTypes.contains(targetType)) {
final json = _info.toJson();
json['type'] = targetType;
_info = TargetInfo.fromJson(json);
}
}