encodeFontVariation static method

Map<String, dynamic>? encodeFontVariation(
  1. FontVariation? value
)

Encodes the given value into a JSON map value.

This returns the format:

{
  "axis": "<String>",
  "value": "<double>"
}

Implementation

static Map<String, dynamic>? encodeFontVariation(FontVariation? value) {
  Map<String, dynamic>? result;

  if (value != null) {
    result = {
      'axis': value.axis,
      'value': value.value,
    };
  }

  return _stripNull(result);
}