dart_extensions_methods
2.0.0, released 5 years ago by an unverified publisher
Kotlin-style extension methods for Dart types including String, bool, Iterable, and List.
What it does
Provides utility extension methods and helper classes similar to Kotlin's standard library for Dart primitive and collection types. Includes extensions for String, bool, Iterable, and List, plus global utilities like Pair, let, also, and run.
AI-written summary of version 2.0.0, based on the package's README and metadata. Report an inaccuracy
Use it when
- You want Kotlin-style scoping functions (let, also, run) in Dart.
- You need convenient extension methods on Strings, booleans, and iterables.
Skip it when
- You prefer to write your own custom extensions to keep dependencies minimal.
- You only need standard Dart collection utilities.
Strengths
- Brings familiar Kotlin utility functions and methods to Dart.
- Null safety supported in version 2.0.0.
Weaknesses
- Small feature set limited to basic types.
- No documentation on some features beyond a brief list.
Setup
- Kind
- Pure Dart
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 0
Pair<int, String> pair = Pair();
String text = "hello";
if (text.isNullOrEmpty) {
// do something
}Alternatives
Packages that do the same job and could replace dart_extensions_methods.
- string_scanner
A class for parsing strings using a sequence of patterns.
81Compare - validators2
String validation and sanitization for Dart.
83Compare - fast_immutable_collections
Fast immutable lists, sets, maps, and multimaps for Dart
91Compare - awesome_extensions
A comprehensive collection of Dart and Flutter extensions to reduce boilerplate code.
82Compare