Skip to content

A Dart library containing convenient extension methods on basic Dart objects.

License

Notifications You must be signed in to change notification settings

google/dart-basics

Folders and files

NameName
Last commit message
Last commit date

Latest commit

373b6ea · Feb 22, 2023

History

44 Commits
Feb 22, 2023
Jun 21, 2022
Feb 22, 2023
Feb 22, 2023
Jul 5, 2022
May 25, 2022
Feb 22, 2023
Dec 19, 2019
Jun 21, 2022
Jun 21, 2022
Dec 19, 2019
Feb 22, 2023

Dart CI pub package package publisher

This repository contains a collection of useful extension methods on the built-in objects in Dart, such as String, Iterable, and Object.

Usage

Import the basics library.

import 'package:basics/basics.dart';

Then use the methods directly on objects in your dart code.

import 'package:basics/basics.dart';

main() async {
  const numbers = <int>[2, 4, 8];

  if (numbers.all((n) => n.isEven)) {
    print('All numbers are even.');
  }

  print('sum of numbers is: ${numbers.sum()}');

  for (var _ in 5.range) {
    print('waiting 500 milliseconds...');
    await Future.delayed(500.milliseconds);
  }
}

Notes

This is not an official Google project.

About

A Dart library containing convenient extension methods on basic Dart objects.

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages