InspectorButton.toggle constructor

const InspectorButton.toggle({
  1. Key? key,
  2. required VoidCallback onPressed,
  3. required String semanticLabel,
  4. required IconData icon,
  5. 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;