FLUTTER ECOSYSTEM

google/dart-basics

一個 Dart 庫,包含對基本 Dart 物件的便利擴展方法。

dart-basics 專案封面
Stars
165
Forks
19
最近推送(UTC)
2026年8月1日
專案狀態
未封存
Google GitHub avatar
GITHUB Organization

Google ↗

Google ❤️ Open Source

United States of America官方網站 ↗
語言Dart

此儲存庫發佈的套件

使用的依賴

依賴清單 3 項

原始 README

以下為英文專案原文快照,最新內容請造訪 GitHub。

展開 / 收合專案 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.