I want to define a a custom operator in dart,like:
condition ?: func();
I want to define a a custom operator in dart,like:
condition ?: func();
Maybe you are looking for ternary operator? It works same as an if-else statement. Example:
condition ? funcConditionTrue() : funcConditionFalse();