add method

Panel add(
  1. String id,
  2. String label, {
  3. String? description,
})

Starts serving a panel. Adding a second one under the same id replaces the first — a hot reload re-running a plugin's constructor is the case, and two half-installed panels would be worse than the newer one winning.

Implementation

Panel add(String id, String label, {String? description}) {
  _remove(id);
  var panel = Panel._(this, id, label, description: description);
  _panels[id] = panel;
  panel._install();
  _changed();
  return panel;
}