Skip to content

Commit 6b73cbe

Browse files
committed
Variables improvements
- Refactor properties value getter into a delegate. - Fix list parsing from string. - Improve empty variable syntax identifier regex. - Refactor ConditionEvaluator move BuildContext out of it. - Add support for data and variable overrides. - Add data source for list view and update transformer to use that data source.
1 parent 15ed196 commit 6b73cbe

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/src/api/extensions.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ extension StringExtensions on String {
2929
} else if (R == List) {
3030
try {
3131
return value
32-
.substring(1, value.length - 2)
32+
.substring(1, value.length - 1)
3333
.split(',')
3434
.map((e) => e.trim().parsedValue())
3535
.toList() as R?;

lib/src/api/regexes.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ final RegExp variablePathComposingRegex = RegExp(variablePathComposingPattern);
126126
const String variableSyntaxIdentifierPattern = r'\${(?<value>.+)}';
127127

128128
/// A regex that can match empty ${} syntax with partial match for curly braces.
129-
const String emptyVariableSyntaxIdentifierPattern = r'\${?}?';
129+
const String emptyVariableSyntaxIdentifierPattern = r'^\${?}?$';
130130

131131
/// Regex for [emptyVariableSyntaxIdentifierPattern].
132132
final RegExp emptyVariableSyntaxIdentifierRegex =

0 commit comments

Comments
 (0)