withString<R> function

R? withString<R>(
  1. Iterable<String?> strings,
  2. R handler(
    1. String string
    )
)

Implementation

R? withString<R>(Iterable<String?> strings, R Function(String string) handler) {
  for (final string in strings) {
    if (string != null && string.isNotEmpty) {
      return handler(string);
    }
  }
  return null;
}