build_support library

Classes

VersionBoundaries
Version boundaries.
VersionBoundary
Version boundary.

Enums

PubDependencyKind
Pub dependency kind.

Extensions

VersionBoundaryVersionExt on Version
Public helper

Constants

dartTemplateConsole → const String
console: A command-line application. (default)
dartTemplateConsoleSimple → const String
console-simple: A simple command-line application. (default) @Deprecated
dartTemplatePackage → const String
package: A package containing shared Dart libraries
dartTemplateWeb → const String
web: A web app that uses only core Dart libraries.
flutterTemplateApp → const String
app: A Flutter application.
flutterTemplatePackage → const String
Flutter package shared dart code.

Properties

buildSupportsAndroid → bool
Always allowed for now
no setter
buildSupportsIOS → bool
For now based on x-code presence.
no setter
buildSupportsLinux → bool
Build supports Linux
no setter
buildSupportsMacOS → bool
Build supports MacOS
no setter
buildSupportsWindows → bool
Build supports Windows
no setter
isFlutterSupportedSync → bool
true if flutter is supported
no setter
isNodeSupportedSync → bool
true if flutter is supported
final

Functions

buildInitDart() → Future<void>
Setup minimum Dart support
buildInitFlutter() → Future<void>
Setup minimum flutter support
checkAndActivatePackage(String package, {bool? verbose}) → Future<bool>
Prefer PubGlobalPackageService Returns true if the package was activated during this call.
checkAndActivateWebdev({bool? verbose}) → Future<void>
Check if webdev is activated.
checkOrPubActivateDevBuild({bool? verbose, VersionBoundaries? versionBoundaries}) → Future<void>
Get dev_build pub global update
dartCreateProject({String template = dartTemplateConsoleSimple, required String path}) → Future<void>
Create a dart project.
flutterCreateProject({required String path, String template = flutterTemplateApp, List<String>? platforms, bool? noAnalyze}) → Future<void>
Create a flutter project.
getPubPackageRoot(String resolverPath, {FilterDartProjectOptions? filterDartProjectOptions}) → Future<String>
throws if no project found
getPubPackageRootSync(String resolverPath) → String
throws if no project found, returns the nearest pub package root from a given path (could be current dir using '.')
isPubPackageRoot(String dirPath, {bool verbose = false, FilterDartProjectOptions? filterDartProjectOptions}) → Future<bool>
return true if root package Check whether the package contains a supported version
isPubPackageRootSync(String dirPath) → bool
@Deprecated('Use isPubPackageRoot')
nodeSetupCheck(String dir) → Future
Install node modules for test.
packageConfigGetPackages(Map packageConfigMap) → List<String>
Get a list of packages
pathGetAnalysisOptionsYamlMap(String packageDir) → Future<Map<String, Object?>>
Read analysis_options.yaml file (io only)
pathGetPackageConfigMap(String packageDir) → Future<Map<String, Object?>>
Map a package to a location
pathGetPubspecYamlMap(String packageDir) → Future<Map<String, Object?>>
Read pubspec.yaml file (io only)
pathGetResolvedPackagePath(String path, String package, {bool? windows}) → Future<String?>
Shortcut to get a dependency, not officient as it reads multiple times the package_config.json file.
pathPackageConfigMapGetPackagePath(String path, Map packageConfigMap, String package, {bool? windows}) → String?
Get a library path, you can get the project dir through its parent null if not found
pathPubspecAddDependency(String dir, String dependency, {List<String>? dependencyLines}) → Future<bool>
Returns true if added
pathPubspecGetDependencyLines(String dir, String dependency) → Future<List<String>?>
Null if not a dependency, formatted on a single line with depencency prefix or multiple lines
pathPubspecRemoveDependency(String dir, String dependency) → Future<bool>
Returns true if removed
pubspecYamlGetDependenciesMap(Map yaml, {PubDependencyKind? kind}) → Model?
Get the dependency map
pubspecYamlGetDependenciesPackageName(Map yaml, {PubDependencyKind? kind}) → Iterable<String>
Get the dependencies packages name.
pubspecYamlGetPackageName(Map yaml) → String?
Get the package name from pubspec.yaml
pubspecYamlGetSdkBoundaries(Map? map) → VersionBoundaries?
Get sdk boundaries
pubspecYamlGetVersion(Map yaml) → Version
Get the package version from pubspec.yaml
pubspecYamlGetVersionOrNull(Map yaml) → Version?
Get the package version from pubspec.yaml Could be not valid for workspace
pubspecYamlHasAnyDependencies(Map yaml, List<String> dependencies) → bool
True if the pubspec.yaml has any of the dependencies
pubspecYamlHasWorkspaceResolution(Map map) → bool
True if the pubspec.yaml has a workspace resolution
pubspecYamlIsWorkspaceRoot(Map map) → bool
True if the pubspec.yaml is a workspace root
pubspecYamlSupportsFlutter(Map map) → bool
True if the pubspec.yaml has the flutter dependency.
pubspecYamlSupportsNode(Map map) → bool
True if the pubspec.yaml has the node build dependency. Not supported.
pubspecYamlSupportsTest(Map map) → bool
True if the pubspec.yaml has the test dependency.
pubspecYamlSupportsWeb(Map map) → bool
True if the pubspec.yaml has the web dependency.