Search packages, repositories and app categories

Package detailsv0.1.0+2

address

Addresses internationalization library. Format various physical addresses in various languages and build localized address forms.

AndroidiOSWebmacOSWindowsLinux
30-day downloads
12
Likes
26
Pub points
160

Install package

flutter pub add address

Package Overview

Package selection guidance compiled from public package information, community data, and project usage.

The address package is a Flutter/Dart library designed for internationalization of physical addresses. It enables formatting addresses according to regional conventions across multiple languages and supports the creation of localized address input forms. Built with global usability in mind, it handles variations in address structure, such as order of street, city, and postal code, ensuring accurate representation across countries. The package integrates seamlessly into apps requiring multilingual address handling, improving user experience in international contexts.

Use cases

  • Multilingual address formatting
  • Localized form generation
  • International shipping integrations
  • Global user onboarding
  • Cross-border e-commerce
  • Travel and logistics applications

Key features

  • Supports multiple languages and regions
  • Dynamic address structure adaptation
  • Predefined templates for country-specific formats
  • Easy integration with Flutter forms
  • Extensible country configuration
  • Consistent UI across platforms

Suitable for

  • Apps targeting global audiences
  • E-commerce platforms with international delivery
  • Travel and booking services
  • User profile systems with international users
  • Government or enterprise software requiring address validation

Considerations

  • Requires manual setup for less common countries
  • Limited to predefined country templates
  • May need additional validation logic
  • Depends on correct locale configuration
  • Not optimized for real-time address autocomplete
  • Best used alongside dedicated address validation libraries

Original README

Original README snapshot from the linked source repository. Visit the repository for the latest content.

address

Pub Version GitHub test workflow status

Addresses internationalization library. Format various physical addresses in various languages and build localized address forms.

Usage

Formatting address to display

Given you have some address:

final address = Address(
  fullName: 'Nicole Martin',
  addressLine1: '123 Sherbrooke St',
  city: 'Montreal',
  zone: 'QC',
  postalCode: 'H3G 2A6',
  country: 'CA',
);

You can format it to your desired format:

final englishFormatter = AddressFormatter('en');
print(englishFormatter.formatDisplay(address));

// [
//   'NICOLE MARTIN',
//   '123 SHERBROOKE ST',
//   'MONTREAL QC  H3G 2A6',
//   'CANADA'
// ]

final frenchFormatter = AddressFormatter('fr');
print(frenchFormatter.formatDisplay(address));

// [
//   'Nicole Martin',
//   '123 Sherbrooke St',
//   'Montreal (Québec)  H2G 2A6',
//   'CANADA'
// ]

Address form layout

You can also get localized format of an address form with all obligatory and optional fields along with their labels and descriptions.

final addressFormatter = AddressFormatter('en');
final formFormat = addressFormatter.formatForm('US');

// formFormat = [
//   // other fields: full name, addressLine1, addressLine2, city
//   AddressFormFieldInformation(
//     label: 'State',
//     obligatory: true,
//     availableValues: {
//       // (...)
//       'TX': 'Texas',
//       // (...)
//     },
//   ),
//   // other fields: zip code
// ]

You can use this information to build e.g. a Flutter form. You can see how to do this by looking into the example.

Categories

Dependencies

Dependency list 1 items

Source repository

Projects using this package

No data available yet.