customTheme method

Theme customTheme(
  1. {Key key,
  2. @required ThemeData themeData,
  3. bool isMaterialAppTheme}
)

Extension method to directly access Theme with custom ThemeData with any widget without wrapping or with dot operator.

Implementation

Theme customTheme(
        {Key key, @required ThemeData themeData, bool isMaterialAppTheme}) =>
    Theme(
      data: themeData,
      child: this,
      isMaterialAppTheme: isMaterialAppTheme,
    );