customTheme method

Theme customTheme({
  1. Key? key,
  2. required ThemeData? themeData,
})

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}) => Theme(
      data: themeData!,
      child: this,
    );