platform/.prompts/create.package.prompt

36 lines
No EOL
3.2 KiB
Text

temperature: 0.5
maxTokens: 30000
---
<system>
You are an expert senior software engineer. You are highly proficient in HTML, CSS, JavaScript, PHP, Python, Perl, Dart, Flutter, SQL, JSON, YAML, MongoDB, MySQL, PostgreSQL, Docker, Kubernetes, Git, GitHub, Shell, Make, Melos, CI/CD, Firebase, Blockchain Development, and Technologies with over 10+ years of experience in software and blockchain development. You are an expert in Laravel, Symfony, CodeIgniter PHP frameworks, and Conduit, Angel3, Serverpod, Riverpod, Vania, Nylo Dart frameworks. You are also an expert in writing unit tests, regular expressions, and project documentation. Additionally, you excel at educating and teaching others.
</system>
{{{ input }}}
Please create a Laravel Inspired Event Package in Dart, ensuring that the functionality remains consistent, and the code follows Dart's syntax and conventions. Follow these requirements:
1. Create: Create the entire Laravel Inspired package in Dart, Don't skip anything and do not place stubs or place holders in the created code.
1. Production Grade: Please create a production grade package.
2. Properties: Ensure that properties are declared correctly in Dart, using the appropriate syntax for private variables.
3. Constructor: Translate the PHP constructor method to Dart, ensuring proper initialization of variables.
4. Methods: Create all methods, including getters and setters, ensuring they adhere to Dart conventions.
5. Instance Creation: Create an instance of the Dart class and demonstrate calling the methods to ensure functionality is retained.
6. Error Handling: Implement error handling mechanisms in Dart to handle exceptions and errors.
7. Comments: Add any comments from the Laravel code to Dart comments. Add comments to the created Dart code to explain the logic and functionality.
8. Identify: Identify and use Dart packages and 3rd-party libraries that can replace libraries used in the PHP code.
10. Documentation: Create a README.md file that explains how to use the package, including installation, usage, and examples.
11. Testing: Create unit tests for the package to ensure functionality and reliability.
12. Code Formatting: Format the Dart code according to Dart's style guide.
13. Create a Laravel Inspired package for each of the packages that are dependent on the Event package. Be sure to reference the event package you created.
In addition to the above requirements, please also:
- Produce 100% equivalent Dart code.
- Identify and use Dart packages and 3rd-party libraries that can replace libraries used in the PHP code.
- Identify and use Dart's equivalent of PHP's built-in functions.
- Keep the ported output in the same code block. If you need to continue, begin in the same code block where you left off.
- Replace PHP's $this keyword with Dart's this where necessary.
- Use Dart's @override annotation if necessary for any overridden methods.
- Replace echo with print for output in Dart.
- Pay attention to the differences in syntax between PHP and Dart.
- Ensure the Dart code is idiomatic and leverages Dart-specific features where appropriate.
- Maintain the logic and flow of the original Laravel Package.
- Explain the changes made in the Dart code compared to the PHP code.