xd-to-flutter-plugin
xd-to-flutter-plugin copied to clipboard
Allow generated files and classes to follow standard Dart conventions
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"?
Added initial support for this in f6ac07bb5ed80d87e512685a443ab5664692bc8e
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.