Skip to content
pubscout

dart_extensions

2.2.4, released 3 years ago by an unverified publisher

A set of method extensions for Dart and Flutter making framework use easier.

WASM-ready
$ flutter pub add dart_extensions
Source repository

What it does

Provides a large collection of method extensions for common Dart types like String, int, and Iterable, as well as Flutter widgets, contexts, and HTTP requests. It simplifies responsive UI development, list manipulation, and data formatting.

AI-written summary of version 2.2.4, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You want concise syntax for common Dart operations like filtering, grouping, and string manipulation
  • You want to reduce boilerplate when styling widgets or querying MediaQuery via context
  • You need basic HTTP helper extensions on strings

Skip it when

  • You prefer keeping your code free of global or wide-reaching method extensions that pollute namespace
  • You require a fully-featured robust networking library like Dio instead of basic string HTTP extensions

Strengths

  • Comprehensive collection of utility extensions for standard types and Flutter widgets
  • Includes responsive UI and sliver extensions
  • High test coverage reported

Weaknesses

  • Monolithic extension package covering many unrelated domains (networking, widgets, iterables)
  • Can pollute auto-complete suggestions with numerous extensions

Setup

Kind
Flutter widgets
Effort
Low
Code generation
No
Direct dependencies
3

Just add the dependency to pubspec.yaml and import where needed.

final users = [User(22, "Kasey"), User(23, "Jadn")];
users.any((u) => u.name == 'Kasey'); // true

context.widthPx;

Alternatives

Packages that do the same job and could replace dart_extensions.

Works with

Packages commonly used together with dart_extensions: ones it builds on, ones built on it, and its own family.