More Dart 是一個實用程式套件,透過為集合操作、迭代、快取、數學運算、模式比對、排序和格式化提供便利的方法來擴展 Dart 的核心功能。它透過提供直覺且可鏈式呼叫的 API 來提升開發人員的生產力,適用於常見任務。此套件設計輕巧且易於整合,支援所有主要平台,包括 Android、iOS、Web、macOS、Windows 和 Linux。對於希望簡化重複性編碼模式並提升程式碼可讀性的開發者而言,這是一個理想的選擇。
適用情境
資料轉換管道
快取頻繁存取的資料
對集合進行數學計算
字串和格式處理
排序和篩選複雜資料
集合中的模式匹配
主要特色
擴展核心 Dart 類別,提供有用的程式方法
可鏈式呼叫且流暢的 API 設計
支援跨平台開發
輕量且無依賴
全面的實用函數
透過 pub add 輕鬆整合
適合對象
尋求增強實用函數的 Dart 開發人員
需要頻繁資料處理的專案
致力於減少樣板程式碼的團隊
針對多個平台的應用程式
專注於程式碼清晰度與可維護性的開發者
使用建議
如果擴展核心類型,可能會引入細微的行為變更
由於抽象層的存儲,不適合用於對效能要求極高的熱路徑
除了基本範例之外,文件內容有限
最好與強類型程式設計實踐結合使用
需要熟悉 Dart 擴展方法
原始 README
以下為關聯原始碼儲存庫的 README 原文快照,最新內容請造訪原始碼儲存庫。
More Dart — Literally
A collection of extensively tested extensions that make Dart a better place:
This library is open source, stable and well tested. Development happens on GitHub. Feel free to report issues or create a pull-request there. General questions are best asked on StackOverflow.
The goal of the library is to provide a loose collection of carefully curated utilities that are not provided by the Dart standard library. All features must be well tested. New features must have significant advantages over alternatives, such as code reduction, readability improvement, speed increase, memory reduction, or improved accuracy. In case of doubt, consider filing a feature request before filing a pull request.
History
This library started in April 2013 as I was working through the puzzles of Project Euler and encountered some missing features in Dart. Over time the code grew and became more useful in many other places, so I created this reusable library.
Some parts of this library are inspired by similar APIs in Google Guava (Google core libraries for Java) and Apache Commons (a repository of reusable Java components).