SFServerPreference.fromJson constructor

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

Implementation

factory SFServerPreference.fromJson(Map<String, dynamic> json) {
  return SFServerPreference(
    serverId: PeerId.fromString(json['server_id'] as String),
    priority: json['priority'] as int,
    weight: json['weight'] as int? ?? 50,
  );
}