toMap function

Map toMap(
  1. dynamic object, {
  2. dynamic expand,
  3. dynamic exclude,
  4. String fieldName = '',
})

Converts the non-primitive object to a serializable Map.

Parameters:

  • expand : 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, {expand, exclude, String fieldName = ''}) =>
    objectToSerializable(object, expand: expand, exclude: exclude);