Material design text theme.

Definitions for the various typographical styles found in material design (e.g., headline, caption). Rather than creating a TextTheme directly, you can obtain an instance as Typography.black or Typography.white.

To obtain the current text theme, call of with the current BuildContext and read the textTheme property.

See also:

Static Methods

lerp(TextTheme begin, TextTheme end, double t) TextTheme

Linearly interpolate between two text themes.

Constructors

TextTheme({TextStyle display4, TextStyle display3, TextStyle display2, TextStyle display1, TextStyle headline, TextStyle title, TextStyle subhead, TextStyle body2, TextStyle body1, TextStyle caption, TextStyle button })

Create a text theme that uses the given values.

const

Properties

body1 TextStyle

Used for the default text style for Material.

read-only
body2 TextStyle

Used for emphasizing text that would otherwise be body1.

read-only
button TextStyle

Used for text on RaisedButton and FlatButton.

read-only
caption TextStyle

Used for auxillary text associated with images.

read-only
display1 TextStyle

Large text.

read-only
display2 TextStyle

Very large text.

read-only
display3 TextStyle

Very, very large text.

read-only
display4 TextStyle

Extremely large text.

read-only
headline TextStyle

Used for large text in dialogs (e.g., the month and year in DatePicker).

read-only
subhead TextStyle

Used for the primary text in lists (e.g., title).

read-only
title TextStyle

Used for the primary text in app bars and dialogs (e.g., title and Dialog.title).

read-only
hashCode int

Get a hash code for this object.

read-only, inherited
runtimeType Type

A representation of the runtime type of the object.

read-only, inherited

Operators

operator ==(other) bool

The equality operator.

inherited

Methods

apply({String fontFamily, double fontSizeFactor: 1.0, double fontSizeDelta: 0.0, Color displayColor, Color bodyColor }) TextTheme

Creates a copy of this text theme but with the given field replaced in each of the individual text styles.

copyWith({TextStyle display4, TextStyle display3, TextStyle display2, TextStyle display1, TextStyle headline, TextStyle title, TextStyle subhead, TextStyle body2, TextStyle body1, TextStyle caption, TextStyle button }) TextTheme

Creates a copy of this text theme but with the given fields replaced with the new values.

noSuchMethod(Invocation invocation) → dynamic

Invoked when a non-existent method or property is accessed.

inherited
toString() String

Returns a string representation of this object.

inherited