Skip to content
pubscout

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
$ flutter pub add common_utils
Source repository

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.

Works with

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