PackageTrack
Sign in Get early access

dartx

Superpowers for Dart. Collection of useful static extension methods.

1.2.0 1000K downloads/mo #70 most downloaded on pub.dev leisim/dartx

What this package is like to depend on

Last release 3 years ago

no release in 18 months

Release timing varies

gaps range from 1 weeks to 1.3 years

Most releases are documented

notes for 16 of 24 stable releases

Nothing withdrawn

no release was ever pulled

12 years old

24 releases · first in 2014

0 releases in the last 12 months

see the full history below

Release timeline

24 releases · Jul 2014 to Jul 2023
2015 2017 2019 2021 2023 2025
Release Pre-release

Releases

latest 24
  1. 1.2.0 18 Jul 2023
    Release notes
    • Official Dart 3.0 release
    • General cleanup and CI update
    Open source →
    Release notes
    • Official Dart 3.0 release
    • General cleanup and CI update
    Open source →
  2. 1.1.0 12 Apr 2022
    Release notes
    • PR-151 New: String?.isNullOrBlank, String?.isNotNullOrBlank
    • PR-149 Fix type of extension: IterableForthItem -> IterableFourthItem
    • PR-147 New: int.toChar(): String
    • PR-147 New: String?.orEmpty: bool
    • PR-147 New: String.matches(RexExp): bool
    • PR-147 New: String.urlEncode and String.urlDecode
    • PR-147 New: buildString to build a StringBuffer an immediately return it
    • PR-156 Fix: Iterable.takeFirst(n) and Iterable.takeLast(n) crashed when n > length
    Open source →
    Release notes
    • PR-151 New: String?.isNullOrBlank, String?.isNotNullOrBlank
    • PR-149 Fix type of extension: IterableForthItem -> IterableFourthItem
    • PR-147 New: int.toChar(): String
    • PR-147 New: String?.orEmpty: bool
    • PR-147 New: String.matches(RexExp): bool
    • PR-147 New: String.urlEncode and String.urlDecode
    • PR-147 New: buildString to build a StringBuffer an immediately return it
    • PR-156 Fix: Iterable.takeFirst(n) and Iterable.takeLast(n) crashed when n > length
    Open source →
  3. 1.0.0 29 Nov 2021
    Release notes
    • Promote to stable version
    • Remove deprecated extensions
    Open source →
    Release notes
    • Promote to stable version
    • Remove deprecated extensions
    Open source →
  4. 0.8.0 01 Nov 2021
    Release notes
    • PR-136 New: Multiple extensions for Map. all(), any(), count(), filter(), filterKeys(), filterNot, filterValues, getOrElse(), mapEntries(), mapKeys(), mapValues(), maxBy(), maxWith(), minBy(), minWith, none(), toList(), toMap(), orEmpty()
    • PR-127 Improve: sumBy is now generic and works equally for num/int/double
    • PR-131 Fix: min()/max() which returned the wrong item for reversed ordered lists
    • PR-133 New: plus()/minus() and plusOrNull/minusOrNull to num which handle null
    • PR-138 Improve: Iterable.second returns T instead of T?. Analog to first
    • PR-142 Fix: isUpperCase/isLowerCase now threat only [a-zA-Z] chars as being uppercase

    Also, all linting issues have been fixed and the README has been drastically improved. Thanks @minhqdao

    Open source →
    Release notes
    • PR-136 New: Multiple extensions for Map. all(), any(), count(), filter(), filterKeys(), filterNot, filterValues, getOrElse(), mapEntries(), mapKeys(), mapValues(), maxBy(), maxWith(), minBy(), minWith, none(), toList(), toMap(), orEmpty()
    • PR-127 Improve: sumBy is now generic and works equally for num/int/double
    • PR-131 Fix: min()/max() which returned the wrong item for reversed ordered lists
    • PR-133 New: plus()/minus() and plusOrNull/minusOrNull to num which handle null
    • PR-138 Improve: Iterable.second returns T instead of T?. Analog to first
    • PR-142 Fix: isUpperCase/isLowerCase now threat only [a-zA-Z] chars as being uppercase

    Also, all linting issues have been fixed and the README has been drastically improved. Thanks @minhqdao

    Open source →
  5. 0.7.1 22 Mar 2021
    Release notes
    • PR-126 Improve runtime of elementAtOrNull for List
    • PR-125 Fix whereNotNull to actually return non-null elements
    Open source →
    Release notes
    • PR-126 Improve runtime of elementAtOrNull for List
    • PR-125 Fix whereNotNull to actually return non-null elements
    Open source →
  6. 0.7.0 14 Mar 2021
    Release notes
    • All extensions methods now have their own extension which can be imported explicitly with show/hide. This allows the usage of package:collection and dartx in the same file.
    • Undeprecate firstOrNullWhere until dartx can export package:collection itself
    • New Directory.file and Directory.directory extensions to quickly create file/directory references
    • Update time package
    Open source →
    Release notes
    • All extensions methods now have their own extension which can be imported explicitly with show/hide. This allows the usage of package:collection and dartx in the same file.
    • Undeprecate firstOrNullWhere until dartx can export package:collection itself
    • New Directory.file and Directory.directory extensions to quickly create file/directory references
    • Update time package
    Open source →
  7. 0.6.0 01 Mar 2021
    Release notes
    • PR-120 Migrate to nullsafety
    • Fix minBy, maxBy NPE for empty lists
    • PR-69 New Dictionary.contains
    • PR-57 New Iterable.slice
    Open source →
    Release notes
    • PR-120 Migrate to nullsafety
    • Fix minBy, maxBy NPE for empty lists
    • PR-69 New Dictionary.contains
    • PR-57 New Iterable.slice
    Open source →
  8. 0.5.0 21 Jul 2020
    Release notes
    • PR-94 Breaking: Iterable<T>.zip(other, transform) now supports zipping iterables of other types the T. This is a breaking change because it is now required to add types in the transform function.
      final amounts = [2, 3, 4];
      final animals = ['dogs', 'birds', 'cats'];
      final all = amounts.zip(animals, (int amount, String animal) => '$amount $animal');
      // lambda types are now required:  ⇧           ⇧
      // all: ['2 dogs', '3 birds', '4 cats']
    • PR-90 New String extensions
      • String removePrefix(String prefix)
      • String removeSuffix(String suffix)
      • String removeSurrounding({String prefix, String suffix})
      final name = 'James Bond'.removePrefix('James '); // Bond
      final milliseconds = '100ms'.removeSuffix('ms'); // 100
      final text = '<p>Some HTML</p>'.removeSurrounding(prefix: '<p>', suffix: '</p>'); // Some HTML
    • PR-88 New List extension void swap(int, int) which swaps the elements in the indices provided.
      final list = [1, 2, 3, 4];
      list.swap(0, 2); // [3, 2, 1, 4]
    • PR-100 Relax the upper version constraint of collection to support Flutter 1.20 (which uses collection: 1.3.0-nullsafety)
    • PR-101 Relax the upper version constraint of crypto
    Open source →
    Release notes
    • PR-94 Breaking: Iterable<T>.zip(other, transform) now support zipping iterables of other types the T. This is a breaking change because it is now required to add types in the transform function.
      final amounts = [2, 3, 4];
      final animals = ['dogs', 'birds', 'cats'];
      final all = amounts.zip(animals, (int amount, String animal) => '$amount $animal');
      // lambda types are now required:  ⇧           ⇧
      // all: ['2 dogs', '3 birds', '4 cats']
      
    • PR-90 New String extensions
      • String removePrefix(String prefix)
      • String removeSuffix(String suffix)
      • String removeSurrounding({String prefix, String suffix})
      final name = 'James Bond'.removePrefix('James '); // Bond
      final milliseconds = '100ms'.removeSuffix('ms'); // 100
      final text = '<p>Some HTML</p>'.removeSurrounding(prefix: '<p>', suffix: '</p>'); // Some HTML
      
    • PR-88 New List extension void swap(int, int) which swaps the elements in the indices provided.
      final list = [1, 2, 3, 4];
      list.swap(0, 2); // [3, 2, 1, 4]
      
    • PR-100 Relax the upper version constraint of collection to support Flutter 1.20 (which uses collection: 1.3.0-nullsafety)
    • PR-101 Relax the upper version constraint of crypto
    Open source →
  9. 0.4.2 17 Jun 2020
    Release notes
    • Increase dependency range of characters to include 1.0.0. Fixes #87
    • Raise min sdk version to 2.6.0 to prevent pub publishing warning for pre-release versions
    Open source →
    Release notes
    • Increase dependency range of characters to include 1.0.0
    • Raise min sdk version to 2.6.0 to prevent pub publishing warning for pre-release versions
    Open source →
  10. 0.4.1 14 May 2020
    Release notes
    • PR-84 Increase path version range to be compatible with Flutter 1.17
    • PR-83 Run tests on macOS
    Open source →
    Release notes
    • PR-84 Increase path version range to be compatible with Flutter 1.17
    • PR-83 Run tests on macOS
    Open source →
  11. 0.4.0 03 May 2020
    Release notes

    Iterable

    • PR-41 New Iterable<T>.containsAny(Iterable<T>) extension
    • PR-46 New Iterable<num>.median() extension
    • PR-53 New Iterable<T>.asStream() extension converts any Iterable to a Stream
    • PR-59 New Iterable<T>.cached extension creates a cached Iterable preventing lazy operators such as .map to execute again
    • PR-56 Make Iterable<Iterable<T>>.flatten() typesafe and return Iterable<T> instead of Iterable<dynamic>
    • PR-62 New Iterable<T>.chunkWhile(bool Function(T, T) predicate): Iterable<List<E>> extension splits a collection into a lazy Iterables of chunks, where chunks are created as long as predicate is true for a pair of entries.
    • PR-62 New Iterable<T>.splitWhen(bool Function(E, E) predicate): Iterable<List<E>> extension splits a collection into a lazy Iterable, where each split will be make if predicate returns true for a pair of entries.
    • PR-54 New Iterable<Future<T>>.asStreamAwaited(): Stream<T> extension to create a stream from a group of futures.

    String

    • PR-72 New String.isNullOrEmpty extension
    • PR-43 New String.toInt({int radix}) extension as alias for int.parse(String, {int radix}) (also String.toIntOrNull({int radix}))
    • PR-75 Deprecate String.chars in favour of String.characters from the official characters package.

    Ranges

    • PR-74 New Comparable<T>.rangeTo(Comparable<T> end) extension to create ranges of DateTime or String.
    • PR-45 New num.between(num first, num endInclusive): bool extension
    • PR-45 New num.inRange(Range<num> range): bool extension
    • PR-45 New Comparable<T>.between(T first, T endInclusive): bool extension
    • PR-45 New Comparable<T>.inRange(ComparableRange<T> range): bool extension
    Open source →
  12. 0.3.0 17 Jan 2020
    Release notes
    • PR-14 New int.rangeTo(int) extension
    • PR-24 Default implementations for Comparable <, <=, >= and > operators.
    • PR-13 Removed quiver dependency
    • PR-21 New String.md5 to calculate a MD5 digest
    • PR-25 New FileSystemEntity.withName(String newName) to get a File with a different name
    • PR-25 New FileSystemEntity.extension to get the file extension
    • PR-17 Callable.invoke() is now marked as Deprecated in favour of darts call() method. It will not be removed though, until darts .call() methods gets auto-completion.
    • PR-30 New Comparable.coerceIn(), Comparable.coerceAtLeast() and Comparable.coerceAtMost()
    • PR-31 Fixed num.toBytes()
    • PR-33 Fixed .thenBy() and .thenWith() extensions for Lists

    Breaking

    • PR-29 Iterable<E>.windowed - remove the required transform lambda
    Open source →
  13. 0.2.0 30 Oct 2019
    Release notes
    • Moved to time.dart library for time extensions
    Open source →
  14. 0.1.2 27 Oct 2019
    Release notes
    • Fixed docs
    • Added Function.curry(), Function.invoke(), Function.partial() and Function.flip()
    • 'string'.reversed now correctly handles grapheme clusters (like emoji)

    Breaking

    • 'string'.chars now returns the grapheme clusters instead of Runes
    Open source →
  15. 0.1.1 24 Oct 2019
    Release notes
    • Bugfixes
    • More tests
    Open source →
  16. 0.1.0 24 Oct 2019

    Nothing published for this version

  17. 0.1.0+1 24 Oct 2019
    Release notes
    • Initial release
    Open source →
  18. 0.0.8 11 Jan 2017

    Nothing published for this version

  19. 0.0.7 06 Jan 2015

    Nothing published for this version

  20. 0.0.6 05 Jan 2015

    Nothing published for this version

  21. 0.0.5 28 Jul 2014

    Nothing published for this version

  22. 0.0.3 04 Jul 2014

    Nothing published for this version

  23. 0.0.2 04 Jul 2014

    Nothing published for this version

  24. 0.0.1 03 Jul 2014

    Nothing published for this version

Every package, every release, already written down.

The archive is open and free. Watching your own project is what we are building next.

Browse the archive