of static method

Theme of(
  1. BuildContext context
)

Returns the nearest theme from the context, or the global theme.

Implementation

static Theme of(BuildContext context) {
  return maybeOf(context) ?? currentTheme;
}