write method

  1. @override
Method write()
override

Implementation

@override
Method write() {
  return Method((builder) => builder
    ..annotations.add(overrideAnnotationExpression)
    ..returns = refer(method.returnType.getDisplayString(
      withNullability: true,
    ))
    ..name = method.name
    ..requiredParameters.addAll(_generateParameters())
    ..modifier = MethodModifier.async
    ..body = Code(_generateMethodBody()));
}