toJson method

Map<String, Object?> toJson()

Implementation

Map<String, Object?> toJson() {
  return {
    if (scope.isNotEmpty)
      filterOptionScope.camelCased: scope.map((e) => e.toString()).toList(),
    if (ignore.isNotEmpty)
      filterOptionIgnore.camelCased: ignore.map((e) => e.toString()).toList(),
    if (dirExists.isNotEmpty) filterOptionDirExists.camelCased: dirExists,
    if (fileExists.isNotEmpty) filterOptionFileExists.camelCased: fileExists,
    if (dependsOn.isNotEmpty) filterOptionDependsOn.camelCased: dependsOn,
    if (noDependsOn.isNotEmpty)
      filterOptionNoDependsOn.camelCased: noDependsOn,
    if (diff != null) filterOptionDiff.camelCased: diff,
    if (includePrivatePackages != null)
      filterOptionPrivate.camelCased: includePrivatePackages,
    if (published != null) filterOptionPublished.camelCased: published,
    if (nullSafe != null) filterOptionNullsafety.camelCased: nullSafe,
    if (includeDependents) filterOptionIncludeDependents.camelCased: true,
    if (includeDependencies) filterOptionIncludeDependencies.camelCased: true,
  };
}