setStackLevel static method

bool setStackLevel(
  1. String id,
  2. int stackLevel
)

Sets stack level for an active modal/snackbar by ID.

Returns true if updated.

Implementation

static bool setStackLevel(String id, int stackLevel) {
  if (!isModalActiveById(id)) return false;
  updateParams(id: id, stackLevel: stackLevel);
  return true;
}