AccountData.fromJson constructor

AccountData.fromJson(
  1. Map<String, dynamic> json
)

Parses an AccountData object from a JSON map.

Example:

Map<String, dynamic> jsonData = {
  "first_name": "John",
  "last_name": "Doe",
  "routing_number": "123456789",
  "last_4": "5678"
};
AccountData accountData = AccountData.fromJson(jsonData);

Implementation

factory AccountData.fromJson(Map<String, dynamic> json) {
  return AccountData(
    firstName: json['first_name'],
    lastName: json['last_name'],
    routingNumber: json['routing_number'],
    last4: json['last_4'],
  );
}