encode method

String? encode()

Implementation

String? encode() {
  switch (this) {
    case FontWeight.ULTRA_LIGHT:
      return 'ULTRA_LIGHT';
    case FontWeight.THIN:
      return 'THIN';
    case FontWeight.LIGHT:
      return 'LIGHT';
    case FontWeight.REGULAR:
      return 'REGULAR';
    case FontWeight.MEDIUM:
      return 'MEDIUM';
    case FontWeight.SEMI_BOLD:
      return 'SEMI_BOLD';
    case FontWeight.BOLD:
      return 'BOLD';
    case FontWeight.HEAVY:
      return 'HEAVY';
    case FontWeight.BLACK:
      return 'BLACK';
    case FontWeight.UNKNOWN:
      return null;
  }
}