createFactory method
Method
createFactory()
Returns the function that will return a new instance of the class.
Implementation
Method createFactory() => Method((b) => b
..name = _factoryName
..returns = _$Injector
..lambda = true
..requiredParameters.add(Parameter((b) => b
..name = 'parent'
..type = _$Injector))
..body = refer(_className!).newInstanceNamed('_', [
refer('parent'),
]).code);