パッケージ、リポジトリ、アプリカテゴリを検索

パッケージ詳細v0.1.1

dash_flags

国および言語の国旗を表示するためのパッケージで、ウィジェットと列挙型のセットを提供します

AndroidiOSWebmacOSWindowsLinux
30日間ダウンロード
2440
いいね数
72
Pub ポイント
160

パッケージをインストール

flutter pub add dash_flags

パッケージ概要

公開情報に基づく選定ガイドです。参考としてご利用ください。

dash_flags は、国や言語の国旗を表示するためのウィジェットと列挙型のコレクションを提供するFlutterパッケージです。複数のプラットフォームにわたって一貫した、事前に定義された国旗表現を提供することで、アプリケーションへの国旗アイコンの統合を簡素化します。このパッケージはAndroid、iOS、Web、macOS、Windows、Linuxなど、多数のプラットフォームをサポートしており、広範な互換性を確保しています。開発者は直感的な列挙型を使用して、簡単に国旗を選択して表示でき、ローカライゼーション、ユーザーインターフェースの改善、地域ベースの機能に最適です。

用途

  • ユーザーのプロフィールに国際旗を表示する
  • 言語選択インターフェースの実装
  • ローカリゼーションUIの強化
  • アプリで地域インジケーターを表示する
  • マルチリンガルアプリインターフェースの作成

主な機能

  • 事前構築されたフラッグウィジェット
  • 国および言語の国旗のサポート
  • プラットフォームに依存しない設計
  • 直感的な列挙型ベースのフラグ選択
  • 軽量で統合が簡単

適している対象

  • ローカリゼーション機能
  • マルチリンガルアプリケーション
  • ユーザープロフィールのカスタマイズ
  • 地域ベースのコンテンツフィルタリング
  • 視覚的ヒントによるUI/UXの向上

注意事項

  • 事前に定義されたフラグセットに限定
  • カスタムフラグのサポートなし
  • 外部のフラグアセットに依存
  • 新しい国・言語コード用の更新が必要になる可能性があります
  • スケールでの高性能フラッグレンダリングに最適化されていません

元の README

関連するソースリポジトリの README 原文のスナップショットです。最新の内容はリポジトリをご覧ください。

Dash Flags Banner

Dash Flags

Platform Pub Package License: BSD-3-Clause
GitHub code size in bytes Star on GitHub GitHub Open Issues GitHub Last Commit Date


💡 Overview

A Flutter package for displaying Countries and Languages flags 🌍

This package provides a set of widgets and enums to display flags of countries and languages inspired by blade-flags package for Laravel by Mohamed Ashraf from Egypt.

The package uses flags from TwEmoji Countries & Languages Flags by Twitter

Animated Example
This GIF is taken from the Example Project

💻 Usage

Import the package:

import 'package:dash_flags/dash_flags.dart';

Display a flag of a country:

CountryFlag(
  country: Country.eg, // OR Country.fromCode('eg')
  height: 50,
)

Display a flag of a language:

LanguageFlag(
  language: Language.ar, // OR Language.fromCode('ar')
  height: 50,
)

Display a flag of a timezone:

TimezoneFlag(
  timezone: Timezone.africa_cairo, // OR Timezone.fromString('Africa/Cairo')
  height: 50,
)

📘 You can checkout the complete API Reference here

📃 Notes

Countries & Languages Codes:
  • If you have the Country Code or Language Code as Strings, then you can use Country.fromCode(countryCode) or Language.fromCode(languageCode).
  • If the the Country Code or Language Code consists of more than one part, then you will find it separated by an underscore, for example: sh_ac and en_au.
  • If the the Country Code or Language Code is a reserved keyword in Dart, then you will find it prefixed with c_ or l_ respectively, for example: c_as and l_as.
  • If an unknown Country Code or Language Code used with .fromCode(String) method, an unknown flag would be displayed.
Timezones Codes:
  • The forward slash sign / in the name of the timezone is replaced with an underscore _.
  • If the Timezone contains minus - sign, then you will find it replaced with _minus_, for example: US_East_minus_Indiana, US_Indiana_minus_Starke, and Asia_Ust_minus_Nera
  • If the Timezone contains plus + sign, then you will find it replaced _plus_, for example: Etc_GMT_plus_0, Etc_GMT_plus_1, and Etc_GMT_plus_10
  • If the Timezone is associated with more than one country, then you will find a default enum member for it and other enum members for each country, for example: Africa_Johannesburg, Africa_Johannesburg_ZA, Africa_Johannesburg_LS, and Africa_Johannesburg_SZ
  • If you have the Timezone as String and you want to get the corresponding Timezone enum member, then you can use .fromString() method.
  • If you want to use the Timezone with its original name without the above changes, then use .fromString() method, for example: Timezone.fromString('Africa/Cairo')

✅ Roadmap

  • [ ] Add Tests 🧪
  • [ ] Add a simple way to use the raw svg assets 🎨
  • [ ] Make an online Gallery with all the available flags 📘
  • [ ] Add the ability to use the flags from the internet, such as, CountryFlag.network(...) 🌐
  • [ ] Add the ability to automatically detect the current Country or Language, such as, Country.autoDetect & Language.autoDetect 🕵🏻‍♂️

💖 Laravel Version

If you are looking for a Laravel Version of this package, check blade-flags, the original parent package of this library which that provides a set of flags for all countries and languages by Mohamed Ashraf from Egypt.

Blade Flags Banner

💪🏻 Contribution Guide

I would be happy to have your contributions 💙

If you find a bug or want a feature, but don't know how to fix/implement it, please fill an Issue.
If you fixed a bug or implemented a feature, please send a Pull Request.

Made with contrib.rocks.

カテゴリー

依存関係

依存関係一覧 1 件

ソースリポジトリ

このパッケージを使用しているプロジェクト