removeMolecule method

bool removeMolecule(
  1. String key
)

Remove a Molecule from the store. key the key of the Molecule to remove.

Returns true if a Molecule with the key key could be removed, otherwise false.

Implementation

bool removeMolecule(String key) {
  _molecules[key]?.dispose();
  return _molecules.remove(key) != null;
}