toVoltronMap method

VoltronMap toVoltronMap()

Implementation

VoltronMap toVoltronMap() {
  var voltronMap = VoltronMap();
  for (var key in keys) {
    var value = this[key];
    if (value is Map) {
      voltronMap.push(key, value.toVoltronMap());
    } else if (value is List) {
      voltronMap.push(key, value.toVoltronArray());
    } else if (value is VoltronMap) {
      voltronMap.push(key, value.toDeepVoltronMap());
    } else if (value is VoltronArray) {
      voltronMap.push(key, value.toDeepVoltronArray());
    } else if (value is bool || value is String || value is num) {
      voltronMap.push(key, value);
    } else {
      throw 'type: ${value.runtimeType} is not support';
    }
  }
  return voltronMap;
}