of static method
Retrieves the TextTheme from the nearest WaveApp ancestor.
This function is used to access the theme data from any widget within the widget tree. It ensures that the theme is properly inherited and available to all components that need it.
Example:
final textTheme = TextTheme.of(context);
Implementation
static TextTheme of(BuildContext context) {
final WaveApp? app = context.dependOnInheritedWidgetOfExactType<WaveApp>();
assert(app != null, 'No WaveApp found in context');
return app!.theme.textTheme;
}