toggleBackgroundMode method

void toggleBackgroundMode()

Toggles the background mode between various color modes.

Implementation

void toggleBackgroundMode() {
  setState(() {
    backgroundColorMode = backgroundColorMode == LayerBackgroundMode.onlyColor
        ? LayerBackgroundMode.backgroundAndColor
        : backgroundColorMode == LayerBackgroundMode.backgroundAndColor
            ? LayerBackgroundMode.background
            : backgroundColorMode == LayerBackgroundMode.background
                ? LayerBackgroundMode.backgroundAndColorWithOpacity
                : LayerBackgroundMode.onlyColor;
  });
  textEditorCallbacks?.handleBackgroundModeChanged(backgroundColorMode);
}