optionsOf<T extends AppThemeOptions> static method

T optionsOf<T extends AppThemeOptions>(
  1. BuildContext context
)

Returns the options passed by the nearest ThemeProvider up the widget tree. Call as ThemeProvider.optionsOf<ColorClass>(context) to get the returned object casted to the required type.

Implementation

static T optionsOf<T extends AppThemeOptions>(BuildContext context) {
  return controllerOf(context).theme.options as T;
}