common_utils
2.1.0, released 5 years ago by an unverified publisher
Dart common utility library containing date, regex, timer, currency, and object helpers.
WASM-ready
What it does
Provides a suite of utility classes for common Dart operations including DateUtil, EncryptUtil, JsonUtil, LogUtil, MoneyUtil, NumUtil, ObjectUtil, RegexUtil, TextUtil, TimelineUtil, and TimerUtil.
AI-written summary of version 2.1.0, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need standard utility functions for dates, strings, regex, and math without writing them manually
- You want to perform precise decimal arithmetic to prevent precision loss
Skip it when
- You only need a single lightweight helper function and want to avoid importing a large utility package
- You need Flutter-specific utilities like SharedPreferences or screen adaptation (which are in the separate flustars package)
Strengths
- Comprehensive collection of common helper tools in one place
- Includes precise number and money calculations to avoid precision issues
Weaknesses
- Changelog entries lack detailed descriptions, listing only generic TODOs
- Monolithic utility library rather than modular packages
Setup
- Kind
- Pure Dart
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 4
String phoneNo = TextUtil.formatSpace4("15845678910");
String num = TextUtil.formatComma3("1234");
String masked = TextUtil.hideNumber("15845678910");Alternatives
Packages that do the same job and could replace common_utils.
- basic_utils
Common utility classes for Strings, Dates, X509, PKCS, Cryptography and HTTP requests.
57Compare
Works with
Packages commonly used together with common_utils: ones it builds on, ones built on it, and its own family.
- cryptocommon_utils depends on itProvides SHA, MD5, and HMAC hashing functions for Dart.
- convertcommon_utils depends on itEncoders and decoders for converting between different data representations.
- decimalcommon_utils depends on itArbitrary-precision decimal arithmetic for Dart
- rationalcommon_utils depends on itAllows you to deal with rational numbers in Dart.
- flustarsBuilt on common_utilsFlutter common utilities for SharedPreferences, screen adaptation, directories, and widgets.
- flustars_flutter3Built on common_utilsA collection of utility classes for SharedPreferences, screen adaptation, widgets, and directories.