DukeTypography constructor
DukeTypography(
- BuildContext context
Implementation
DukeTypography(this.context) {
final brightness = Theme.of(context).brightness;
final color = DukeColor(brightness);
_parent = TextStyle(
fontFamily: 'IranSansXFaNum',
color: color.neutralText,
);
xxsText = _parent!.copyWith(
fontWeight: FontWeight.w500,
fontSize: _xxs,
color: color.neutralTextLight,
);
xsText = _parent!.copyWith(
fontWeight: FontWeight.w500,
fontSize: _xs,
color: color.neutralTextLight,
);
smText = _parent!.copyWith(fontWeight: FontWeight.w500, fontSize: _sm);
smTextLight = _parent!.copyWith(
fontWeight: FontWeight.w500,
fontSize: _sm,
color: color.neutralTextLight,
);
mdText = _parent!.copyWith(
fontWeight: FontWeight.w500,
fontSize: _md,
color: color.neutralTextLight,
);
smSubTitle = _parent!.copyWith(fontWeight: FontWeight.w500, fontSize: _sm);
mdSubTitle = _parent!.copyWith(fontWeight: FontWeight.w500, fontSize: _md);
smTitle = _parent!.copyWith(fontWeight: FontWeight.w600, fontSize: _sm);
mdTitle = _parent!.copyWith(fontWeight: FontWeight.w600, fontSize: _md);
lgTitle = _parent!.copyWith(fontWeight: FontWeight.w600, fontSize: _lg);
button = _parent!.copyWith(
fontWeight: FontWeight.w700, fontSize: _lg, color: color.background);
smallHeadline =
_parent!.copyWith(fontWeight: FontWeight.w700, fontSize: _lg);
smallHeadline =
_parent!.copyWith(fontWeight: FontWeight.w700, fontSize: _lg);
headline = _parent!.copyWith(fontWeight: FontWeight.w700, fontSize: _xl);
}