open static method
void
open(
- BuildContext context, {
- List<
ColorSection> ? additionalColors, - List<
TextStyleInfo> ? additionalTextStyles, - List<
SectionWrapper> ? additionalMaterialWidgets, - List<
SectionWrapper> ? additionalCupertinoWidgets, - List<
InspectorTab> ? customTabs, - bool materialEnabled = true,
- bool cupertinoEnabled = true,
- bool colorSchemeEnabled = true,
- bool textThemeEnabled = true,
Opens the theme inspector page with the specified configuration.
The inspector displays your app's current theme in a modal page with tabs for exploring different aspects of the theme.
Parameters:
additionalColors- Custom ColorSections to display in the Color Scheme tab.additionalTextStyles- Custom TextStyleInfos to display in the Text Theme tab.context- The build context used to access the current theme and navigator.additionalMaterialWidgets- Custom SectionWrappers for Material widgets to display alongside the defaults.additionalCupertinoWidgets- Custom SectionWrappers for Cupertino widgets to display alongside the defaults.customTabs- Multiple custom tabs to add to the inspector.materialEnabled- Whether to include the Material tab (default: true).cupertinoEnabled- Whether to include the Cupertino tab (default: true).colorSchemeEnabled- Whether to include the Color Scheme tab (default: true).textThemeEnabled- Whether to include the Text Theme tab (default: true).
Implementation
static void open(
BuildContext context, {
List<ColorSection>? additionalColors,
List<TextStyleInfo>? additionalTextStyles,
List<SectionWrapper>? additionalMaterialWidgets,
List<SectionWrapper>? additionalCupertinoWidgets,
List<InspectorTab>? customTabs,
bool materialEnabled = true,
bool cupertinoEnabled = true,
bool colorSchemeEnabled = true,
bool textThemeEnabled = true,
}) {
Navigator.of(context).push(
MaterialPageRoute(
builder: (context) => InspectorPage(
additionalColors: additionalColors,
additionalTextStyles: additionalTextStyles,
additionalMaterialWidgets: additionalMaterialWidgets,
additionalCupertinoWidgets: additionalCupertinoWidgets,
customTabs: customTabs,
materialEnabled: materialEnabled,
cupertinoEnabled: cupertinoEnabled,
colorSchemeEnabled: colorSchemeEnabled,
textThemeEnabled: textThemeEnabled,
),
),
);
}