{"id":15022128,"url":"https://github.com/insign/dart_yaml2dart","last_synced_at":"2025-10-19T03:38:18.101Z","repository":{"id":65973580,"uuid":"603779377","full_name":"insign/dart_yaml2dart","owner":"insign","description":"Converts a YAML file to a Dart file containing global scope constants. It allows developers to easily use YAML data in their Dart projects by generating a separate file with all the YAML data as constants. Especially good for pubspec.yaml.","archived":false,"fork":false,"pushed_at":"2023-11-20T09:54:08.000Z","size":10,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-12T06:17:16.573Z","etag":null,"topics":["dart","pubspec","yaml","yml"],"latest_commit_sha":null,"homepage":"https://pub.dev/packages/yaml2dart","language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/insign.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-02-19T14:56:50.000Z","updated_at":"2024-10-03T02:05:02.000Z","dependencies_parsed_at":"2024-09-15T15:21:08.459Z","dependency_job_id":null,"html_url":"https://github.com/insign/dart_yaml2dart","commit_stats":{"total_commits":6,"total_committers":1,"mean_commits":6.0,"dds":0.0,"last_synced_commit":"f542c6827b36f8f4270a229390e8c8a2e0f09ecf"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/insign%2Fdart_yaml2dart","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/insign%2Fdart_yaml2dart/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/insign%2Fdart_yaml2dart/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/insign%2Fdart_yaml2dart/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/insign","download_url":"https://codeload.github.com/insign/dart_yaml2dart/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248525141,"owners_count":21118620,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dart","pubspec","yaml","yml"],"created_at":"2024-09-24T19:57:29.985Z","updated_at":"2025-10-19T03:38:13.052Z","avatar_url":"https://github.com/insign.png","language":"Dart","funding_links":[],"categories":[],"sub_categories":[],"readme":"# yaml2dart\n\nConverts a YAML file to a Dart file containing global scope constants. It allows developers to easily use YAML data in their Dart projects by generating a separate file with all the YAML data as constants. Especially good for `pubspec.yaml`.\n\n## Getting started\n\n```dart\ndart pub add yaml2dart\n```\n\n## Usage\n\nAssuming that the `example.yaml` file contains the following:\n\n```yaml\nname: \"My Project\"\nversion: \"1.0.0\"\n```\n\nThe code is:\n\n```dart\nimport 'package:yaml2dart/yaml2dart.dart';\n\nvoid main() async {\n  // Create a converter instance with the input and output file paths.\n  final converter = Yaml2Dart('pub.yaml', 'lib/example_constants.dart');\n\n  // Convert the YAML to Dart.\n  await converter.convert();\n}\n```\n\nThe `example_constants.dart` file will be generated with the following content:\n\n```dart\nconst exampleName = 'My Project';\nconst exampleVersion = '1.0.0';\n```\n\nTo test:\n\n```dart\n  // Use the generated constants in your project.\n  import 'package:my_project/example_constants.dart';\n\n  print('Example name: $exampleName');\n  print('Example version: $exampleVersion');\n```\n\n## LICENSE\n\n[BSD 3-Clause License](./LICENSE)\n\n## CONTRIBUTE\n\nIf you have an idea for a new feature or have found a bug, just do a pull request (PR).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finsign%2Fdart_yaml2dart","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Finsign%2Fdart_yaml2dart","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finsign%2Fdart_yaml2dart/lists"}