encodeFontFeature static method

Map<String, dynamic>? encodeFontFeature(
  1. FontFeature? value
)

Encodes the given value into a JSON representation.

{
  "feature": "<String>",
  "value": "<int>"
}

Implementation

static Map<String, dynamic>? encodeFontFeature(FontFeature? value) {
  Map<String, dynamic>? result;

  if (value != null) {
    result = <String, dynamic>{
      'feature': value.feature,
      'value': value.value,
    };
  }

  return _stripDynamicNull(result);
}