toJson method Null safety

Map<String, dynamic> toJson()

Implementation

core.Map<core.String, core.dynamic> toJson() => {
      if (position != null) 'position': position!,
      if (routine != null) 'routine': routine!,
      if (step != null) 'step': step!,
    };