Skip to main content

is_dart_empty_or_not 0.6.0 copy "is_dart_empty_or_not: ^0.6.0" to clipboard
is_dart_empty_or_not: ^0.6.0 copied to clipboard

A Dart package that provides extensions for checking empty or zero values

0.6.0 #

  • ADDED: whenEmptyOrNull on String, List, Set, Map and their nullable twins — the value.isEmpty ? null : value normalize-to-null in one call (the fallback whenEmptyUse cannot express: its parameter is non-nullable).
  • ADDED: whenZeroOrNull on int, double and num — the value == 0 ? null : value normalize-to-null.
  • ADDED: isNullOrBlank / isNotNullNorBlank on String? — like isNullOrEmpty / isNotNullNorEmpty but trim-aware (blank input counts as absent).

0.5.1 #

  • DOCS: document the type-promotion caveat on the nullable extensions (Dart does not promote through extension getters; keep the explicit form when the value is used after the guard).

0.5.0 #

  • ADDED: nullable-aware extensions for String?, List?, Map? and Set?: isNullOrEmpty / isNotNullNorEmpty plus a nullable whenEmptyUse with the same call shape as the non-nullable one — collapses the common value == null || value.isEmpty guard into a single call.

0.4.0 #

  • BREAKING: dependencies update:

    environment:
      sdk: ">=3.11.0 <4.0.0"
    

0.3.0 #

  • BREAKING: dependencies update:

    environment:
      sdk: ">=3.10.0 <4.0.0"
    
    dev_dependencies:
      lints: ^6.0.0
      test: ^1.29.0
      xsoulspace_lints: ^0.1.2
    

0.2.3 #

  • Added example file
  • Fixed repository link

0.2.2 #

  • Added tests and coverage

0.2.0 #

  • Added extension methods for Duration:
    • isZero
    • whenZeroUse
    • isNegative
    • whenNegativeUse
    • isPositive

0.1.0 #

initial version

2
likes
160
points
21k
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

A Dart package that provides extensions for checking empty or zero values

Repository (GitHub)
View/report issues

License

MIT (license)

More

Packages that depend on is_dart_empty_or_not