xyz_gen 0.35.0
xyz_gen: ^0.35.0 copied to clipboard
A package designed to generate boilerplate code, reducing the amount of repetitive code you need to write.
XYZ Gen #
xyz_gen is a Dart package designed to generate boilerplate code, reducing the amount of repetitive code you need to write.
It comes with a set of generators that can be used as-is, or modified to suit your needs. You can also create your own generators by cloning repository here and modifying the existing generators.
Included Generators #
generate_exports.dart #
Looks through a folder for all Dart files and creates an exports file that includes them all, simplifying your project.
generate_license_headers.dart #
Adds license headers to your files, helping to protect your work.
generate_makeups.dart #
Generates Makeups for widgets, giving them extra styles or features with ease.
generate_models.dart #
Creates model classes from class annotations, handling types better than `json_serializable``.
generate_preps.dart #
Inserts helpful information like line numbers and file names to keep things organized.
generate_screen.dart (for XYZ configured apps only) #
Creates Screens for your app, including the boilerplate code needed to get them up and running.
generate_screen_access.dart (for XYZ configured apps only) #
Connects your Screens to the navigator.
generate_configurations.dart (for XYZ configured apps only) #
Generates code to connect your Screens to your app.
Getting Started #
Installation #
- Add this to your package's
pubspec.yamlfile:
dependencies:
xyz_gen: any
- Download the generator scripts here https://github.com/robmllze/xyz_gen/raw/main/___generators.zip and extract them to your project's root directory.
- Modify the generators as needed. You may also wish to change the generator templates to suit your needs.
- If you're using VS Code, you can right-click one of the generators, such as
generate_exports.dart, and select "Run Code". - If you're using another IDE, you can run the generators from the command line, e.g.
dart generate_exports.dart.
Contributing #
Contributions to XYZ Gen are welcome.
License #
This package is released under the MIT License.
Contact #
Author: Robert Mollentze
Email: robmllze@gmail.com
For more information, questions, or feedback, feel free to contact me.