DPTypography constructor
DPTypography({
- required Color defaultColor,
- TextStyle? title,
- TextStyle? header1,
- TextStyle? header2,
- TextStyle? itemTitle,
- TextStyle? itemDescription,
- TextStyle? description,
- TextStyle? readable,
- TextStyle? token,
- TextStyle? hint,
- TextStyle? paragraph1,
- TextStyle? paragraph2,
- TextStyle? paragraph1Underlined,
- TextStyle? paragraph2Underlined,
Implementation
DPTypography({
required this.defaultColor,
TextStyle? title,
TextStyle? header1,
TextStyle? header2,
TextStyle? itemTitle,
TextStyle? itemDescription,
TextStyle? description,
TextStyle? readable,
TextStyle? token,
TextStyle? hint,
TextStyle? paragraph1,
TextStyle? paragraph2,
TextStyle? paragraph1Underlined,
TextStyle? paragraph2Underlined,
}) : title = title ?? style(Weight.semiBold, 28, 36, defaultColor),
header1 = header1 ?? style(Weight.bold, 24, 32, defaultColor),
header2 = header2 ?? style(Weight.semiBold, 20, 26, defaultColor),
itemTitle = itemTitle ?? style(Weight.semiBold, 16, 22, defaultColor),
itemDescription = itemDescription ?? style(Weight.medium, 14, 20, defaultColor),
description = description ?? style(Weight.semiBold, 16, 22, defaultColor),
readable = readable ?? style(Weight.semiBold, 14, 20, defaultColor),
token = token ?? style(Weight.regular, 12, 18, defaultColor),
hint = hint ?? style(Weight.regular, 10, 16, defaultColor),
paragraph1 = paragraph1 ?? style(Weight.regular, 16, 16 * 1.6, defaultColor),
paragraph2 = paragraph2 ?? style(Weight.regular, 14, 14 * 1.6, defaultColor),
paragraph1Underlined = paragraph1Underlined ?? style(Weight.regular, 16, 16 * 1.6, underlined: true, defaultColor),
paragraph2Underlined = paragraph2Underlined ?? style(Weight.regular, 14, 14 * 1.6, underlined: true, defaultColor);