TargetFileImpl class
A target file is a file that can be copied, altered, and/or generated into a new project.
- Inheritance
-
- Object
- FileConfig
- TargetFile
- TargetFileImpl
- Mixed in types
Constructors
- TargetFileImpl(FileConfig? config, {required String sourcePath, required String targetDir, required String pathWithoutSourceDir})
- A target file is a file that can be copied, altered, and/or generated into a new project.
Properties
-
combine
→ List<
Iterable< (String, String)> > -
no setterinherited
- extension → String
-
no setteroverride
- hashCode → int
-
The hash code for this object.
no setterinherited
- include → Include?
-
final
- includeConfig → IncludeConfig?
-
finalinherited
- name → Name?
-
the name of the file
final
-
nameConfig
→ StringOr<
NameConfig> ? -
finalinherited
- pathWithoutSourceDir → String
-
final
-
props
→ List<
Object?> -
The list of properties that will be used to determine whether
two instances are equal.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- sectionSetupPattern → RegExp
-
the pattern to find sections (sections) within the content
no setterinherited
- sourcePath → String
-
the path to the source file
final
- stringify → bool?
-
If set to
true
, the toString method will be overridden to output this instance's props.no setterinherited - targetDir → String
-
the path to the target file
final
-
variableConfig
→ Map<
String, String?> ? -
finalinherited
-
variables
→ Iterable<
Variable> -
retrieves all variables from the VarsMixin.varsMap
no setterinherited
- variablesToProcess → List
-
no setterinherited
-
vars
→ Iterable<
String> -
no setterinherited
-
varsMap
→ Set<
(String, String)> -
no setterinherited
Methods
-
checkForPartials(
{required String content, required Iterable< Partial> partials}) → ContentReplacement -
writes the
partials
to thecontent
inherited -
checkForSections(
String content, Variable variable) → ContentReplacement -
checks the
content
for sections (sections) and replaces them with thevariable
's valueinherited -
checkForVariables(
String content, Variable variable) → ContentReplacement -
replaces the
variable
in thecontent
inherited -
configurePath(
{required Iterable< Url> urls, required Iterable<Directory> dirs}) → ContentReplacement -
updates the file path with the provided
urls
anddirs
replacing the appropriate segments and file nameoverride -
formatName(
) → String -
the name of file with extension
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
sectionPattern(
Variable variable) → RegExp -
the pattern to find sections within the content
inherited
-
toJson(
) → Map< String, dynamic> -
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
variablePattern(
Variable variable) → RegExp -
the pattern to find variables within the content
inherited
-
write(
{required Brick brick, required Set< Variable> outOfFileVariables}) → FileWriteResult -
the path to the target file
override
-
writeFile(
{required String targetPath, required String sourcePath, required Iterable< Variable> variables, required Iterable<Variable> outOfFileVariables, required Iterable<Partial> partials}) → FileWriteResult -
writes the
targetPath
content using thesourcePath
's content and replacing thevariables
andpartials
with their configured valuesinherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited