File tree Expand file tree Collapse file tree 1 file changed +14
-6
lines changed
packages/digit_flow_builder/lib/blocs Expand file tree Collapse file tree 1 file changed +14
-6
lines changed Original file line number Diff line number Diff line change @@ -1074,17 +1074,25 @@ class ConditionEvaluator {
10741074
10751075 switch (conf['operator' ]) {
10761076 case 'equals' :
1077- return left == right;
1077+ return left. toString () == right. toString () ;
10781078 case 'notEquals' :
1079- return left != right;
1079+ return left. toString () != right;
10801080 case 'lt' :
1081- return (left is num && right is num ) ? left < right : false ;
1081+ final leftInt = int .tryParse (left.toString ()) ?? 0 ;
1082+ final rightInt = int .tryParse (right.toString ()) ?? 0 ;
1083+ return leftInt < rightInt;
10821084 case 'lte' :
1083- return (left is num && right is num ) ? left <= right : false ;
1085+ final leftInt = int .tryParse (left.toString ()) ?? 0 ;
1086+ final rightInt = int .tryParse (right.toString ()) ?? 0 ;
1087+ return leftInt <= rightInt;
10841088 case 'gt' :
1085- return (left is num && right is num ) ? left > right : false ;
1089+ final leftInt = int .tryParse (left.toString ()) ?? 0 ;
1090+ final rightInt = int .tryParse (right.toString ()) ?? 0 ;
1091+ return leftInt > rightInt;
10861092 case 'gte' :
1087- return (left is num && right is num ) ? left >= right : false ;
1093+ final leftInt = int .tryParse (left.toString ()) ?? 0 ;
1094+ final rightInt = int .tryParse (right.toString ()) ?? 0 ;
1095+ return leftInt >= rightInt;
10881096 default :
10891097 return null ;
10901098 }
You can’t perform that action at this time.
0 commit comments