User.fromJson constructor

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

User.fromJson Mapping Json object to User

Implementation

factory User.fromJson(Map<String, dynamic> json) {
  /// Return [User]
  return User(
      id: json['id'] as int?,
      name: json['name'] as String?,
      url: json['url'] as String?);
}