MethodGenerator class

Backward compatibility wrapper for the original MethodGenerator Now delegates to the new modular generators

Constructors

MethodGenerator()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

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

Operators

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

Static Methods

generateAbstractCopyWithMethods({required List<NameType> interfaceFields, required String interfaceName, required List<NameType> interfaceGenerics, bool generateCopyWithFn = false}) String
Generate abstract copyWith methods (now includes both copyWith and patchWith signatures)
generateAllMethods({required List<NameType> classFields, required List<NameType> interfaceFields, required String interfaceName, required String className, required bool isClassAbstract, required List<NameType> interfaceGenerics, bool generateCopyWithFn = false, List<String> knownClasses = const [], bool isInterfaceSealed = false, List<NameType> classGenerics = const [], bool nonSealed = false, bool hidePublicConstructor = false}) String
Generate all methods for a class (copyWith, patchWith, changeTo)
generateChangeToMethods({required List<NameType> classFields, required List<NameType> interfaceFields, required String interfaceName, required String className, required bool isClassAbstract, List<NameType> interfaceGenerics = const [], List<String> knownClasses = const [], bool isInterfaceSealed = false, List<NameType> classGenerics = const [], bool nonSealed = false, bool hidePublicConstructor = false, bool interfaceHidePublicConstructor = false}) String
Generate changeTo methods
generateClassMethods({required List<NameType> classFields, required String className, required List<NameType> classGenerics, List<String> knownClasses = const [], bool hidePublicConstructor = false}) String
Generate class-specific methods (for the class's own fields)
generateCopyWithMethods({required List<NameType> classFields, required List<NameType> interfaceFields, required String interfaceName, required String className, required bool isClassAbstract, required List<NameType> interfaceGenerics, bool generateCopyWithFn = false, List<String> knownClasses = const [], List<NameType> classGenerics = const [], bool nonSealed = false, bool hidePublicConstructor = false}) String
Generate copyWith methods (now generates simple copyWith without patchInput) AND separate patchWith methods
generateMultipleInterfaceMethods({required List<NameType> classFields, required Map<String, List<NameType>> interfaceFieldsMap, required Map<String, List<NameType>> interfaceGenericsMap, required String className, required bool isClassAbstract, bool generateCopyWithFn = false, List<String> knownClasses = const [], Map<String, bool> interfaceSealedMap = const {}, List<NameType> classGenerics = const [], bool nonSealed = false, bool hidePublicConstructor = false}) String
Generate methods for multiple interfaces
shouldGenerateMethods({required String interfaceName, required bool isClassAbstract, bool isInterfaceSealed = false}) bool
Check if methods should be generated