VscodeConfigWriter class
ConfigWriter
for VS Code.
This ConfigWriter
takes the launch.json file, reads it and retains non dart-define arguments.
The new dart-define string generated from the .env file is appended to the retained arguments.
Constructors
- VscodeConfigWriter({required String projectPath, required String dartDefineString, required String? configName})
-
projectPath
is the path to VS Code project. It should contain the '.vscode/launch.json' file.dartDefineString
is the dart-define string which is to be written to the configconfigName
is the name of an existing configuration in launch.json. A config is not created if it is not found.
Properties
- configName → String?
-
finalinherited
- dartDefineString → String
-
finalinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- projectPath → String
-
finalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
call(
) → void -
inherited
-
getDartDefineList(
) → Iterable< String> - Splits the dart-define string into a list format as required by VS Code.
-
getMandatoryFilesToUpdate(
) → List< File> -
getNonDartDefineArguments(
List argList) → List -
Take
argList
and return only non dart define arguments from the list -
getOptionalFilesToUpdate(
) → List< File> -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
prettifyJson(
dynamic json) → String -
Pretty Print
json
-
toString(
) → String -
A string representation of this object.
inherited
-
updateConfig(
Map< String, dynamic> config, Iterable<String> dartDefineList) → Map<String, dynamic> -
Update a single VS Code
config
withdartDefineList
. -
writeConfig(
String fileContent) → String
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited