ExpressionFunction<R extends Object> class

A function is a piece of dart code that performs a specific task.

A function can be used anywhere in an tag expression. Wherever that particular task should be performed.

An example of a function call: cos(pi) Should result in: -1

Custom Functions

You can adopt existing functions or add your own custom functions by manipulating the TemplateEngine.functionGroups field. See custom_function_test.dart.

Implemented types
Implementers

Constructors

ExpressionFunction.new({required String name, String? description, String? exampleExpression, String? exampleResult, ProjectFilePath? exampleCode, List<Parameter> parameters = const [], required Future<R> function(String position, RenderContext renderContext, Map<String, Object> parameters)})

Properties

description String?
final
exampleCode ProjectFilePath?
final
exampleExpression String?
final
exampleResult String?
final
function Future<R> Function(String position, RenderContext renderContext, Map<String, Object> parameters)
final
hashCode int
The hash code for this object.
no setterinherited
name String
final
parameters List<Parameter>
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

createMarkdownDocumentation(RenderContext renderContext, int titleLevel) List<String>
override
createMarkdownExamples(RenderContext renderContext, int titleLevel) List<String>
override
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