replaceView method
- int index,
- DashboardView newView, {
- bool ignoreErrors = false,
Replaces the view at the given index with the new view.
Implementation
void replaceView(int index, DashboardView newView, {bool ignoreErrors = false}) {
if (views.contains(newView) && newView.name != Routes.blank) {
if (!ignoreErrors) {
models.home.setMessage(
severity: Severity.error,
text: "That view is already on-screen",
);
}
return;
}
views[index] = newView;
notifyListeners();
}