Typography class
Typography definitions for shadcn_flutter.
Provides predefined text styles for different purposes including sizes, weights, and semantic styles like headings and paragraphs.
Constructors
- Typography({required TextStyle sans, required TextStyle mono, required TextStyle xSmall, required TextStyle small, required TextStyle base, required TextStyle large, required TextStyle xLarge, required TextStyle x2Large, required TextStyle x3Large, required TextStyle x4Large, required TextStyle x5Large, required TextStyle x6Large, required TextStyle x7Large, required TextStyle x8Large, required TextStyle x9Large, required TextStyle thin, required TextStyle light, required TextStyle extraLight, required TextStyle normal, required TextStyle medium, required TextStyle semiBold, required TextStyle bold, required TextStyle extraBold, required TextStyle black, required TextStyle italic, required TextStyle h1, required TextStyle h2, required TextStyle h3, required TextStyle h4, required TextStyle p, required TextStyle blockQuote, required TextStyle inlineCode, required TextStyle lead, required TextStyle textLarge, required TextStyle textSmall, required TextStyle textMuted})
-
Creates a custom typography with all required text styles.
const
- Typography.geist({TextStyle sans = const TextStyle(fontFamily: 'GeistSans', package: 'shadcn_flutter'), TextStyle mono = const TextStyle(fontFamily: 'GeistMono', package: 'shadcn_flutter'), TextStyle xSmall = const TextStyle(fontSize: 12), TextStyle small = const TextStyle(fontSize: 14), TextStyle base = const TextStyle(fontSize: 16), TextStyle large = const TextStyle(fontSize: 18), TextStyle xLarge = const TextStyle(fontSize: 20), TextStyle x2Large = const TextStyle(fontSize: 24), TextStyle x3Large = const TextStyle(fontSize: 30), TextStyle x4Large = const TextStyle(fontSize: 36), TextStyle x5Large = const TextStyle(fontSize: 48), TextStyle x6Large = const TextStyle(fontSize: 60), TextStyle x7Large = const TextStyle(fontSize: 72), TextStyle x8Large = const TextStyle(fontSize: 96), TextStyle x9Large = const TextStyle(fontSize: 144), TextStyle thin = const TextStyle(fontWeight: FontWeight.w100), TextStyle light = const TextStyle(fontWeight: FontWeight.w300), TextStyle extraLight = const TextStyle(fontWeight: FontWeight.w200), TextStyle normal = const TextStyle(fontWeight: FontWeight.w400), TextStyle medium = const TextStyle(fontWeight: FontWeight.w500), TextStyle semiBold = const TextStyle(fontWeight: FontWeight.w600), TextStyle bold = const TextStyle(fontWeight: FontWeight.w700), TextStyle extraBold = const TextStyle(fontWeight: FontWeight.w800), TextStyle black = const TextStyle(fontWeight: FontWeight.w900), TextStyle italic = const TextStyle(fontStyle: FontStyle.italic), TextStyle h1 = const TextStyle(fontSize: 36, fontWeight: FontWeight.w800), TextStyle h2 = const TextStyle(fontSize: 30, fontWeight: FontWeight.w600), TextStyle h3 = const TextStyle(fontSize: 24, fontWeight: FontWeight.w600), TextStyle h4 = const TextStyle(fontSize: 18, fontWeight: FontWeight.w600), TextStyle p = const TextStyle(fontSize: 16, fontWeight: FontWeight.w400), TextStyle blockQuote = const TextStyle(fontSize: 16, fontWeight: FontWeight.w400, fontStyle: FontStyle.italic), TextStyle inlineCode = const TextStyle(fontFamily: 'GeistMono', fontSize: 14, fontWeight: FontWeight.w600), TextStyle lead = const TextStyle(fontSize: 20), TextStyle textLarge = const TextStyle(fontSize: 20, fontWeight: FontWeight.w600), TextStyle textSmall = const TextStyle(fontSize: 14, fontWeight: FontWeight.w500), TextStyle textMuted = const TextStyle(fontSize: 14, fontWeight: FontWeight.w400)})
-
Creates a typography with Geist font family.
const
Properties
- base → TextStyle
-
Base text size (16px).
final
- black → TextStyle
-
Black font weight (900).
final
- blockQuote → TextStyle
-
Block quote style.
final
- bold → TextStyle
-
Bold font weight (700).
final
- extraBold → TextStyle
-
Extra bold font weight (800).
final
- extraLight → TextStyle
-
Extra light font weight (200).
final
- h1 → TextStyle
-
Heading 1 style.
final
- h2 → TextStyle
-
Heading 2 style.
final
- h3 → TextStyle
-
Heading 3 style.
final
- h4 → TextStyle
-
Heading 4 style.
final
- hashCode → int
-
The hash code for this object.
no setteroverride
- inlineCode → TextStyle
-
Inline code style.
final
- italic → TextStyle
-
Italic text style.
final
- large → TextStyle
-
Large text (18px).
final
- lead → TextStyle
-
Lead text style.
final
- light → TextStyle
-
Light font weight (300).
final
- medium → TextStyle
-
Medium font weight (500).
final
- mono → TextStyle
-
Monospace font style.
final
- normal → TextStyle
-
Normal font weight (400).
final
- p → TextStyle
-
Paragraph style.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- sans → TextStyle
-
Sans-serif font style.
final
- semiBold → TextStyle
-
Semi-bold font weight (600).
final
- small → TextStyle
-
Small text (14px).
final
- textLarge → TextStyle
-
Large text style.
final
- textMuted → TextStyle
-
Muted text style.
final
- textSmall → TextStyle
-
Small text style.
final
- thin → TextStyle
-
Thin font weight (100).
final
- x2Large → TextStyle
-
2x large text (24px).
final
- x3Large → TextStyle
-
3x large text (30px).
final
- x4Large → TextStyle
-
4x large text (36px).
final
- x5Large → TextStyle
-
5x large text (48px).
final
- x6Large → TextStyle
-
6x large text (60px).
final
- x7Large → TextStyle
-
7x large text (72px).
final
- x8Large → TextStyle
-
8x large text (96px).
final
- x9Large → TextStyle
-
9x large text (144px).
final
- xLarge → TextStyle
-
Extra large text (20px).
final
- xSmall → TextStyle
-
Extra small text (12px).
final
Methods
-
copyWith(
{ValueGetter< TextStyle> ? sans, ValueGetter<TextStyle> ? mono, ValueGetter<TextStyle> ? xSmall, ValueGetter<TextStyle> ? small, ValueGetter<TextStyle> ? base, ValueGetter<TextStyle> ? large, ValueGetter<TextStyle> ? xLarge, ValueGetter<TextStyle> ? x2Large, ValueGetter<TextStyle> ? x3Large, ValueGetter<TextStyle> ? x4Large, ValueGetter<TextStyle> ? x5Large, ValueGetter<TextStyle> ? x6Large, ValueGetter<TextStyle> ? x7Large, ValueGetter<TextStyle> ? x8Large, ValueGetter<TextStyle> ? x9Large, ValueGetter<TextStyle> ? thin, ValueGetter<TextStyle> ? light, ValueGetter<TextStyle> ? extraLight, ValueGetter<TextStyle> ? normal, ValueGetter<TextStyle> ? medium, ValueGetter<TextStyle> ? semiBold, ValueGetter<TextStyle> ? bold, ValueGetter<TextStyle> ? extraBold, ValueGetter<TextStyle> ? black, ValueGetter<TextStyle> ? italic, ValueGetter<TextStyle> ? h1, ValueGetter<TextStyle> ? h2, ValueGetter<TextStyle> ? h3, ValueGetter<TextStyle> ? h4, ValueGetter<TextStyle> ? p, ValueGetter<TextStyle> ? blockQuote, ValueGetter<TextStyle> ? inlineCode, ValueGetter<TextStyle> ? lead, ValueGetter<TextStyle> ? textLarge, ValueGetter<TextStyle> ? textSmall, ValueGetter<TextStyle> ? textMuted}) → Typography - Creates a copy of this typography with the given fields replaced.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
scale(
double factor) → Typography - Scales all typography font sizes by the given factor.
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override
Static Methods
-
lerp(
Typography a, Typography b, double t) → Typography - Linearly interpolates between two typographies.