toMap method

Map<String, dynamic> toMap()

It returns a map of the object's properties

Returns: A map of the data in the class.

Implementation

Map<String, dynamic> toMap() {
  return <String, dynamic>{
    'title': title,
    'first': first,
    'last': last,
  };
}