ifEmpty method

String ifEmpty(
  1. String f()
)

Returns result of f if this is empty, else returns this.

Implementation

String ifEmpty(String Function() f) => isEmpty ? f() : this;