Allow generated files and classes to follow standard Dart conventions
Opened this issue · 1 comments
esDotDev commented
Convention in dart is that classes are PascalCase (new MyFoo()
) and their corresponding file is snake_case (my_foo.dart
), currently it's not possible to do with with the plugin.
It would be nice if there as some method to enable this, maybe a checkbox "Save class files as snake case"?
gskinner commented
Added initial support for this in f6ac07b
Needs a bit more testing, but it should be fairly robust:
input --> class name --> file name
"my class" --> MyClass --> my_class.dart
"UITester" --> UITester --> ui_tester.dart
"my-view!" --> MyView --> my_view.dart
It's enabled via a new "Normalize Names" setting, which will default to false for previously opened files, and true for new files.