ShadowsocksUserConfig.fromJson constructor

ShadowsocksUserConfig.fromJson(
  1. Object? json
)

Implementation

factory ShadowsocksUserConfig.fromJson(Object? json) {
  final map = asJsonMap(json, 'shadowsocks user');
  return ShadowsocksUserConfig(
    cipher: map['method'] as String?,
    password: map['password'] as String,
    level: map['level'] as int?,
    email: map['email'] as String?,
    address: map['address'] == null
        ? null
        : XrayAddress.fromJson(map['address']),
    port: map['port'] as int?,
  );
}