toMap function

Map toMap (dynamic object, { dynamic depth, dynamic exclude, String fieldName })

Converts the non-primitive object to a serializable Map.

Parameters:

  • depth : determines how deep is going to be the serialization and avoids stack overflow produced by cyclical object references.
  • exclude : exclude some attributes. It could be String, Map, or List

Implementation

Map toMap(object, {depth, exclude, String fieldName}) =>
    objectToSerializable(object, depth: depth, exclude: exclude);