FinderGenerator class
A generator for generating Finder classes
Constructors
Properties
-
defaultConstructorFields
→ Map<
String, Set< ConstructorFieldModel> > -
Default constructor fields are fields that is needed by the generated
Finder or Matcher. For instance, to generate a Matcher with specification
matchNWidget
, this will mean that a variablen
will need to be generated in the constructor.no setter - generatorName → String
-
Generator name used for debug purposes
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- throwOnUnresolved → bool
-
finalinherited
- typeChecker → TypeChecker
-
no setterinherited
Methods
-
classSuffix(
ClassElementExtract extract) → String - A name that is appended to generated class
-
doesNotContainImport(
String importToWrite) → bool -
Return true if
importToWrite
does not exist in import string buffer Returns false otherwiseinherited -
generate(
LibraryReader library, BuildStep buildStep) → FutureOr< String> -
Generates Dart code for an input Dart library.
inherited
-
generateFor(
ConstantReader annotation) → List< WidgetDartObject> -
Returns a list of
DartObject
to generate Matcher or Finder -
generateForAnnotatedElement(
Element element, ConstantReader annotation, BuildStep buildStep) → FutureOr< String> -
Implement to return source code to generate for
element
.inherited -
globalVariableNamePrefix(
ClassElementExtract extract) → String - Used to prefix global variables names
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
writeClassToBuffer(
ClassElementExtract extract, StringBuffer classStringBuffer) → void - Implement this method to write class code to the StringBuffer
-
writeGlobalVariables(
ClassElementExtract extract) → void -
Writes global instantiation of generated classes
inherited
-
writeImports(
StringBuffer importBuffer, {required ClassElementExtract classExtract}) → void -
Responsible for writing the required imports for the generated class
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited