toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() => {
      'id': id,
      'name': name,
      if (description != null) 'description': description,
      'when': when.toJson(),
      'allow': allow,
      if (constraints != null) 'constraints': constraints!.toJson(),
      if (priority != null) 'priority': priority,
      'enabled': enabled,
    };