StrutStyle constructor
Creates a strut style.
The package
argument must be non-null if the font family is defined in a
package. It is combined with the fontFamily
argument to set the
fontFamily
property.
If provided, fontSize must be positive and non-zero, leading must be zero or positive.
Implementation
const StrutStyle({
String? fontFamily,
List<String>? fontFamilyFallback,
this.fontSize,
this.height,
this.leadingDistribution,
this.leading,
this.fontWeight,
this.fontStyle,
this.forceStrutHeight,
this.debugLabel,
String? package,
}) : fontFamily = package == null ? fontFamily : 'packages/$package/$fontFamily',
_fontFamilyFallback = fontFamilyFallback,
_package = package,
assert(fontSize == null || fontSize > 0),
assert(leading == null || leading >= 0),
assert(package == null || (fontFamily != null || fontFamilyFallback != null));