or method

String or(
  1. String value
)

If the string is empty, return the value.

example

String gender = user.gender.or(null);

Implementation

String or(String value) => isEmpty ? value : this;