bringToFront static method

bool bringToFront(
  1. String id, {
  2. int step = 1,
})

Brings an active overlay above all current overlays.

Implementation

static bool bringToFront(String id, {int step = 1}) {
  final current = getStackLevel(id);
  if (current == null) return false;
  final top = _controller.state
      .map((e) => _effectiveStackLevel(e))
      .fold<int>(current, (prev, next) => next > prev ? next : prev);
  return setStackLevel(id, top + (step < 1 ? 1 : step));
}