toMap method

Map<String, dynamic> toMap()

Implementation

Map<String, dynamic> toMap() {
  final result = <String, dynamic>{};

  result.addAll({'step': step.index});
  result.addAll({'title': title});
  if (thresholdToCheck != null) {
    result.addAll({'thresholdToCheck': thresholdToCheck});
  }
  result.addAll({'isCompleted': isCompleted});
  if (detectionColor != null) {
    result.addAll({'detectionColor': detectionColor!.value});
  }

  return result;
}