v1/src/compiler/view_compiler/view_compiler_utils library

Constants

namespaceUris → const Map<String, String>

Functions

convertValueToOutputAst(dynamic value) Expression
Converts a reference, literal or existing expression to provider value.
createDiTokenExpression(CompileTokenMetadata token) Expression
createFlatArrayForProjectNodes(List<Expression> expressions, {bool constForEmpty = true}) Expression
Do not use this function outside of projectedNodes.
debugInjectorEnter(Expression identifier) Statement
debugInjectorLeave(Expression identifier) Statement
debugInjectorWrap(Expression identifier, Expression wrap) Expression
detectHtmlElementFromTagName(String tagName) bool
Returns true if tag name is HtmlElement.
getHostViewFactoryName(CompileDirectiveMetadata component) String
getPropertyInView(Expression property, CompileView callingView, CompileView definedView) Expression
getViewFactory(CompileDirectiveMetadata component, String name) Expression
Returns a callable expression for the component view factory named name.
getViewFactoryName(CompileDirectiveMetadata component, int index) String
Returns the name of a component view factory for index.
identifierFromTagName(String name) CompileIdentifierMetadata
Returns strongly typed html elements to improve code generation.
injectFromViewParentInjector(CompileView view, CompileTokenMetadata token, bool optional) Expression
maybeCachedCtxDeclarationStatement({Set<String?>? readVars, List<Statement> statements = const []}) List<Statement>
Returns statements to locally cache AppView.ctx as _ctx, if needed.
mergeHtmlAndDirectiveAttributes(ElementAst elementAst, List<CompileDirectiveMetadata> directives) List<Binding>
replaceReadClassMemberInExpression(Expression expression, ReplaceWithName replacer) Expression
Returns expression with every ReadClassMemberExpr replaced with an equivalently named ReadPropExpr invoked on the receiver returned from replacer.
unsafeCast(Expression expression, [OutputType? cast]) Expression
Returns unsafeCast<{Cast}>(expression).
unwrapDirectiveInstance(Expression? directiveInstance) Expression?

Typedefs

ReplaceWithName = Expression Function(String name)