AstryxTypeScaleConfig class
Configuration for the type scale.
{@tool snippet}
// The default Astryx type scale.
const AstryxTypeScaleConfig(base: 14, ratio: 1.2);
// Upstream's suggested starting points:
// dense or functional base 12, ratio 1.125
// default base 14, ratio 1.2
// airy or editorial base 16, ratio 1.25
{@end-tool}
- Annotations
Constructors
- AstryxTypeScaleConfig({required double base, required double ratio, AstryxTypeScaleWeights? weights})
-
Creates a type scale configuration.
const
Properties
- base → double
-
The base font size in logical pixels, anchored to h4 and body text.
final
- hashCode → int
-
The hash code for this object.
no setteroverride
- ratio → double
-
The scaling ratio of the geometric progression.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- weights → AstryxTypeScaleWeights?
-
Optional weight overrides for headings and text types.
final
Methods
-
copyWith(
{double? base, double? ratio, AstryxTypeScaleWeights? weights}) → AstryxTypeScaleConfig - Returns a copy with the given fields replaced.
-
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