The Dart Data Class Generator is a VS Code extension that allows you to easily generate Dart data classes without writing boilerplate code. With this extension, you can create data classes for your Dart projects quickly and efficiently.
Generate data classes with ease: This extension provides a simple command that generates a new Dart data class based on the selected properties. You can customize the data class template to fit your needs. Customizable templates: You can modify the default data class template or create your own to generate classes that match your project's needs. Configurable options: You can configure the extension to generate private or public fields, as well as include or exclude getters and setters.
To use the Dart Data Class Generator extension, follow these steps:
- Install the extension from the Visual Studio Code Marketplace.
- Open the file you want to generate the data class in.
- Select the properties for the data class.
- Open the Command Palette (Ctrl+Shift+P on Windows or Cmd+Shift+P on Mac).
- Type "Generate Data Class" and select the "dcg.generateDataClass" command.
- Follow the prompts to customize the data class template and configuration.
The Dart Data Class Generator extension provides the following settings that you can configure:
- 'dcg.generatePrivateFields': A boolean value that determines whether the generated data class has private or public fields.
- 'dcg.includeGettersSetters': A boolean value that determines whether to include getters and setters in the generated data class.
To change these settings, open the VS Code settings editor (File > Preferences > Settings) and search for "Dart Data Class Generator".
Contributions to the Dart Data Class Generator extension are welcome! To contribute, please fork the repository and create a pull request.
If you find a bug or have a feature request, please open an issue on the GitHub repository.
This extension is licensed under the MIT License.