encodeMaterialStatePropertyOutlinedBorder static method

Map<String, dynamic>? encodeMaterialStatePropertyOutlinedBorder(
  1. MaterialStateProperty<OutlinedBorder?>? value, {
  2. bool validate = true,
})

Encodes the value into a JSON representation.

{
  "disabled": <OutlinedBorder>,
  "dragged": <OutlinedBorder>,
  "empty": <OutlinedBorder>,
  "error": <OutlinedBorder>,
  "focused": <OutlinedBorder>,
  "hovered": <OutlinedBorder>,
  "pressed": <OutlinedBorder>,
  "selected": <OutlinedBorder>
}

See also:

Implementation

static Map<String, dynamic>? encodeMaterialStatePropertyOutlinedBorder(
  MaterialStateProperty<OutlinedBorder?>? value, {
  bool validate = true,
}) {
  Map<String, dynamic>? result;

  if (value != null) {
    result = {
      'disabled': encodeOutlinedBorder(
        value.resolve({MaterialState.disabled}),
      ),
      'dragged': encodeOutlinedBorder(value.resolve({MaterialState.dragged})),
      'empty': encodeOutlinedBorder(value.resolve({})),
      'error': encodeOutlinedBorder(value.resolve({MaterialState.error})),
      'focused': encodeOutlinedBorder(value.resolve({MaterialState.focused})),
      'hovered': encodeOutlinedBorder(value.resolve({MaterialState.hovered})),
      'pressed': encodeOutlinedBorder(value.resolve({MaterialState.pressed})),
      'selected': encodeOutlinedBorder(
        value.resolve({MaterialState.selected}),
      ),
    };
  }

  return result;
}