{"id":28495333,"url":"https://github.com/warioddly/dimengen","last_synced_at":"2025-07-02T08:31:58.102Z","repository":{"id":296531858,"uuid":"993705031","full_name":"warioddly/dimengen","owner":"warioddly","description":"Flutter Dimensions Generator (it helps you centralize spacing and size values, improve UI consistency, and boost code readability and maintainability)","archived":false,"fork":false,"pushed_at":"2025-06-27T05:11:39.000Z","size":372,"stargazers_count":11,"open_issues_count":3,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-07-01T15:12:09.584Z","etag":null,"topics":["build-tool","dimensions","generator","metaprogramming","sizing","uikit"],"latest_commit_sha":null,"homepage":"https://pub.dev/packages/dimengen","language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/warioddly.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,"zenodo":null}},"created_at":"2025-05-31T10:44:00.000Z","updated_at":"2025-06-26T05:54:01.000Z","dependencies_parsed_at":"2025-05-31T22:57:30.195Z","dependency_job_id":"fc1fe803-fd86-435b-b0c8-4646c9cc2da0","html_url":"https://github.com/warioddly/dimengen","commit_stats":null,"previous_names":["warioddly/dimengen"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/warioddly/dimengen","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/warioddly%2Fdimengen","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/warioddly%2Fdimengen/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/warioddly%2Fdimengen/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/warioddly%2Fdimengen/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/warioddly","download_url":"https://codeload.github.com/warioddly/dimengen/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/warioddly%2Fdimengen/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263102683,"owners_count":23414152,"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":["build-tool","dimensions","generator","metaprogramming","sizing","uikit"],"created_at":"2025-06-08T11:09:59.244Z","updated_at":"2025-07-02T08:31:58.080Z","avatar_url":"https://github.com/warioddly.png","language":"Dart","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Dimengen — Flutter Dimensions Generator\n\n[![pub version](https://img.shields.io/pub/v/dimengen.svg)](https://pub.dev/packages/dimengen)\n[![license: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)\n\n**Dimengen** is a powerful code generator for Flutter that automatically creates EdgeInsets, BorderRadius, and SizedBox constants based on your predefined dimension values.\n\n\u003e It helps you centralize spacing and size values, improve UI consistency, and boost code readability and maintainability.\n\n---\n\n## Getting Started\n\nDefine your dimension constants inside an annotated class:\n\n```\nimport 'package:dimengen/dimengen.dart';\n\n@Dimengen()\nabstract final class Dimensions {\n  static const double s = 8.0;\n  static const double m = 16.0;\n  static const double l = 24.0;\n}\n```\n\nThis generates constants like:\n\n- `Insets.m` → `EdgeInsets.all(16)`\n- `Borders.sTopLeft` → `BorderRadius.only(topLeft: Radius.circular(8))`\n- `Spaces.mVertical` → `SizedBox(height: 16)`\n\nExample usage:\n\n```\nContainer(\n  padding: Insets.m,\n  margin: Insets.m,\n  decoration: BoxDecoration(\n    borderRadius: Borders.sTopLeft,\n    color: Colors.blue.shade100,\n  ),\n  child: Column(\n    children: [\n      Text('Design Dimensions'),\n      Spaces.mVertical,\n      Text('M: ${Dimensions.m}'),\n      Spaces.h(Dimensions.m),\n    ],\n  ),\n)\n```\n\n---\n\n## Modular Generation\n\nNeed only specific dimensions? Use separate annotations:\n\n| Annotation      | Generates                          |\n|----------------|-------------------------------------|\n| `@Dimengen()`  | `EdgeInsets`, `BorderRadius`, `SizedBox` (all) |\n| `@Insetgen()`  | Only `EdgeInsets` constants         |\n| `@Bordergen()` | Only `BorderRadius` constants       |\n| `@Spacegen()`  | Only `SizedBox` values (spaces)     |\n\nExample with `@Spacegen`:\n\n```\nimport 'package:dimengen/dimengen.dart';\n\npart 'spaces.g.dart';\n\n@Spacegen()\nabstract class _Spaces {\n  _Spaces._();\n\n  static const double m = 24.0;\n}\n```\n\nGenerates:\n\n```\nabstract class Spaces {\n  const Spaces._();\n\n  static const SizedBox m = SizedBox.square(dimension: 24.0);\n  static const SizedBox mVertical = SizedBox(height: 24.0);\n  static const SizedBox mHorizontal = SizedBox(width: 24.0);\n\n  static SizedBox h(double value) =\u003e SizedBox(height: value);\n  static SizedBox w(double value) =\u003e SizedBox(width: value);\n}\n```\n\n---\n\n## Customization\n\nCustomize the generated class names and control what is generated:\n\n```\n@Dimengen(\n  spacesName: 'DesignSpaces',\n  generateInsets: false,\n)\n\n// or\n\n@Spacegen(name: 'Gaps')\n```\n\n---\n\n## Installation\n\nAdd to your pubspec.yaml:\n\n```\ndart pub add dimengen\n```\n\nand `build_runner` as dev dependencies\n\n```\ndart pub add --dev build_runner\n```\n\n⸻\n\n## Code Generation\n\nBuild once:\n\n```\nflutter pub run build_runner build\n```\n\nWatch for changes:\n\n```\nflutter pub run build_runner watch\n```\n\n⸻\n\nWhy Use Dimengen?\n- 📐 Centralized dimension values\n- ♻️ Reusable and consistent UI spacing\n- ⚡ Auto-generates dozens of variants\n- 👀 Enhances code clarity and maintainability\n\n---\n\n## Contributing\n\nHave suggestions, ideas, or found a bug? Contributions are welcome!\nOpen an issue or submit a pull request — we’d love to hear from you.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwarioddly%2Fdimengen","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwarioddly%2Fdimengen","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwarioddly%2Fdimengen/lists"}