recase 2.0.1

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'
}

Supports:

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

Use this package as a library

1. Depend on it

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


dependencies:
  recase: ^2.0.1

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';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
93
Health:
Code health derived from static analysis. [more]
98
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
70
Overall:
Weighted score of the above. [more]
90
Learn more about scoring.

We analyzed this package on Oct 16, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.5.1
  • pana: 0.12.21

Platforms

Detected platforms: Flutter, web, other

No platform restriction found in primary library package:recase/recase.dart.

Health suggestions

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

Analysis of lib/recase.dart reported 5 hints:

line 74 col 41: Use = to separate a named parameter from its default value.

line 81 col 44: Use = to separate a named parameter from its default value.

line 87 col 42: Use = to separate a named parameter from its default value.

line 93 col 44: Use = to separate a named parameter from its default value.

line 100 col 41: Use = to separate a named parameter from its default value.

Maintenance issues and suggestions

Provide a file named CHANGELOG.md. (-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/README.md.

For more information see the pub package layout conventions.

Dependencies

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