encodeAxis static method

String? encodeAxis(
  1. Axis? value
)

Encodes the given value to the String representation. Supported values are:

  • horizontal
  • vertical

Implementation

static String? encodeAxis(Axis? value) {
  String? result;

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

      case Axis.vertical:
        result = 'vertical';
        break;
    }
  }

  return result;
}