FLUTTER ECOSYSTEM

google/dart-basics

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

dart-basics project cover
Stars
165
Forks
19
Last push (UTC)
Aug 1, 2026
Project status
Active
Google GitHub avatar
GITHUB Organization

Google ↗

Google ❤️ Open Source

United States of AmericaOfficial website ↗
LanguagesDart

Packages published by this repository

Dependencies used

Dependency list 3 items

Original README

English project snapshot. Visit GitHub for the latest content.

Expand / collapse project README

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.