encodeBoxShape static method

String? encodeBoxShape(
  1. BoxShape? value
)

Encodes the given value to a BoxShape. Supported values are:

  • circle
  • rectangle

Implementation

static String? encodeBoxShape(BoxShape? value) {
  String? result;

  if (value != null) {
    switch (value) {
      case BoxShape.circle:
        result = 'circle';
        break;

      case BoxShape.rectangle:
        result = 'rectangle';
        break;
    }
  }

  return result;
}