Skip to content
pubscout

recase

4.1.0, released 4 years ago by an unverified publisher

Changes the case of input text to various conventions.

WASM-ready
$ flutter pub add recase
Source repository

What it does

It transforms strings between different casing formats like camelCase, snake_case, PascalCase, and constantCase. Both class-based and String extension APIs are supported.

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

Use it when

  • You need to format strings into snake_case, camelCase, or other standard conventions.
  • You are transforming user input or API responses into consistent naming styles.

Skip it when

  • You need complex internationalization or localization tools.

Strengths

  • Supports a wide variety of case conventions.
  • Provides convenient String extensions.
  • Zero dependencies.

Weaknesses

  • Limited scope restricted strictly to string casing transformations.

Setup

Kind
Pure Dart
Effort
Low
Code generation
No
Direct dependencies
0
import 'package:recase/recase.dart';

void main() {
  String sample = 'Just_someSample-text';
  print(sample.camelCase);
  print(sample.constantCase);
}

Alternatives

Packages that do the same job and could replace recase.

Works with

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