removePage method

bool removePage(
  1. String id
)

Removes a page by id.

Implementation

bool removePage(String id) {
  final index = _pages.indexWhere((p) => p.id == id);
  if (index != -1) {
    _pages.removeAt(index);
    return true;
  }
  return false;
}