textSpacing static method
Create spacing for text elements with proper vertical rhythm
Implementation
static EdgeInsets textSpacing({
TextSpacingType type = TextSpacingType.paragraph,
}) {
switch (type) {
case TextSpacingType.headline:
return EdgeInsets.symmetric(vertical: 24.0);
case TextSpacingType.subhead:
return EdgeInsets.symmetric(vertical: 20.0);
case TextSpacingType.paragraph:
return EdgeInsets.symmetric(vertical: 16.0);
case TextSpacingType.caption:
return EdgeInsets.symmetric(vertical: 12.0);
case TextSpacingType.listItem:
return EdgeInsets.symmetric(vertical: 8.0);
}
}