clone method

Map clone()

Implementation

Map clone() {
  var newMap = {};
  forEach((key, value) {
    if (value is Map) {
      newMap[key] = value.clone();
    } else if (value is List<Map>) {
      newMap[key] = value.clone();
    } else {
      newMap[key] = value;
    }
  });
  return newMap;
}