AutoImageTint class
Host-aware tint options for image glyphs shown in CarPlay and Android Auto.
Prefer AutoImageTint.platform for icons that must remain visible in focused or selected rows. It lets the host choose an appropriate color on Android Auto and uses a high-contrast system color on CarPlay.
Custom colors use UIColor RGB channels authored as byte values from 0 to
255. Native platforms convert those byte values internally, so callers do
not need to account for UIKit's normalized color component range.
- Available extensions
Constructors
- AutoImageTint.blue({bool selectedSafe = true})
-
Uses a platform-standard blue tint.
const
- AutoImageTint.custom({required UIColor color, UIColor? darkColor, bool selectedSafe = true})
-
Uses custom RGB byte colors for light and optional dark mode.
const
- AutoImageTint.green({bool selectedSafe = true})
-
Uses a platform-standard green tint.
const
- AutoImageTint.platform({bool selectedSafe = true})
-
Uses the host platform's default icon tint.
const
- AutoImageTint.primary({bool selectedSafe = true})
-
Uses the host platform's primary tint color.
const
- AutoImageTint.red({bool selectedSafe = true})
-
Uses a platform-standard red tint.
const
- AutoImageTint.secondary({bool selectedSafe = true})
-
Uses the host platform's secondary tint color.
const
- AutoImageTint.yellow({bool selectedSafe = true})
-
Uses a platform-standard yellow tint.
const
Properties
- color → UIColor?
-
Light-mode custom color. Only used by AutoImageTint.custom.
final
- darkColor → UIColor?
-
Dark-mode custom color. Falls back to color when omitted.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- selectedSafe → bool
-
Adds contrast protection where the platform does not manage selected-state
icon contrast for us. Currently this is applied by the CarPlay renderer.
final
- type → AutoImageTintType
-
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> -
toString(
) → String -
A string representation of this object.
inherited
-
withDarkColor(
UIColor darkColor) → AutoImageTint -
Available on AutoImageTint, provided by the AutoImageTintDarkColor extension
Returns a copy of this tint withdarkColoras its dark-mode custom color.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited