ifEmpty method

String ifEmpty([
  1. String value = 'null'
])

Get default value if string is empty.

Implementation

String ifEmpty([String value = 'null']) => trim().isEmpty ? value : this;