of static method

TextStyle of(
  1. BuildContext context
)

Implementation

static TextStyle of(BuildContext context) {
  final widget =
      context.dependOnInheritedWidgetOfExactType<DefaultTextStyle>();
  if (widget != null) {
    return widget.style;
  }
  return const TextStyle();
}