搜索插件、代码仓与 APP 分类

插件详情v4.8.2

more

更多 Dart — 真的。轻松收集、迭代、缓存、数学运算、匹配、排序和格式化。

AndroidiOSWebmacOSWindowsLinux
近 30 天下载
36.4万
喜欢数
86
Pub 分数
160

安装插件

flutter pub add more

插件介绍

基于插件公开信息、社区数据与项目使用情况整理的选型参考。

More Dart 是一个实用程序包,通过为集合操作、迭代、缓存、数学运算、模式匹配、排序和格式化提供便捷的方法来扩展 Dart 的核心功能。它通过提供直观且可链式调用的 API 来增强开发人员的生产力,适用于常见任务。该包设计轻量且易于集成,支持所有主要平台,包括 Android、iOS、Web、macOS、Windows 和 Linux。对于希望简化重复编码模式并提高代码可读性的开发者来说,这是一个理想的选择。

适合场景

  • 数据转换管道
  • 缓存频繁访问的数据
  • 对集合进行数学计算
  • 字符串和格式处理
  • 排序和筛选复杂数据
  • 集合中的模式匹配

主要特点

  • 扩展核心 Dart 类,提供有用的方法
  • 可链式调用且流畅的 API 设计
  • 支持跨平台开发
  • 轻量且无依赖
  • 全面的实用函数
  • 通过 pub add 轻松集成

适合对象

  • 寻求增强实用函数的 Dart 开发人员
  • 需要频繁数据处理的项目
  • 致力于减少样板代码的团队
  • 面向多平台的应用程序
  • 专注于代码清晰度和可维护性的开发者

使用建议

  • 如果扩展核心类型,可能会引入细微的行为变化
  • 由于抽象层的存在,不适合用于对性能要求极高的热路径
  • 除了基本示例外,文档有限
  • 最好与强类型编程实践结合使用
  • 需要熟悉 Dart 扩展方法

原始 README

以下为关联源码仓库的 README 原文快照,最新内容请访问源码仓库。

More Dart — Literally

Pub Package Build Status Code Coverage GitHub Issues GitHub Forks GitHub Stars GitHub License

A collection of extensively tested extensions that make Dart a better place:

Library Description
async Extensions to Stream.
cache Caching strategies and their expiry policy.
char_matcher Character classes, their composition, and operations on strings.
collection Extensions to Iterable and new collection types.
comparator Common comparators, and extensions to perform advanced operations.
diff Tools for comparing lists.
feature Information about the runtime environment.
functional Types and features known from functional programming.
graph Graph-theory objects and algorithms.
interval Continuous interval data type over a comparable type.
math Common mathematical functions.
number Number types: fraction, complex, quaternion.
printer Fluent interface to configure sophisticated formatter.
temporal Extensions to DateTime and Duration types.
tuple Tuple extension methods on generic records.

And there are more to come ...

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 package is hosted on dart packages. Up-to-date class documentation is created with every release.

Misc

Installation

Follow the installation instructions on dart packages.

Import the all-including parent package:

import 'package:more/more.dart';

Or one or more of the specific packages into your Dart code:

import 'package:more/async.dart';
import 'package:more/cache.dart';
import 'package:more/char_matcher.dart';
import 'package:more/collection.dart';
import 'package:more/comparator.dart';
import 'package:more/diff.dart';
import 'package:more/feature.dart';
import 'package:more/functional.dart';
import 'package:more/graph.dart';
import 'package:more/interval.dart';
import 'package:more/math.dart';
import 'package:more/number.dart';
import 'package:more/printer.dart';
import 'package:more/temporal.dart';
import 'package:more/tuple.dart';
Contributing

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).

License

The MIT License, see LICENSE.

所属分类

依赖

依赖清单 4 项

源码仓库

使用此插件的项目