fromJson method

  1. @override
TextHeightBehavior? fromJson(
  1. Map<String, dynamic>? json
)
override

Implementation

@override
TextHeightBehavior? fromJson(Map<String, dynamic>? json) {
  if (json == null) return null;

  return TextHeightBehavior(
    applyHeightToFirstAscent: json['applyHeightToFirstAscent'] == null
        ? true
        : (json['applyHeightToLastDescent'] as bool),
    applyHeightToLastDescent: json['applyHeightToLastDescent'] == null
        ? true
        : (json['applyHeightToLastDescent'] as bool),
  );
}