imageData property
Object?
get
imageData
Either an ImageData object or a dictionary {size -> ImageData}
representing icon to be set. If the icon is specified as a dictionary, the
actual image to be used is chosen depending on screen's pixel density. If
the number of image pixels that fit into one screen space unit equals
scale
, then image with size scale
* n will be selected, where n is the
size of the icon in the UI. At least one image must be specified. Note
that 'details.imageData = foo' is equivalent to 'details.imageData =
{'16': foo}'
Implementation
Object? get imageData => _wrapped.imageData?.when(
isOther: (v) => (v as $js_browser_action.ImageDataType),
isMap: (v) => v.toDartMap(),
);
set
imageData
(Object? v)
Implementation
set imageData(Object? v) {
_wrapped.imageData = switch (v) {
JSObject() => v,
Map() => v.jsify()!,
null => null,
_ => throw UnsupportedError(
'Received type: ${v.runtimeType}. Supported types are: JSObject, Map')
};
}