Giter Site home page Giter Site logo

bytepark / country_icons Goto Github PK

View Code? Open in Web Editor NEW
27.0 4.0 18.0 7.08 MB

A flutter package with many country flag icons that you can use via the Image.asset method

License: BSD 2-Clause "Simplified" License

Objective-C 1.05% Dart 8.17% Kotlin 0.24% Swift 3.30% HTML 3.51% CMake 37.04% C++ 43.97% C 2.72%

country_icons's Introduction

country_icons

A dart package with many country flag icons

Getting Started

This package provides country icons as PNG and SVG to be used in dart code. You can simply access the files directly via an asset() method, or you can use the packages method getSvgFlag().

Icons as png

You can either use the PNG icons directly via new Image.asset('icons/flags/pngXXXXpx/yy.png', package: 'country_icons'); where XXXX is the size [100,250,1000] and yy is the country code.

Icons as SVG

Alternatively you can use SVG icons via new SvgPicture.asset('icons/flags/svg/xx.svg', package: 'country_icons'); For this to work you should require flutter_svg in your code directly.

dependencies:
flutter_svg: ^2.0.0

Packages Method for SVGs

You can use CountryIcons.getSvgFlag('de') for use in your code, if you do a

import 'package:country_icons/country_icons.dart';

Requests for new/updates flags

This package is simply a wrapper for the excellent flag collection of hjnilsson (see Credits below). Any requests for adding, updating or removing of flags do not make sense in this repo.

Credits

Flags are used from hjnilsson

Repo: https://github.com/hjnilsson/country-flags Homepage: http://hjnilsson.github.io/country-flags

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.