StrutStyleMix class
Mix representation of StrutStyle.
Text layout properties with tokens.
- Inheritance
-
- Object
- Mixable<
StrutStyle> - Mix<
StrutStyle> - StrutStyleMix
- Mixed-in types
- Annotations
-
- @mixable
- @immutable
Constructors
-
StrutStyleMix({String? fontFamily, List<
String> ? fontFamilyFallback, double? fontSize, FontWeight? fontWeight, FontStyle? fontStyle, double? height, double? leading, bool? forceStrutHeight}) -
StrutStyleMix.create({Prop<
String> ? fontFamily, Prop<List< ? fontFamilyFallback, Prop<String> >double> ? fontSize, Prop<FontWeight> ? fontWeight, Prop<FontStyle> ? fontStyle, Prop<double> ? height, Prop<double> ? leading, Prop<bool> ? forceStrutHeight}) -
const
- StrutStyleMix.fontFamily(String value)
-
Creates with font family.
factory
-
StrutStyleMix.fontFamilyFallback(List<
String> value) -
Creates with font family fallback.
factory
- StrutStyleMix.fontSize(double value)
-
Creates with font size.
factory
- StrutStyleMix.fontStyle(FontStyle value)
-
Creates with font style.
factory
- StrutStyleMix.fontWeight(FontWeight value)
-
Creates with font weight.
factory
- StrutStyleMix.forceStrutHeight(bool value)
-
Creates with forced strut height.
factory
- StrutStyleMix.height(double value)
-
Creates with line height.
factory
- StrutStyleMix.leading(double value)
-
Creates with leading space.
factory
- StrutStyleMix.value(StrutStyle strutStyle)
- Creates a StrutStyleMix from an existing StrutStyle.
Properties
-
$fontFamily
→ Prop<
String> ? -
final
-
$fontFamilyFallback
→ Prop<
List< ?String> > -
final
-
$fontSize
→ Prop<
double> ? -
final
-
$fontStyle
→ Prop<
FontStyle> ? -
final
-
$fontWeight
→ Prop<
FontWeight> ? -
final
-
$forceStrutHeight
→ Prop<
bool> ? -
final
-
$height
→ Prop<
double> ? -
final
-
$leading
→ Prop<
double> ? -
final
- hashCode → int
-
Overrides the hash code getter to compute hash code based on properties.
no setterinherited
- mergeKey → Object
-
The key used to identify compatible types for merging.
no setterinherited
-
props
→ List<
Object?> -
The properties based on which equality and hash code are computed.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- stringify → bool
-
Whether to use a detailed string representation of the object.
no setterinherited
Methods
-
debugFillProperties(
DiagnosticPropertiesBuilder properties) → void -
Add additional properties associated with the node.
inherited
-
fontFamily(
String value) → StrutStyleMix - Returns a copy with the specified font family.
-
fontFamilyFallback(
List< String> value) → StrutStyleMix - Returns a copy with the specified font family fallback list.
-
fontSize(
double value) → StrutStyleMix - Returns a copy with the specified font size.
-
fontStyle(
FontStyle value) → StrutStyleMix - Returns a copy with the specified font style.
-
fontWeight(
FontWeight value) → StrutStyleMix - Returns a copy with the specified font weight.
-
forceStrutHeight(
bool value) → StrutStyleMix - Returns a copy with forced strut height enabled or disabled.
-
getDiff(
Equatable other) → Map< String, String> -
Returns a map of properties that differ between this object and another.
inherited
-
height(
double value) → StrutStyleMix - Returns a copy with the specified line height.
-
leading(
double value) → StrutStyleMix - Returns a copy with the specified leading space.
-
merge(
covariant StrutStyleMix? other) → StrutStyleMix -
Merges with another StrutStyleMix.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
resolve(
BuildContext context) → StrutStyle -
Resolves to StrutStyle using
context.inherited -
toDiagnosticsNode(
{String? name, DiagnosticsTreeStyle? style}) → DiagnosticsNode -
Returns a debug representation of the object that is used by debugging
tools and by DiagnosticsNode.toStringDeep.
inherited
-
toString(
{DiagnosticLevel minLevel = DiagnosticLevel.info}) → String -
A string representation of this object.
inherited
-
toStringShort(
) → String -
A brief description of this object, usually just the runtimeType and the
hashCode.
inherited
Operators
-
operator ==(
Object other) → bool -
Overrides the equality operator to compare based on the properties.
inherited
Static Methods
-
maybeValue(
StrutStyle? strutStyle) → StrutStyleMix? - Creates from nullable StrutStyle.