NeonTheme class
Shared color palette & styles. Bright-casual (Candy-Crush-style) revamp: warm light background, candy palette, white cards, bold ink text. Keeps the old constant names (cyan/magenta/…) to avoid a mass callsite rename — the values themselves have been retuned to a "candy" tone.
The bg*/card*/ink* background/card/ink token set are getters that switch
on dark — flip it on to fall back to the original neon-dark palette from
before the pivot. Existing callsites calling NeonTheme.ink/NeonTheme.card/…
need no changes; they switch automatically with the flag.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- bgBot → Color
-
no setter
- bgGradient → LinearGradient
-
Bright candy background gradient used across every screen (via NeonBg).
no setter
- bgMid → Color
-
no setter
- bgTop → Color
-
no setter
- blue ↔ Color
-
getter/setter pair
- card → Color
-
no setter
- cardAlt → Color
-
no setter
- colorBlindSafe ↔ bool
-
true = gemColors returns a color-vision-deficiency-safe 7-color set
(Okabe-Ito-derived) instead of the default candy palette. Same "flip a
mutable flag, every call site updates automatically" mechanism as
dark — a match-3-style game reading gemColors to tint gems/tiles
needs no code changes, it just gets the safer colors once this flag
(persisted by the app the same way dark is, via
StorageKeys.colorBlindSafe) is on.getter/setter pair - coral ↔ Color
-
getter/setter pair
- cyan ↔ Color
-
getter/setter pair
- dark ↔ bool
-
true = original neon-dark palette, false (default) = current bright-casual look.
getter/setter pair
-
gemColors
→ List<
Color> -
no setter
- gold ↔ Color
-
getter/setter pair
- indigo ↔ Color
-
getter/setter pair
- ink → Color
-
no setter
- inkSoft → Color
-
no setter
- lime ↔ Color
-
getter/setter pair
- lockedBorder ↔ Color
-
getter/setter pair
- lockedFill ↔ Color
-
getter/setter pair
- magenta ↔ Color
-
getter/setter pair
- muted ↔ Color
-
getter/setter pair
- orange ↔ Color
-
getter/setter pair
- panel → Color
-
no setter
- pink ↔ Color
-
getter/setter pair
- purple ↔ Color
-
getter/setter pair
- red ↔ Color
-
getter/setter pair
- teal ↔ Color
-
getter/setter pair
- yellow ↔ Color
-
getter/setter pair
Static Methods
-
drop(
{double y = 4, double blur = 10}) → List< BoxShadow> - "Chunky" drop shadow for casual cards/buttons: a soft shadow cast downward to create a raised-block look.
-
exportPalette(
) → Map< String, String> -
Every color field above as
#RRGGBBhex strings, keyed by field name (private_xxxLight/_xxxDarkfields are exposed without their leading underscore). Known limitation: alpha is dropped — every color in this palette is fully opaque today, so re-importing always yields0xFFalpha even if a future field weren't. -
glow(
Color color, {double blur = 18, double spread = 1, double intensity = 1.0}) → List< BoxShadow> - Colored glow shadow around a widget. 3 layers: a sharp bright core + a mid halo + a wide soft glow → a soft bloom in a glossy-candy style.
-
importPalette(
Map< String, Object?> json) → void -
Overwrites every known field present in
json(value must be a#RRGGBB/RRGGBBhexString) — a studio "reskin" JSON. Keys absent fromjsonkeep their current value (partial reskins are fine). Unknown keys and unparsable values are silently ignored rather than thrown — a forward/backward-compatible palette file. -
motionDuration(
BuildContext context, Duration base) → Duration -
Returns Duration.zero if reducedMotion is on, else
base. -
reducedMotion(
BuildContext context) → bool - Whether the OS "Reduce Motion" accessibility flag is on — check this before running a purely decorative animation (shader background, pop-in, scale-on-press...) and skip/shorten it for motion-sensitive users. One central helper so every animated widget in the kit checks the same flag the same way.
Constants
-
colorBlindSafeGemColors
→ const List<
Color> - Okabe-Ito-inspired colors with strong separability for common red/green color-vision deficiencies. The list keeps seven slots so callers can switch palettes without changing their color indexes.
- curvePop → const Curve
- Playful pop curve with overshoot for celebration and reward moments.
- curveSmooth → const Curve
- Symmetrical smooth curve for loop or continuous movements.
- curveSurface → const Curve
- Smooth surface curve for neutral/system transitions.
- fontFamily → const String
- Motion-language convention for ephemeral/entrance animations (IDEA-21) — pick the curve by what KIND of moment it is, not by habit:
- motionCelebrate → const Duration
- Celebration / reward sequence duration (800ms) — chest open, confetti burst.
- motionDefault → const Duration
- Default UI transition duration (250ms) — modal slide, tab switch.
- motionDeliberate → const Duration
- Deliberate entrance/exit duration (400ms) — sheet expand, banner drop.
- motionFast → const Duration
- Fast micro-interaction duration (150ms) — tap feedback, badge pop.
- s8 → const double
- s16 → const double
- s24 → const double
- springBouncy → const SpringDescription
- Spring parameters for playful, neutral and crisp interactions.
- springGentle → const SpringDescription
- springSnappy → const SpringDescription