Mark.fromJson constructor

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

Implementation

factory Mark.fromJson(Map<String, dynamic> json) {
  return Mark(
    position: Offset(json['x'], json['y']),
    endPosition: Offset(json['x1'], json['y1']),
    type: json['type'] as int,
    isFocus: json['isFocus'] as bool,
    imagePaths: json['imagePaths'] != null
        ? List<String>.from(json['imagePaths'])
        : null,
    imageLinks: json['imageLinks'] != null
        ? List<String>.from(json['imageLinks'])
        : null,
    isNew: json['isNew'] as bool,
  );
}