PathImageLoadOptions.fromJson constructor
PathImageLoadOptions.fromJson(
- Map<String, dynamic> json
)
Implementation
factory PathImageLoadOptions.fromJson(Map<String, dynamic> json) =>
PathImageLoadOptions(
roi: json.containsKey("roi")
? Rectangle<int>(
((json["roi"] as Map<String, dynamic>)["x"] as int),
((json["roi"] as Map<String, dynamic>)["y"] as int),
((json["roi"] as Map<String, dynamic>)["width"] as int),
((json["roi"] as Map<String, dynamic>)["height"] as int))
: Rectangle<int>(0, 0, 0, 0),
loadMode: json.containsKey("loadMode")
? PathLoadMode.values.byName(json["loadMode"] as String)
: PathLoadMode.EAGER,
encryptionMode: json.containsKey("encryptionMode")
? EncryptionMode.values.byName(json["encryptionMode"] as String)
: EncryptionMode.IF_AVAILABLE,
);