from static method

TextStyle from(
  1. TextStyle ref
)

Creates an instance from another TextStyle.

See also: FwfhTextStyle.of.

Implementation

static TextStyle from(TextStyle ref) {
  if (ref.inherit) {
    assert(
      () {
        if (!_warnedAboutInherit) {
          debugPrint(
            "Warning: $ref has inherit=true, resetting height won't work. "
            'See https://github.com/flutter/flutter/issues/58765 for context. '
            'This is printed once per debug session.\n${StackTrace.current}',
          );
          _warnedAboutInherit = true;
        }
        return true;
      }(),
    );
    return ref;
  } else {
    return FwfhTextStyle._(ref is FwfhTextStyle ? ref.ref : ref);
  }
}