countries_flag 1.0.0 copy "countries_flag: ^1.0.0" to clipboard
countries_flag: ^1.0.0 copied to clipboard

250+ flags to use in you dream project, with just a single line of code.

Why Countries Flag? #

A Flutter package to show a SVG image of the flag of a country. Countries Flag provides more then 250+ countries flags in one place. It provides you easy way to add country flags in your project.

💻 Usage #

To use this library in your code:

  • add a dependency in your pubspec.yaml :

    dependencies:
      countries_flag:
    
  • add import in your dart code:

    import 'package:countries_flag/countries_flag.dart';
    

Display a flag of a country:


CountriesFlag(Flags.pakistan,
width: 50,
height: 100,
fit: BoxFit.cover,
alignment: Alignment.center,
),

💡 Overview #

The following example illustrates how to use flag icons.

Flag Demo Screen

How to use #


CountriesFlag(Flags.pakistan, width: 50,height: 100,fit: BoxFit.cover,alignment: Alignment.center),
CountriesFlag(Flags.indonesia, width: 50,height: 100,fit: BoxFit.cover,alignment: Alignment.center),
CountriesFlag(Flags.india, width: 50,height: 100,fit: BoxFit.cover,alignment: Alignment.center),
CountriesFlag(Flags.afghanistan, width: 50,height: 100,fit: BoxFit.cover,alignment: Alignment.center),
CountriesFlag(Flags.bangladesh, width: 50,height: 100,fit: BoxFit.cover,alignment: Alignment.center),

The flag icons pack includes the following properties.

Property Type
key: key
flagName: String
width: double
height: double
fit: BoxFit
alignment: AlignmentGeometry
matchTextDirection: bool
allowDrawingOutsideViewBox: bool
placeholderBuilder: Widget
colorBlendMode: BlendMode
colorFilter: ColorFilter
semanticsLabel: String
excludeFromSemantics: bool
clipBehavior: Clip
theme: SvgTheme

Credits #

Thanks to the amazing project flutter-svg

💪🏻 Contribution Guide #

I would be happy to have your contributions 💙

You are welcome to open a ticket on github if any problems arise. New ideas are always welcome.
If you fixed a bug or implemented a feature, please send a Pull Request.

Contributors #

Made with contrib.rocks.

Copyright © 2022 3kdveloper. Licensed under the MIT LICENSE.

20
likes
150
pub points
84%
popularity

Publisher

verified publisherby3kdeveloper.blogspot.com

250+ flags to use in you dream project, with just a single line of code.

Homepage
Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter, flutter_svg

More

Packages that depend on countries_flag