fromJson method

  1. @override
TextInputAction? fromJson(
  1. String? json
)
override

Implementation

@override
TextInputAction? fromJson(String? json) {
  if (json == null) return null;

  switch (json) {
    case 'continueAction':
      return TextInputAction.continueAction;

    case 'done':
      return TextInputAction.done;

    case 'emergencyCall':
      return TextInputAction.emergencyCall;

    case 'go':
      return TextInputAction.go;

    case 'join':
      return TextInputAction.join;

    case 'newline':
      return TextInputAction.newline;

    case 'next':
      return TextInputAction.next;

    case 'none':
      return TextInputAction.none;

    case 'previous':
      return TextInputAction.previous;

    case 'route':
      return TextInputAction.route;

    case 'search':
      return TextInputAction.search;

    case 'send':
      return TextInputAction.send;

    case 'unspecified':
      return TextInputAction.unspecified;
  }

  throw 'Unsuported_Json_Value';
}