FontVariantModel class

Holds information about a font variant in a font family.

Annotations
  • @JsonSerializable()

Constructors

FontVariantModel({String name = 'regular', FontWeightNumeric weight = FontWeightNumeric.w400, String style = 'Normal', String fontURL = '', String previewURL = ''})
Creates an instance of FontVariantModel with given data.
const
FontVariantModel.fromJson(Map<String, dynamic> json)
Factory constructor for creating a new FontVariantModel instance from JSON data.
factory
FontVariantModel.fromName(String name, {String fontURL = '', String previewURL = ''})
A factory constructor that creates an instance of FontVariantModel by parsing given name.
factory

Properties

fontURL String
Source URL of this font from where it can be downloaded/accessed.
final
hashCode int
The hash code for this object.
no setterinherited
name String
Name of the variant. Ex. regular, thin, bold, etc.
final
previewURL String
A URL for the preview image for this font.
final
props List<Object?>
The list of properties that will be used to determine whether two instances are equal.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
stringify bool?
If set to true, the toString method will be overridden to output this instance's props.
no setterinherited
style String
Font style for this variant.
final
weight → FontWeightNumeric
Font weight for this variant.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
Serializes this object into JSON data.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited