ClientOptions.fromJson constructor

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

client options from json method

Implementation

factory ClientOptions.fromJson(Map<String, dynamic> json) => ClientOptions(
      log: json["log"] is bool ? json["log"] : false,
      deviceAuth: json["deviceAuth"] is Map<String, dynamic>
          ? DeviceAuth.fromJson(json["deviceAuth"])
          : throw Exception(
              "deviceAuth property is not a valid Map<String, dynamic>"),
      logLevel: json["logLevel"] is Level ? json["logLevel"] : null,
      userAgent: json["userAgent"] is String ? json["userAgent"] : null,
    );