How to define new operators in Dart?

Viewed 216

I want to define a a custom operator in dart,like:

condition ?: func();
1 Answers

Maybe you are looking for ternary operator? It works same as an if-else statement. Example:

condition ? funcConditionTrue() : funcConditionFalse();
Related