Server.fromJson constructor

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

Implementation

factory Server.fromJson(Map<String, dynamic> json) {
  return Server(
    id: json['id'] ?? '',
    name: json['name'] ?? '',
    messages: json['messages'] ?? 0,
  );
}