AFSourceTemplateInsertion class

Class for statically declared insertion points in source templates.

You can declare an insertion point using something like:

  static final insertYourValue = AFSourceTemplateInsertion("your_value");

Then reference it in another source template, using something like:

  final example = t.childText("${YourClass.insertYourValue}");

Doing so will actually yield something like:

  final example = t.childText("[!af_your_value]");

in the file.

Then, when you instantiate a file or snippet, you will specify a mapping of insertion points to actual values which should be inserted.

Note that this class also has various modifier methods, like lower, upper, etc, which manipulate the value you are inserting.

Annotations

Constructors

AFSourceTemplateInsertion(String insertion, {String options = optionsNone})
const

Properties

no setter
camel AFSourceTemplateInsertion
no setter
camelPluralize AFSourceTemplateInsertion
no setter
hashCode int
The hash code for this object.
no setterinherited
insertion String
final
insertionPoint String
no setter
lower AFSourceTemplateInsertion
no setter
options String
final
optionsSuffix String
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
snake AFSourceTemplateInsertion
no setter
spaces AFSourceTemplateInsertion
no setter
upper AFSourceTemplateInsertion
no setter
upperFirst AFSourceTemplateInsertion
no setter

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
inherited

Constants

optionCamel → const String
optionCamelPluralize → const String
optionLower → const String
optionSnake → const String
optionsNone → const String
optionSpaces → const String
optionUpper → const String
optionUpperFirst → const String