GoldenGenerator class
Generator for the LookGolden
annotation
It generates a golden tests for the Widget to look
Several variants can be generates depending on :
- the themes
- the dimensions provided
Constructors
Properties
- 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
-
anonymousMethod(
{required String widgetName, required String? builder, required String goldenName, required String? theme, required bool darkTheme, required String dimension}) → Method - Generates an anonymous method containing the Golden test body.
-
finalGoldenName(
String givenGoldenName, bool darkTheme, String dimension) → String - Generates the golden picture file name depending on the variant
-
generate(
LibraryReader library, BuildStep buildStep) → FutureOr< String> -
Generates Dart code for an input Dart library.
inherited
-
generateForAnnotatedElement(
Element element, ConstantReader annotation, BuildStep buildStep) → dynamic - Generates the golden tests
-
groupMethod(
{required String widgetName, required String? builder, required String goldenName, required String? lightTheme, required String? darkTheme, required List< String> dimensions}) → Expression - Generates a group method that runs the Golden tests.
-
mainMethod(
String widgetName, String? builder, String goldenName, String? lightTheme, String? darkTheme, List< String> dimensions) → Method - Generates a main method that runs the Golden tests.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
testWidgetMethod(
{required String widgetName, required String? builder, required String goldenName, required String? theme, required bool darkTheme, required String dimension}) → Expression - Generates a test method that runs a single Golden test.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited