KeyStyle class final
Colours and label weight for one group of keys.
- Annotations
Constructors
- KeyStyle({required Color fill, required Color label, FontWeight labelWeight = FontWeight.w400, Color? outline})
-
const
- KeyStyle.lerp(KeyStyle a, KeyStyle b, double t)
-
Interpolates fill, label, weight and outline.
factory
Properties
- fill → Color
-
Key background.
final
- hashCode → int
-
The hash code for this object.
no setteroverride
- label → Color
-
Label colour (≥ 4.5:1 against fill).
final
- labelWeight → FontWeight
-
Label weight. Operators and
=use a heavier weight than digits so they differ by more than colour (spec §5.4).final - outline → Color?
-
Optional key outline (high-contrast themes: ≥ 3:1 against the
background, so the key's extent is visible); null for none.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
labelWeightFor(
{required bool boldText}) → FontWeight - The label weight under the platform's Bold Text setting: three steps heavier (w400 → w700, w600 → w900), so roles keep their weight order instead of all becoming bold.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override