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. Can also be a string with a CSS hex color value; for
/// example, `#FF0000` or `#F00` (red). Renders colors at full opacity.
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,
);