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

icon_decoration のカバー
パッケージ詳細v2.1.0

icon_decoration

ボーダーとグラデーションを使用して、Icon ウィジェットに装飾機能を追加します。

AndroidiOSWebmacOSWindowsLinux
30日間ダウンロード
2760
いいね数
97
Pub ポイント
150

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

flutter pub add icon_decoration

パッケージ概要

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

IconDecoration は、ボーダーやグラデーションなどの装飾機能を有効にすることで、Icon ウィジェットを強化し、Flutter アプリケーションにおけるより視覚的に魅力的なアイコンを可能にします。標準の Icon ウィジェットをカスタマイズ可能なスタイルオプションで拡張し、複雑なカスタムペイントなしで高度なビジュアルエフェクトを簡単に適用できます。洗練されたUI要素を必要とするアプリに最適で、モバイル、Web、デスクトップを含むすべての主要プラットフォームをサポートしています。

用途

  • アイコンにスタイル付きの枠を追加する
  • アイコンにグラデーションフィルを適用する
  • 視覚的に豊かなアイコングラフィーの作成
  • プラットフォーム間でのUIの一貫性の向上
  • インタラクティブなアイコン状態の設計

主な機能

  • アイコンの枠線カスタマイズ
  • アイコンへのグラデーション対応
  • 既存の Icon ウィジェットとの簡単な統合
  • クロスプラットフォーム互換性
  • 軽量でパフォーマンスに優れる

適している対象

  • 視覚的な洗練を求めるUIデザイナー
  • ブランドインターフェースを構築する開発者
  • アイコン中心のナビゲーションを持つアプリ
  • 一貫したアイコンスタイルを必要とするプロジェクト
  • マルチプラットフォームアプリ用にFlutterを使用するチーム

注意事項

  • 基本的な装飾機能に限定
  • 複雑な効果には追加のスタイル設定が必要になる場合があります
  • 非常に動的なアイコンアニメーションには適していません
  • Flutter のレンダリングパフォーマンスに依存しています
  • 静的または準静的なアイコンデザインと併用するのが最適です

元の README

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

icon_decoration

Pub Version Test workflow Coverage Status

Add decoration capabilities to the Icon widget with borders and gradients. This new DecoratedIcon widget overlap itself with the base Icon widget to provide a more complete decoration system through a IconDecoration property.

Table of contents

Add to your project

Add dependency to your pubspec.yaml
icon_decoration: any
Import the package
import 'package:icon_decoration/icon_decoration.dart';

How to use

Add borders to icons
DecoratedIcon(
    icon: Icon(Icons.favorite, color: Colors.green),
    decoration: IconDecoration(border: IconBorder()),
)
Add gradients to icons

Gradients are supported on Flutter Web only with the canvaskit renderer

DecoratedIcon(
    icon: Icon(Icons.all_inbox),
    decoration: IconDecoration(
        gradient: rainbowGradient,
    ),
)
Mix them all together
DecoratedIcon(
    icon: Icon(
        Icons.all_inbox,
        shadows: [
            Shadow(
                color: Colors.red,
                blurRadius: 3,
                offset: Offset(0, 2),
            ),
        ],
    ),
    decoration: IconDecoration(
        gradient: _rainbowGradient,
        border: IconBorder(),
    ),
)

Migration Guide

v2.0.0
  • Removed IconDecoration.shadows, use Icon.shadows instead.

Before

DecoratedIcon(
    icon: Icon(Icons.all_inbox),
    decoration: IconDecoration(
        shadows: [
            Shadow(
                color: Colors.red,
                blurRadius: 3,
                offset: Offset(0, 2),
            ),
        ],
    ),
)

After

Icon(
    Icons.all_inbox,
    shadows: [
        Shadow(
            color: Colors.red,
            blurRadius: 3,
            offset: Offset(0, 2),
        ),
    ],
),

カテゴリー

ソースリポジトリ

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