dev_string_converter 0.2.0

  • Installing
  • Versions
  • 71

##DevStringConverter 0.2.0

I wrote this package since I realised I need this for quite a few projects when hitting dynamic code generation

This package helps you to convert the format of specific strings

###Input string styles currently recognized

"Test Title", "Test word", "test Word", "table_name", 
"poly-name", "varName", "Title", "ClassName", "CONST_NAME"

###Output should be

toVarName(string) ||
"testTitle", "testWord", "testWord", "tableName", 
"polyName", "varName", "title", "className", "constName"

toClassName(string) ||
"TestTitle", "TestWord", "TestWord", "TableName", 
"PolyName", "VarName", "Title", "ClassName", "ConstName"

toPolyName(string) || 
"test-title", "test-word", "test-word", "table-name", 
"poly-name", "var-name", "title", "class-name", "const-name"

toTableName(string) ||
"test_title", "test_word", "test_word", "table_name", 
"poly_name", "var_name", "title", "class_name", "const_name"

toConstName(string) ||

###Example String polyName = toPolyName("CustomPolymerItem");

Enjoy ;)


0.2.0 -changed Dart SDK to sdk: '>=2.0.0-dev.1.2 <2.0.0'
0.1.0 -changed to top level functions
      -added testMain
      -expanded function names:
      toVarName(x)   <-> toLowerCamelCase(x)
      toClassName(x) <-> toUpperCamelCase(x)
      toConstName(x) <-> toUpperCaseWith(x,"_")
      toTableName(x) <-> toLowerCaseWith(x,"_")
      toPolyName(x)  <-> toLowerCaseWith(x,"-")

Use this package as a library

1. Depend on it

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

  dev_string_converter: "^0.2.0"

2. Install it

You can install packages from the command line:

with pub:

$ pub get

with Flutter:

$ flutter packages get

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

3. Import it

Now in your Dart code, you can use:

      import 'package:dev_string_converter/dev_string_converter.dart';
Version Uploaded Documentation Archive
0.2.0 Mar 5, 2018 Go to the documentation of dev_string_converter 0.2.0 Download dev_string_converter 0.2.0 archive
0.1.0 Jul 2, 2014 Go to the documentation of dev_string_converter 0.1.0 Download dev_string_converter 0.1.0 archive
0.0.1 Jun 29, 2014 Go to the documentation of dev_string_converter 0.0.1 Download dev_string_converter 0.0.1 archive


We analyzed this package on Jul 13, 2018, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.0.0-dev.63.0
  • pana: 0.11.3


Describes how popular the package is relative to other packages. [more]
42 / 100
Code health derived from static analysis. [more]
99 / 100
Reflects how tidy and up-to-date the package is. [more]
100 / 100
Overall score:
Weighted score of the above. [more]
Learn more about scoring.


Detected platforms: Flutter, web, other

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


  • Package is pre-v1 release.

    While there is nothing inherently wrong with versions of 0.*.*, it usually means that the author is still experimenting with the general direction API.

  • The description is too long.

    Search engines will display only the first part of the description. Try to keep it under 180 characters.

  • Maintain an example.

    Create a short demo in the example/ directory to show how to use this package. Common file name patterns include: main.dart, example.dart or you could also use dev_string_converter.dart.

  • Fix analysis and formatting issues.

    Analysis or formatting checks reported 1 hint.

    Run dartfmt to format lib/dev_string_converter.dart.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0-dev.1.2 <2.0.0