{"id":13552347,"url":"https://github.com/leancodepl/address","last_synced_at":"2025-04-11T23:24:36.926Z","repository":{"id":45889289,"uuid":"342292465","full_name":"leancodepl/address","owner":"leancodepl","description":"Addresses internationalization library. Format various physical addresses in various languages and build localized address forms.","archived":false,"fork":false,"pushed_at":"2023-08-15T15:09:05.000Z","size":115,"stargazers_count":12,"open_issues_count":4,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-25T19:16:25.482Z","etag":null,"topics":["address","dart","i18n","l10n"],"latest_commit_sha":null,"homepage":"https://pub.dev/packages/address","language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/leancodepl.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}},"created_at":"2021-02-25T15:38:01.000Z","updated_at":"2024-11-04T17:49:38.000Z","dependencies_parsed_at":"2024-01-19T07:01:41.804Z","dependency_job_id":"95c123b6-9d91-4199-bc84-002cac607c98","html_url":"https://github.com/leancodepl/address","commit_stats":{"total_commits":26,"total_committers":1,"mean_commits":26.0,"dds":0.0,"last_synced_commit":"6291425170368fffe76ebe80f7a09b70c2f207dd"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leancodepl%2Faddress","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leancodepl%2Faddress/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leancodepl%2Faddress/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leancodepl%2Faddress/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/leancodepl","download_url":"https://codeload.github.com/leancodepl/address/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248493763,"owners_count":21113315,"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":["address","dart","i18n","l10n"],"created_at":"2024-08-01T12:02:02.547Z","updated_at":"2025-04-11T23:24:36.905Z","avatar_url":"https://github.com/leancodepl.png","language":"Dart","funding_links":[],"categories":["Dart"],"sub_categories":[],"readme":"# address\n\n[![Pub Version][pub-badge]][pub-link]\n[![GitHub test workflow status][build-badge]][build-link]\n\nAddresses internationalization library. Format various physical addresses in various languages and build localized address forms.\n\n## Usage\n\n### Formatting address to display\n\nGiven you have some address:\n\n```dart\nfinal address = Address(\n  fullName: 'Nicole Martin',\n  addressLine1: '123 Sherbrooke St',\n  city: 'Montreal',\n  zone: 'QC',\n  postalCode: 'H3G 2A6',\n  country: 'CA',\n);\n```\n\nYou can format it to your desired format:\n\n```dart\nfinal englishFormatter = AddressFormatter('en');\nprint(englishFormatter.formatDisplay(address));\n\n// [\n//   'NICOLE MARTIN',\n//   '123 SHERBROOKE ST',\n//   'MONTREAL QC  H3G 2A6',\n//   'CANADA'\n// ]\n\nfinal frenchFormatter = AddressFormatter('fr');\nprint(frenchFormatter.formatDisplay(address));\n\n// [\n//   'Nicole Martin',\n//   '123 Sherbrooke St',\n//   'Montreal (Québec)  H2G 2A6',\n//   'CANADA'\n// ]\n```\n\n## Address form layout\n\nYou can also get localized format of an address form with all obligatory and optional fields along with their labels and descriptions.\n\n```dart\nfinal addressFormatter = AddressFormatter('en');\nfinal formFormat = addressFormatter.formatForm('US');\n\n// formFormat = [\n//   // other fields: full name, addressLine1, addressLine2, city\n//   AddressFormFieldInformation(\n//     label: 'State',\n//     obligatory: true,\n//     availableValues: {\n//       // (...)\n//       'TX': 'Texas',\n//       // (...)\n//     },\n//   ),\n//   // other fields: zip code\n// ]\n```\n\nYou can use this information to build e.g. a Flutter form. You can see how to do this by looking into the [example][example].\n\n[pub-link]: https://pub.dev/packages/address\n[pub-badge]: https://img.shields.io/pub/v/address\n[build-link]: https://github.com/leancodepl/address/actions/workflows/test.yml\n[build-badge]: https://img.shields.io/github/actions/workflow/status/leancodepl/address/test.yml?branch=main\n[example]: example\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleancodepl%2Faddress","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fleancodepl%2Faddress","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleancodepl%2Faddress/lists"}