Typography class
The typography applied to a ThemeData. It implements Window's Type Ramp
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. |
For more info, read Typography
- Mixed in types
Constructors
- Typography({TextStyle? header, TextStyle? subheader, TextStyle? title, TextStyle? subtitle, TextStyle? base, TextStyle? body, })
-
Creates a new Typography. To create the default typography, use
Typography.defaultTypography
const - Typography.standart({required Brightness brightness, Color? color})
-
The default typography.
factory
Properties
- base → TextStyle?
-
The base style. Use base for titles when space is constrained.
final
- body → TextStyle?
-
The body style. Use body for most of the text.
final
-
The caption style.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- header → TextStyle?
-
The header style. Use this as the top of the hierarchy
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- subheader → TextStyle?
-
The subheader style.
final
- subtitle → TextStyle?
-
The subtitle style.
final
- title → TextStyle?
-
The title style.
final
Methods
-
copyWith(
Typography? typography) → Typography -
Copy this with a new
typography
-
debugFillProperties(
DiagnosticPropertiesBuilder properties) → void -
Add additional properties associated with the node.
override
-
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
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited