build_support library

Classes

VersionBoundaries
Version boundaries.
VersionBoundary
Version boundary.

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>
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)
pathPackageConfigMapGetPackagePath(String path, Map packageConfigMap, String package, {bool? windows}) String?
Get a library path, you can get the project dir through its parent
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
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
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.