AndroidStudioConfigWriter class
ConfigWriter
for Android Studio and Intellij IDEs.
This ConfigWriter
reads all xml files containing Run configuration and retains non dart-define arguments.
The new dart-define string generated from the .env file is appended to the retained arguments.
Constructors
- AndroidStudioConfigWriter({required String projectPath, required String dartDefineString, required String? configName})
-
projectPath
is the path to Android Studio project. It should contain the '.idea/workspace.xml' file or '.run/*.xml' filesdartDefineString
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
-
elementHasArgs(
XmlElement element) → bool -
Checks if
element
has 'additionalArgs'. We should ideally check for 'attachArgs' too I suppose. -
getMandatoryFilesToUpdate(
) → List< File> -
getOptionalFilesToUpdate(
) → List< File> -
getRetainedArgs(
String oldArguments) → String -
Remove all dart-defines from
oldArguments
and return whatever is remaining. -
isXmlElementFlutterConfig(
XmlElement element) → bool -
isXmlElementSameAsConfig(
XmlElement element) → bool -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
updateAndroidStudioConfiguration(
XmlElement configurationNode) → void -
updateElement(
XmlElement option) → void -
Update the Configuration
option
with new dart-define while preserving old arguments. -
writeConfig(
String configXmlString) → String
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited