How do i test a expression in a string and evaluate it:
String expression = "'Cat' != 'Dog'";
I want that something like that:
if(expression) // return it logic result
like this:
if('Dog' != 'Doc'){
return true;
}else{
return false;
}
That in flutter, thanks in advance.
2
Answers
I had to create my own function that resolve my problem:
I hope it helps someone.
as @Vilsad PP mentioned in the comment we can use dart_eval package for this kind of things