toggleBackgroundMode method

void toggleBackgroundMode()

Toggles the background mode between various color modes.

Implementation

void toggleBackgroundMode() {
  setState(() {
    backgroundColorMode = backgroundColorMode ==
            LayerBackgroundColorModeE.onlyColor
        ? LayerBackgroundColorModeE.backgroundAndColor
        : backgroundColorMode == LayerBackgroundColorModeE.backgroundAndColor
            ? LayerBackgroundColorModeE.background
            : backgroundColorMode == LayerBackgroundColorModeE.background
                ? LayerBackgroundColorModeE.backgroundAndColorWithOpacity
                : LayerBackgroundColorModeE.onlyColor;
  });
  widget.onUpdateUI?.call();
}