toJson method

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

Implementation

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

  switch (object) {
    case TextDirection.ltr:
      return 'ltr';

    case TextDirection.rtl:
      return 'rtl';
  }
}