onPressed property Null safety
The callback that is called when a button is tapped.
The index parameter of the callback is the index of the button that is tapped or otherwise activated.
When the callback is null, all toggle buttons will be disabled.
final void Function(int index)? onPressed;