helpers library

Classes

ChangeWidgetNameFix
A fix that replaces the widget constructor name with a new one specified as widgetName.

Extensions

LintRuleNodeRegistryExtensions on LintRuleNodeRegistry

Functions

getAllInnerHookExpressions(AstNode node) List<InvocationExpression>
getAllReturnExpressions(FunctionBody body) List<Expression?>
Returns all return expressions of a function body.
getBuildMethod(ClassDeclaration node) → MethodDeclaration?
isExpressionExactlyType(Expression expression, String typeName, String packageName) bool
isInstanceCreationExpressionOnlyUsingParameter(InstanceCreationExpression node, {required String parameter, Set<String> ignoredParameters = const {}}) bool
Checks whether an instance creation uses only the specified named parameter.
isWidgetClass(ClassDeclaration node) bool
maybeGetSingleReturnExpression(FunctionBody body) → Expression?
maybeHookBuilderBody(InstanceCreationExpression node) → FunctionBody?
Given an instance creation, returns the builder function body if the node is a HookBuilder.
typeParametersString(Iterable<TypeParameter> typeParameters, {bool withBounds = false}) String