toDict method

HDict toDict()

Converts current state to an immutable HDict instance.

Implementation

HDict toDict() {
  if (_map.isEmpty) return HDict.EMPTY;
  final dict = HDict(_map);
  _map = <String, HVal>{};
  return dict;
}