nullable 1.0.0

SDKdartflutter
Platformandroidioswindowslinuxmacosweb

Nullable extension on functions

Nullable extension on functions

This extension introduces the nullable version of functions. The nullable version returns null on null input and calls the underlying function otherwise.

void main() {
  int.parse('12'); // 12
  int.parse(null); // Error: Invalid argument
  int.parse.nullable('12'); // 12
  int.parse.nullable(null); // null
}