SetBadgeBackgroundColorDetails constructor
SetBadgeBackgroundColorDetails(
{ - required Object color,
- int? tabId,
})
Implementation
SetBadgeBackgroundColorDetails({
/// An array of four integers in the range [0,255] that make up the RGBA
/// color of the badge. For example, opaque red is `[255, 0, 0, 255]`. Can
/// also be a string with a CSS value, with opaque red being `#FF0000` or
/// `#F00`.
required Object color,
/// Limits the change to when a particular tab is selected. Automatically
/// resets when the tab is closed.
int? tabId,
}) : _wrapped = $js.SetBadgeBackgroundColorDetails(
color: switch (color) {
String() => color.jsify()!,
List<int>() => color.toJSArray((e) => e),
_ => throw UnsupportedError(
'Received type: ${color.runtimeType}. Supported types are: String, List<int>')
},
tabId: tabId,
);