PackageApi class sealed
represents the model of a public package API.
- Available extensions
- Annotations
-
- @freezed
Constructors
-
PackageApi.new({required String packageName, required String? packageVersion, required String packagePath, required List<
InterfaceDeclaration> interfaceDeclarations, required List<ExecutableDeclaration> executableDeclarations, required List<FieldDeclaration> fieldDeclarations, required List<TypeAliasDeclaration> typeAliasDeclarations, @Default(<PackageApiSemantics>{}) Set<PackageApiSemantics> semantics, AndroidPlatformConstraints? androidPlatformConstraints, IOSPlatformConstraints? iosPlatformConstraints, required SdkType sdkType, required List<PackageDependency> packageDependencies, required Version minSdkVersion, required TypeHierarchy typeHierarchy}) -
constfactory
Properties
- androidPlatformConstraints → AndroidPlatformConstraints?
-
used Android platform constraints
no setterinherited
-
copyWith
→ $PackageApiCopyWith<
PackageApi> -
Create a copy of PackageApi
with the given fields replaced by the non-null parameter values.
no setterinherited
-
executableDeclarations
→ List<
ExecutableDeclaration> -
root level executable declarations this package has
no setterinherited
-
fieldDeclarations
→ List<
FieldDeclaration> -
root level field declarations this package has
no setterinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
-
interfaceDeclarations
→ List<
InterfaceDeclaration> -
interface declarations this package has
no setterinherited
- iosPlatformConstraints → IOSPlatformConstraints?
-
used iOS platform constraints
no setterinherited
- minSdkVersion → Version
-
minimum sdk version
no setterinherited
-
packageDependencies
→ List<
PackageDependency> -
package dependencies
no setterinherited
- packageName → String
-
name of the package
no setterinherited
- packagePath → String
-
path to the package
no setterinherited
- packageVersion → String?
-
version of the package
no setterinherited
-
rootDeclarationsWithoutEntryPointsAndVisibleOutsideTests
→ Iterable<
Declaration> -
returns all root level declarations of this package that don't have any entry points
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- sdkType → SdkType
-
type of sdk needed
no setterinherited
-
semantics
→ Set<
PackageApiSemantics> -
the semantics of this model. This indicates if this model is compatible (e.g. for diffing) with another model
no setterinherited
-
typeAliasDeclarations
→ List<
TypeAliasDeclaration> -
type alias declarations this package has
no setterinherited
- typeHierarchy → TypeHierarchy
-
the type hierarchy of the public API
no setterinherited
Methods
-
map<
TResult extends Object?> (TResult $default(_PackageApi value)) → TResult -
Available on PackageApi, provided by the PackageApiPatterns extension
Aswitch
-like method, using callbacks. -
mapOrNull<
TResult extends Object?> (TResult? $default(_PackageApi value)?) → TResult? -
Available on PackageApi, provided by the PackageApiPatterns extension
A variant ofmap
that fallback to returningnull
. -
maybeMap<
TResult extends Object?> (TResult $default(_PackageApi value)?, {required TResult orElse()}) → TResult -
Available on PackageApi, provided by the PackageApiPatterns extension
A variant ofmap
that fallback to returningorElse
. -
maybeWhen<
TResult extends Object?> (TResult $default(String packageName, String? packageVersion, String packagePath, List< InterfaceDeclaration> interfaceDeclarations, List<ExecutableDeclaration> executableDeclarations, List<FieldDeclaration> fieldDeclarations, List<TypeAliasDeclaration> typeAliasDeclarations, Set<PackageApiSemantics> semantics, AndroidPlatformConstraints? androidPlatformConstraints, IOSPlatformConstraints? iosPlatformConstraints, SdkType sdkType, List<PackageDependency> packageDependencies, Version minSdkVersion, TypeHierarchy typeHierarchy)?, {required TResult orElse()}) → TResult -
Available on PackageApi, provided by the PackageApiPatterns extension
A variant ofwhen
that fallback to anorElse
callback. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
when<
TResult extends Object?> (TResult $default(String packageName, String? packageVersion, String packagePath, List< InterfaceDeclaration> interfaceDeclarations, List<ExecutableDeclaration> executableDeclarations, List<FieldDeclaration> fieldDeclarations, List<TypeAliasDeclaration> typeAliasDeclarations, Set<PackageApiSemantics> semantics, AndroidPlatformConstraints? androidPlatformConstraints, IOSPlatformConstraints? iosPlatformConstraints, SdkType sdkType, List<PackageDependency> packageDependencies, Version minSdkVersion, TypeHierarchy typeHierarchy)) → TResult -
Available on PackageApi, provided by the PackageApiPatterns extension
Aswitch
-like method, using callbacks. -
whenOrNull<
TResult extends Object?> (TResult? $default(String packageName, String? packageVersion, String packagePath, List< InterfaceDeclaration> interfaceDeclarations, List<ExecutableDeclaration> executableDeclarations, List<FieldDeclaration> fieldDeclarations, List<TypeAliasDeclaration> typeAliasDeclarations, Set<PackageApiSemantics> semantics, AndroidPlatformConstraints? androidPlatformConstraints, IOSPlatformConstraints? iosPlatformConstraints, SdkType sdkType, List<PackageDependency> packageDependencies, Version minSdkVersion, TypeHierarchy typeHierarchy)?) → TResult? -
Available on PackageApi, provided by the PackageApiPatterns extension
A variant ofwhen
that fallback to returningnull
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited