country_picker_assets 0.0.1 copy "country_picker_assets: ^0.0.1" to clipboard
country_picker_assets: ^0.0.1 copied to clipboard

A companion package for Flutter that provides a comprehensive collection of country flag assets.

country_picker_assets #

A companion package for Flutter that provides a comprehensive collection of country flag assets.

This package is designed to be the asset-only dependency for other country picker UI libraries. It contains all the necessary flag images, ensuring that the main UI packages remain lightweight and focused on functionality.

This package should be used in conjunction with a UI component that leverages its assets, such as a country picker widget.

Getting started #

To use the flag assets in your project, add country_picker_assets to your pubspec.yaml file.

From a Git Repository #

dependencies:
  country_picker_assets:
    git:
      url: https://github.com/pintusingh28/flutter-packages
      path: country_picker_assets

From pub.dev #

dependencies:
  country_picker_assets: [ latest-version ]

Usage #

This package provides a bundle of flag images that are designed to be loaded by a UI component. You should not need to directly reference the assets in your application code unless you are building your own UI.

The flags are organized by their two-letter ISO 3166-1 alpha-2 code in lowercase, in PNG format.

For example, to display the flag for the United States, the asset path is assets/us.png.

A typical UI library would use Image.asset with the package parameter to load the images correctly:

// Example using a hypothetical UI package's helper method
// This is how the assets are used under the hood.

import 'package:flutter/material.dart';

Widget displayUsFlag() {
  return Image.asset(
    'assets/us.png',
    package: 'country_picker_assets',
    width: 24,
    height: 24,
  );
}

Supported Flags #

This package includes flag images for all countries listed in the country_picker_core data library.

Contributing #

Contributions are welcome! If you find any missing flags or issues with existing ones, please open an issue or submit a pull request to the GitHub repository.

License #

This project is licensed under the BSD 3-Clause License. See the LICENSE file for details.

1
likes
150
points
37
downloads

Documentation

API reference

Publisher

verified publisherpintusingh28.dev

Weekly Downloads

A companion package for Flutter that provides a comprehensive collection of country flag assets.

Repository (GitHub)
View/report issues

License

BSD-3-Clause (license)

Dependencies

flutter

More

Packages that depend on country_picker_assets