A variety of extensions I use in my projects.


Package contains extensions for lists, strings, maps and async functions. Along with useful functions

Getting started

No setup required, just import the package.


List Extensions

  final personList = [
    CoderPerson(name: "Jane", age: 16, gender: Gender.female),
    CoderPerson(name: 'Bob', age: 20, gender: Gender.male),
    CoderPerson(name: 'King', age: 56, gender: Gender.male),

  final oldestPerson = personList.maxElement((element) => element.age);
  final youngestPerson = personList.minElement((element) => element.age);
  final totalAges = personList.sum((element) => element.age);
  final isListNullOrEmpty = personList.isNullOrEmpty;

String Extensions

  var control = '(342) 342-2314';
  var result = number.toPhoneNumberString;

  String email = 'testemail@mail.com';

Map Extensions

Removes null values

    var testMap = <String, dynamic>{
      'name': 'Tom',
      'age': null,
      'location': 'USA'
    var newMap = testMap.removeNulls;


Checking if your device is a tablet

var isTablet = await CoderMatthewsExtensions.isTablet();

Check example folder for more.

Additional information