Usernames.fromJson constructor

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

Parse from a json

Implementation

factory Usernames.fromJson(Map<String, dynamic> json) => Usernames(
      activeUsernames: List<String>.from(
          (json['active_usernames'] ?? []).map((item) => item).toList()),
      disabledUsernames: List<String>.from(
          (json['disabled_usernames'] ?? []).map((item) => item).toList()),
      editableUsername: json['editable_username'],
    );