PropertyFactory class

Class that handles Property related operations.

Constructors

PropertyFactory()

Properties

hashCode int
The hash code for this object.
no setterinherited
log → Logger
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

build(String type, dynamic propValue, {dynamic argument}) → dynamic
Returns a result from a Property's type and propValue.
evaluateCondition(Map spec) bool
Evaluates an "OperatorCondition" Property.
evaluateList(List list, Map map) → void
Updates the content of a List by evaluating it's values using map as context.
evaluateMap(Map map, Map? otherMap) → void
Updates the content of a Map by evaluating it's values using otherMap as context.
evaluateOperator(dynamic leftStatement, String operator, dynamic rightStatement) bool
Evaluates the result of a given leftStatement, an operator and a rightStatement.
evaluateString(String? value, Map evaluatorContext) → dynamic
Evaluates a string using evaluatorContext. A string containing ${
evaluateStringPart(String value, Map evaluatorContext) → dynamic
evaluateValue(dynamic value, Map map) → dynamic
Returns the evaluated value of a given value using map as context.
formatDate(DateTime date, bool diffToNow, {String? format}) String
Method to build a String representing the Date part of a DateTime
formatDateTime(DateTime date, bool diffToNow, {String? format}) String
Method to build a String representing a DateTime
formatTime(DateTime date, bool diffToNow, {String? format}) String
Method to build a String representing the Time part of a DateTime
getEvaluatorContext(Object? value, Map state, Map? specContext) Map
Returns a Map with the evaluation context used when sanitizing properties of a NodeSpec. Used to resolve properties that use placeholders as values, like "${state.firstName}" or "${env.api_uri}".
getInsets(dynamic value) EdgeInsets?
Utility method to build an EdgeInsets based on a Property's value.
getKey(dynamic key) Key?
Utility method to return a Key based on a Property's value.
getText(String value, String context, {Map<String, dynamic>? attributes}) String
Utility method to return a translated string from a value. A context value will define it's transformation. E.g.: a context 'button' will return a title cased translated string.
loadProperties(IProperties properties) → void
Schema loading
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