InspectorButton.toggle constructor
- Key? key,
- required VoidCallback onPressed,
- required String semanticLabel,
- required IconData icon,
- bool toggledOn = true,
Creates an inspector button with the InspectorButtonVariant.toggle style.
This button can be in an "on" or "off" state, visually indicated.
The toggledOn
parameter defaults to true
.
Implementation
const InspectorButton.toggle({
super.key,
required this.onPressed,
required this.semanticLabel,
required this.icon,
bool this.toggledOn = true,
}) : buttonKey = null,
variant = InspectorButtonVariant.toggle;