build_support
library
Functions
-
buildInitDart()
→ Future<void>
-
Setup minimum Dart support
-
buildInitFlutter()
→ Future<void>
-
Setup minimum flutter support
-
checkAndActivatePackage(String package, {bool? verbose})
→ Future<bool>
-
Returns true if the package was activated during this call.
-
checkAndActivateWebdev({bool? verbose})
→ Future<void>
-
Check if webdev is activated.
-
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.
-
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
-
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
-
pubspecYamlHasAnyDependencies(Map yaml, List<String> dependencies)
→ bool
-
True if the pubspec.yaml has any of the dependencies
-
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.