recase 3.0.0

ReCase #

Changes the case of the input text to the desire case convention.

import 'package:recase/recase.dart';

void main() {
  ReCase rc = new ReCase('Just_someSample-text');

  print(rc.camelCase); // Prints 'justSomeSampleText'
  print(rc.constantCase); // Prints 'JUST_SOME_SAMPLE_TEXT'

String extensions are also available.

import 'package:recase/recase.dart';

void main() {
  String sample = 'Just_someSample-text';

  print(sample.camelCase); // Prints 'justSomeSampleText'
  print(sample.constantCase); // Prints 'JUST_SOME_SAMPLE_TEXT'

This feature is available in version 3.0.0, and requires at least Dart 2.6


  • snake_case
  • path/case
  • param-case
  • PascalCase
  • Header-Case
  • Title Case
  • camelCase
  • Sentence case

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:

  recase: ^3.0.0

2. Install it

You can install packages from the command line:

with pub:

$ pub get

with Flutter:

$ flutter pub get

Alternatively, your editor might support pub get or flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:

import 'package:recase/recase.dart';
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
Learn more about scoring.

We analyzed this package on Mar 26, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.7.1
  • pana: 0.13.6

Health suggestions

Fix lib/recase.dart. (-4.89 points)

Analysis of lib/recase.dart reported 10 hints, including:

line 3 col 35: Unnecessary new keyword.

line 4 col 31: Unnecessary new keyword.

line 15 col 23: Unnecessary new keyword.

line 20 col 21: Unnecessary new keyword.

line 23 col 13: Unnecessary new keyword.

Maintenance issues and suggestions

Provide a file named (-20 points)

Changelog entries help developers follow the progress of your package. See the example generated by stagehand.

Maintain an example. (-10 points)

Create a short demo in the example/ directory to show how to use this package.

Common filename patterns include main.dart, example.dart, and recase.dart. Packages with multiple examples should provide example/

For more information see the pub package layout conventions.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.6.0 <3.0.0
Dev dependencies
test ^1.0.0