Security.fromJson constructor

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

Implementation

factory Security.fromJson(Map<String, dynamic> json) {
  return fromJsonWithLogging(json, (json) {
    if (json.isEmpty) {
      return const Security();
    } else {
      final name = json.keys.first;
      return Security(
        name: name,
        scopes: List<String>.from(json[name] ?? []),
      );
    }
  });
}