{"id":16583908,"url":"https://github.com/aloisdeniel/built_vector","last_synced_at":"2025-03-21T12:33:17.213Z","repository":{"id":41474477,"uuid":"157550201","full_name":"aloisdeniel/built_vector","owner":"aloisdeniel","description":"Generate Flutter vector code from a subset of SVG files.","archived":false,"fork":false,"pushed_at":"2022-07-03T11:34:08.000Z","size":14,"stargazers_count":35,"open_issues_count":7,"forks_count":6,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-10-12T22:43:35.681Z","etag":null,"topics":["dart","flutter","shape","svg","vector"],"latest_commit_sha":null,"homepage":"","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/aloisdeniel.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-11-14T13:06:55.000Z","updated_at":"2023-11-04T09:03:20.000Z","dependencies_parsed_at":"2022-08-20T08:40:25.976Z","dependency_job_id":null,"html_url":"https://github.com/aloisdeniel/built_vector","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aloisdeniel%2Fbuilt_vector","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aloisdeniel%2Fbuilt_vector/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aloisdeniel%2Fbuilt_vector/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aloisdeniel%2Fbuilt_vector/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aloisdeniel","download_url":"https://codeload.github.com/aloisdeniel/built_vector/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221815314,"owners_count":16885160,"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","flutter","shape","svg","vector"],"created_at":"2024-10-11T22:43:29.719Z","updated_at":"2024-10-28T10:10:10.091Z","avatar_url":"https://github.com/aloisdeniel.png","language":"Dart","readme":"# built_vector\n\nGenerates Flutter vector code from minimalist SVG-like files.\n\n## Usage\n\n```sh\n\u003e pub global activate built_vector\n\u003e pub global run built_vector -i \u003cassets file path\u003e -o \u003coutput dart file\u003e\n```\n\nA class named accordingly to your assets node's name, containing a `void Paint(Canvas canvas, Size size, {Color fill})` function for each vector node.\n\nYou can then use them with a custom painter, like with the [sample/lib/vectors.dart](sample/lib/vectors.dart) `Vector` widget.\n\n## File format\n\n### Assets\n\nAn asset catalog is a collection of assets (`vector` only at the moment).\n\n```xml\n\u003cassets name=\"icons\"\u003e\n    \u003cvector ... /\u003e\n    \u003cvector ... /\u003e\n    \u003cvector ... /\u003e\n\u003c/assets\u003e\n```\n\n### Vector\n\nA vector is a collection of filled shapes.\n\nIt has several properties :\n\n* `name` **(required)** : the identifier of the vector asset\n* `viewBox` **(required)** : a box (`\u003cx\u003e \u003cy\u003e \u003cwidth\u003e \u003cheight\u003e`)that contains all the shapes.\n* `fill` : a default fill brush for shapes\n\n```xml\n\u003cvector name=\"warning\" viewBox=\"0 0 24 24\" fill=\"#231F20\"\u003e\n    \u003crect ... /\u003e\n    \u003ccircle ... /\u003e\n    \u003cpath ... /\u003e\n\u003c/vector\u003e\n```\n\n### Shape\n\nA shape is a set of instructions to build an area to fill with a brush. Currently it can be `rect`, `circle`, `path`. \n\nIt has several properties :\n\n* `fill` : a default fill brush for shapes\n* `rect` - `x`, `y`, `width`, `height` : position and size\n* `circle` - `cx`, `cy`, `r` : center coordinates and radius\n* `path` - `d` : SVG path data \n\n\n```xml\n\u003cvector name=\"warning\" viewBox=\"0 0 24 24\" fill=\"#231F20\"\u003e\n    \u003crect x=\"15\" y=\"14\" width=\"31\" height=\"28\" /\u003e\n    \u003ccircle cx=\"45.5\" cy=\"42.5\" r=\"15.5\" fill=\"#C4C4C4\" /\u003e\n    \u003cpath d=\"M12 17C12.5523 17 13 16.5523 13 16C13 15.4477 12.5523 15 12 15C11.4477 15 11 15.4477 11 16C11 16.5523 11.4477 17 12 17Z\" /\u003e\n\u003c/vector\u003e\n```\n\n## Sample\n\nTo generate the sample, execute :\n\n```sh\n\u003e pub global run built_vector -i sample/assets/icons.assets -o sample/lib/icons.g.dart\n```\n\n The [sample/assets/icons.assets](sample/assets/icons.assets) file is generated as [sample/lib/icons.g.dart](sample/lib/icons.g.dart).","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faloisdeniel%2Fbuilt_vector","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faloisdeniel%2Fbuilt_vector","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faloisdeniel%2Fbuilt_vector/lists"}