toJson method

  1. @override
String? toJson(
  1. TextCapitalization? object
)
override

Implementation

@override
String? toJson(TextCapitalization? object) {
  if (object == null) return null;

  switch (object) {
    case TextCapitalization.characters:
      return 'characters';

    case TextCapitalization.none:
      return 'none';

    case TextCapitalization.sentences:
      return 'sentences';

    case TextCapitalization.words:
      return 'words';
  }
}