ifNull method

void ifNull(
  1. void block()
)

Executes block if value is null Usage: user.ifNull(() => print('No user'))

Implementation

void ifNull(void Function() block) {
  if (this == null) block();
}