defaultIfEmpty function

String? defaultIfEmpty(
  1. String? primary,
  2. String ifBlank
)

Implementation

String? defaultIfEmpty(String? primary, String ifBlank) =>
    (primary?.trim().isNotEmpty == true) ? primary : ifBlank;