GlassConstants class
All fitted constants. Exported from testing.dart only.
- Annotations
Constructors
- GlassConstants({required GlassVariantConstants regular, required GlassVariantConstants clear, required GlassVariantConstants regularDark, required GlassVariantConstants clearDark, required double cornerExponent, double cornerZone = 1.0, double mergeFactor = 1.0, required GlassMotionConstants motion})
-
Creates a constants set.
const
-
GlassConstants.fromJson(Map<
String, Object?> j) -
Reads keys present in
j; missing keys come from standard.factory
Properties
- clear → GlassVariantConstants
-
Clear-glass constants.
final
- clearDark → GlassVariantConstants
-
Clear glass in dark mode.
final
- cornerExponent → double
-
Superellipse exponent approximating Apple's continuous corners.
final
- cornerZone → double
-
Continuous-corner zone, as a multiple of the corner radius.
final
- hashCode → int
-
The hash code for this object.
no setteroverride
- mergeFactor → double
-
Smooth-union radius as a multiple of the group's spacing.
final
- motion → GlassMotionConstants
-
Motion constants.
final
- regular → GlassVariantConstants
-
Regular-glass constants.
final
- regularDark → GlassVariantConstants
-
Regular glass in dark mode.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
copyWith(
{GlassVariantConstants? regular, GlassVariantConstants? clear, GlassVariantConstants? regularDark, GlassVariantConstants? clearDark, double? cornerExponent, double? cornerZone, double? mergeFactor, GlassMotionConstants? motion}) → GlassConstants - Returns a copy with the given fields replaced.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
of(
GlassVariant variant, [Brightness brightness = Brightness.light]) → GlassVariantConstants -
Constants for
variantinbrightness;identitynever draws, so it maps to regular. -
toJson(
) → Map< String, Object?> - JSON form.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override
Constants
- standard → const GlassConstants
-
The shipped values (certified at the Task A1 tree): the Task
17c constants (edge lens from Task 15c, size-dependent frost/fill from
17b, frost wide tail from 17c) plus the 17d additions (tone LUT, small
dark-shape tone lift, clear lens grid, anisotropic frost), the A1
continuous-corner outline and the g13 colour refit (fitted
regular/regularDark tone LUTs, fill/saturation/tint), fitted by
the NumPy model (
tool/fidelity/fit.py) against SwiftUI screenshots oftool/scenes/scenes.json. Device-certified on the reference simulator: 55/75 scenes pass, median SSIM 0.9830 / median ΔE 1.29, min SSIM 0.9525, 0 scenes below 0.95 (75 in-set scenes). The g13 refit adds a small-shape tone curve: shapes whose half shorter side is at or below 32 pt get the small tone LUT at full weight, fading linearly to off at 34 pt (SwiftUI's small glass has a steeper tone response, Task g13). Per-set and per-scene numbers, and the known residuals, live indocs/superpowers/notes/fidelity-status.md— cite that note, not per-set numbers here.