attachChangeTileSelectionCallback method

void attachChangeTileSelectionCallback({
  1. required void callback(
    1. int selectedNewIndex
    ),
})

this setter will bind a callback to the controller so you can run your own callback when a tile switch changed

Implementation

void attachChangeTileSelectionCallback({
  required void Function(int selectedNewIndex) callback,
}) {
  /*
  if(_handleChangeSelectedTileInitialized == true) {
    _debugWarn("cannot re-attach attachChangeTileSelection, it has already been initilized");
    return;
  }
  */
  _handleChangeSelectedTile = callback;
  _handleChangeSelectedTileInitialized = true;
}