countries_flag 1.0.0 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.
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 and License #
Copyright © 2022 3kdveloper. Licensed under the MIT LICENSE.