of static method
Retrieves the ColorScheme 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 colorScheme = ColorScheme.of(context);
Implementation
static ColorScheme of(BuildContext context) {
final WaveApp? app = context.dependOnInheritedWidgetOfExactType<WaveApp>();
assert(app != null, 'No WaveApp found in context');
return app!.theme.colorScheme;
}