toMap method

String toMap(
  1. Map map
)

Implementation

String toMap(Map map) {
  final variable = map.keys;
  return '''Map<String, dynamic> toMap() {
  return {
    ${variable.map((e) => "'${e.toString()}': ${getVariableToMap(e, map[e])}").join(',      \n')}${variable.isNotEmpty ? ',' : ''}
  };
}''';
}