PrintRequest.fromJson constructor

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

Implementation

PrintRequest.fromJson(Map<String, dynamic> json) {
  operation = json['operation'];
  if (json['styles'] != null) {
    styles = List<Style>.empty(growable: true);
    json['styles'].forEach((style) {
      styles!.add(Style.fromJson(style));
    });
  }
  value = json['value'].cast<String>();
}