ZeroTypography class
The typography applied to a ZeroThemeData.
Do | Don't |
---|---|
Pick one font for your UI. | Don't mix multiple fonts. |
Use body for most text |
Use "Caption" for primary action or any long strings. |
Use "Base" for titles when space is constrained. | Use "Header" or "Subheader" if text needs to wrap. |
Keep to 50–60 letters per line for ease of reading. | Less than 20 characters or more than 60 characters per line is difficult to read. |
Clip text, and wrap if multiple lines are enabled. | Use ellipses to avoid visual clutter. |
- Mixed-in types
Constructors
- ZeroTypography.fromBrightness({Brightness? brightness, Color? color, String? fontFamily})
-
The default typography according to a brightness or color.
factory
- ZeroTypography.raw({TextStyle? heading1, TextStyle? heading2, TextStyle? heading3, TextStyle? heading4, TextStyle? heading5, TextStyle? heading6, TextStyle? subtitle1, TextStyle? subtitle2, TextStyle? body1, TextStyle? body2, TextStyle? button, TextStyle? caption, TextStyle? overline})
-
Creates a new ZeroTypography
const
Properties
- body1 → TextStyle?
-
The Body 1 style
final
- body2 → TextStyle?
-
The Body 2 style
final
-
The Buttton text style
final
- caption → TextStyle?
-
The caption text style
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- heading1 → TextStyle?
-
The Heading 1 style
final
- heading2 → TextStyle?
-
The Heading 2 style
final
- heading3 → TextStyle?
-
The Heading 3 style
final
- heading4 → TextStyle?
-
The Heading 4 style
final
- heading5 → TextStyle?
-
The Heading 5 style
final
- heading6 → TextStyle?
-
The Heading 6 style
final
- overline → TextStyle?
-
The overline text style
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- subtitle1 → TextStyle?
-
The Subtitle 1 style
final
- subtitle2 → TextStyle?
-
The Subtitle 2 style
final
Methods
-
apply(
{String? fontFamily, double fontSizeFactor = 1.0, double fontSizeDelta = 0.0, Color? color, TextDecoration? decoration, Color? decorationColor, TextDecorationStyle? decorationStyle}) → ZeroTypography -
copyWith(
{TextStyle? heading1, TextStyle? heading2, TextStyle? heading3, TextStyle? heading4, TextStyle? heading5, TextStyle? heading6, TextStyle? subtitle1, TextStyle? subtitle2, TextStyle? body1, TextStyle? body2, TextStyle? button, TextStyle? caption, TextStyle? overline}) → ZeroTypography -
debugFillProperties(
DiagnosticPropertiesBuilder properties) → void -
Add additional properties associated with the node.
override
-
merge(
ZeroTypography? typography) → ZeroTypography - Copy this with a new ZeroTypography
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toDiagnosticsNode(
{String? name, DiagnosticsTreeStyle? style}) → DiagnosticsNode -
Returns a debug representation of the object that is used by debugging
tools and by DiagnosticsNode.toStringDeep.
inherited
-
toString(
{DiagnosticLevel minLevel = DiagnosticLevel.info}) → String -
A string representation of this object.
inherited
-
toStringShort(
) → String -
A brief description of this object, usually just the runtimeType and the
hashCode.
inherited
-
toTextTheme(
) → TextTheme
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
lerp(
ZeroTypography? a, ZeroTypography? b, double t) → ZeroTypography -
It takes two
ZeroTypography
objects and adouble
value, and returns a newZeroTypography
object that is a blend of the two input objects