maybeOf static method

TextStyle maybeOf(
  1. BuildContext context
)

Implementation

static TextStyle maybeOf(BuildContext context) {
  final widget =
      context.dependOnInheritedWidgetOfExactType<DefaultTextStyle>();
  return widget?.style ?? const TextStyle();
}