nullable 1.0.0 copy "nullable: ^1.0.0" to clipboard
nullable: ^1.0.0 copied to clipboard

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
}
5
likes
20
pub points
14%
popularity

Publisher

unverified uploader

Nullable extension on functions

Homepage

License

MIT (LICENSE)

More

Packages that depend on nullable