of static method
Returns the TextStyle from the closest DefaultTextStyle ancestor, or a default TextStyle() if none exists.
Implementation
static TextStyle of(BuildContext context) {
final widget =
context.dependOnInheritedWidgetOfExactType<DefaultTextStyle>();
if (widget != null) {
return widget.style;
}
return const TextStyle();
}