PluginPrintParams.fromJson constructor

PluginPrintParams.fromJson(
  1. JsonDecoder jsonDecoder,
  2. String jsonPath,
  3. Object? json, {
  4. ClientUriConverter? clientUriConverter,
})

Implementation

factory PluginPrintParams.fromJson(
  JsonDecoder jsonDecoder,
  String jsonPath,
  Object? json, {
  ClientUriConverter? clientUriConverter,
}) {
  json ??= {};
  if (json is Map) {
    PluginPrint pluginPrint;
    if (json.containsKey('pluginPrint')) {
      pluginPrint = PluginPrint.fromJson(
        jsonDecoder,
        '$jsonPath.pluginPrint',
        json['pluginPrint'],
        clientUriConverter: clientUriConverter,
      );
    } else {
      throw jsonDecoder.mismatch(jsonPath, "'pluginPrint'", json);
    }
    return PluginPrintParams(pluginPrint);
  } else {
    throw jsonDecoder.mismatch(jsonPath, "'plugin.print params'", json);
  }
}