Dart Essentials

Lightweight dart package containing several frequently used types and helper functions

Tuples

final orange = Tuple<String>('juice', 'pulp');
print(orange.x); // outputs 'juice'

final juice = Tuple4<bool>(false, true, true, true);
final tea = juice.toList(); // juiceList = <bool>[false, true, true, true]

// use polytuples for tuples containing different types
final tennis = PolyTuple3<int, int, bool>(51, 67, bool);
final way = PolyTuple<String, int>('Evening', )

Regex Extras

if ('Hello World'.isAlphabetic()) {
  // this will run
  print('Hello World');
}

if ('1 4.2'.isNumeric()) {
  // this won't run as it has a space
  print('I am very silly');
}

if ('Swimming 24'.isAlphanumeric()) {
  // this will run
  print('Hi!!');
}

Additional information

For extra help on top of the autogenerated docs, the source code is available on the github repo (https://github.com/UnhappyTurnip/dart-tuples). If you are really stuck, or there is an internal issue, create either an issue or pull request on github. If some extra functionality is needed, either make a fork of the project and add it to your own branch, or if it is a largely used feature, again create either an issue or pull request on github.

Libraries

regex_extras
Library containing a collection of frequently used regexes, as well as helper functions in the form of String extension methods.
tuples
Library containing a collection of tuple types