actions property

  1. @override
List<Widget> get actions
override

Implementation

@override
List<Widget> get actions {
  return [
    ListenableBuilder(
      listenable: this,
      builder: (context, _) {
        final isEnabled = value;

        return ToolbarButton(
          selected: value,
          onPressed: () => value = !value,
          tooltip: ToolbarTooltip(
            message: !value //
                ? 'Enable Keyboard'
                : 'Disable Keyboard',
          ),
          child: Icon(
            isEnabled ? Icons.keyboard : Icons.keyboard_outlined,
          ),
        );
      },
    ),
  ];
}