PackageApi constructor

const PackageApi({
  1. required String packageName,
  2. required String? packageVersion,
  3. required String packagePath,
  4. required List<InterfaceDeclaration> interfaceDeclarations,
  5. required List<ExecutableDeclaration> executableDeclarations,
  6. required List<FieldDeclaration> fieldDeclarations,
  7. required List<TypeAliasDeclaration> typeAliasDeclarations,
  8. @Default(<PackageApiSemantics>{}) Set<PackageApiSemantics> semantics,
  9. AndroidPlatformConstraints? androidPlatformConstraints,
  10. IOSPlatformConstraints? iosPlatformConstraints,
  11. required SdkType sdkType,
  12. required List<PackageDependency> packageDependencies,
  13. required Version minSdkVersion,
  14. required TypeHierarchy typeHierarchy,
})

Implementation

const factory PackageApi({
  /// name of the package
  required String packageName,

  /// version of the package
  required String? packageVersion,

  /// path to the package
  required String packagePath,

  /// interface declarations this package has
  required List<InterfaceDeclaration> interfaceDeclarations,

  /// root level executable declarations this package has
  required List<ExecutableDeclaration> executableDeclarations,

  /// root level field declarations this package has
  required List<FieldDeclaration> fieldDeclarations,

  /// type alias declarations this package has
  required List<TypeAliasDeclaration> typeAliasDeclarations,

  /// the semantics of this model. This indicates if this model is compatible (e.g. for diffing) with another model
  @Default(<PackageApiSemantics>{}) Set<PackageApiSemantics> semantics,

  /// used Android platform constraints
  AndroidPlatformConstraints? androidPlatformConstraints,

  /// used iOS platform constraints
  IOSPlatformConstraints? iosPlatformConstraints,

  /// type of sdk needed
  required SdkType sdkType,

  /// package dependencies
  required List<PackageDependency> packageDependencies,

  /// minimum sdk version
  required Version minSdkVersion,

  /// the type hierarchy of the public API
  required TypeHierarchy typeHierarchy,
}) = _PackageApi;