ifEmpty<T> method

Future<T>? ifEmpty<T>(
  1. Future<T> action()
)

If the string is empty, performs an action.

Implementation

Future<T>? ifEmpty<T>(Future<T> Function() action) =>
    isEmptyOrNull ? action() : null;