network method Null safety

TextStyle network(
  1. NetworkFont font
)

Decorate Text with your custom font from network

Note: this.fontFamily will take value from font.family, so provide your fontFamily in style is Ineffective

Implementation

TextStyle network(NetworkFont font) {
  /// Init [font] from network
  FontFunction.instance.initFont(font);

  return this.copyWith(fontFamily: font.family);
}