Name.fromMap constructor

Name.fromMap(
  1. Map<String, dynamic> map
)

It creates a new Name object from a map.

Args: map (Map<String, dynamic>): The map that contains the data to be converted to a Name object.

Returns: A new instance of the Name class.

Implementation

factory Name.fromMap(Map<String, dynamic> map) {
  return Name(
    title: map['title'] != null ? map['title'] as String : null,
    first: map['first'] != null ? map['first'] as String : null,
    last: map['last'] != null ? map['last'] as String : null,
  );
}