Pubspec class

Annotations
  • @JsonSerializable()

Constructors

Pubspec(String name, {Version? version, String? publishTo, @Deprecated('See https://dart.dev/tools/pub/pubspec#authorauthors') String? author, @Deprecated('See https://dart.dev/tools/pub/pubspec#authorauthors') List<String>? authors, Map<String, VersionConstraint?>? environment, String? homepage, Uri? repository, Uri? issueTracker, List<Uri>? funding, List<String>? topics, List<Screenshot>? screenshots, String? documentation, String? description, Map<String, Dependency>? dependencies, Map<String, Dependency>? devDependencies, Map<String, Dependency>? dependencyOverrides, Map<String, dynamic>? flutter})
If author and authors are both provided, their values are combined with duplicates eliminated.
Pubspec.fromJson(Map json, {bool lenient = false})
factory
Pubspec.parse(String yaml, {Uri? sourceUrl, bool lenient = false})
Parses source yaml into Pubspec.
factory

Properties

author String?
If there is exactly 1 value in authors, returns it.
no setter
authors List<String>
final
dependencies Map<String, Dependency>
final
dependencyOverrides Map<String, Dependency>
final
description String?
final
devDependencies Map<String, Dependency>
final
documentation String?
final
environment Map<String, VersionConstraint?>?
final
flutter Map<String, dynamic>?
Optional configuration specific to Flutter packages.
final
funding List<Uri>?
Optional field to list the URLs where the package authors accept support or funding.
final
hashCode int
The hash code for this object.
no setterinherited
homepage String?
This should be a URL pointing to the website for the package.
final
issueTracker Uri?
Optional field to a web page where developers can report new issues or view existing ones.
final
name String
final
publishTo String?
Specifies where to publish this package.
final
repository Uri?
Optional field to specify the source code repository of the package. Useful when a package has both a home page and a repository.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
screenshots List<Screenshot>?
Optional field for specifying included screenshot files.
final
topics List<String>?
Optional field to list the topics that this packages belongs to.
final
version → Version?
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited