搜尋套件、儲存庫與 APP 分類

套件詳情v3.0.0

country_icons

一個包含許多國家旗幟圖示的 Flutter 套件,您可以透過 Image.asset 方法使用它們

AndroidiOSmacOSWindowsLinux
近 30 天下載
1.4萬
喜歡數
103
Pub 分數
150

安裝套件

flutter pub add country_icons

套件介紹

根據套件公開資料產生的選型評估,僅供參考。

一個 Flutter 套件,提供一組國家旗幟圖示,可輕鬆透過 Image.asset 方法整合至應用程式中。設計簡潔高效,支援 Android、iOS、macOS、Windows 與 Linux 等多個平台。圖示以資源檔案形式提供,實現快速渲染與最小開銷。適用於需要國家視覺呈現的應用程式,例如國際化使用者介面、旅遊應用或語言選擇功能。

適用情境

  • 在使用者個人檔案中顯示國家旗幟
  • 實現語言或地區選擇
  • 增強旅行或本地化功能
  • 建立多語言應用程式介面
  • 顯示全球資料視覺化中的來源

主要特色

  • 眾多國家的預建旗幟資源
  • 透過 Image.asset 進行簡單整合
  • 跨平台相容性
  • 輕量且高效
  • 輕鬆更新新旗標

適合對象

  • 面向國際用戶的應用程式
  • 旅遊和旅遊平台
  • 語言或區域選擇組件
  • 全球數據儀表板
  • 多語言使用者介面

使用建議

  • 需要手動管理自定義旗幟的資源
  • 限制為靜態圖示集
  • 無內建動畫或互動功能
  • 取決於正確的資源路徑設定
  • 可能需要針對大型圖示集進行額外的大小優化

原始 README

以下為關聯原始碼儲存庫的 README 原文快照,最新內容請造訪原始碼儲存庫。

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

所屬分類

依賴

依賴清單 1 項

原始碼儲存庫

使用此套件的專案

暫無相關資料。