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

GitHub リポジトリTesteurManiak/icon_decoration

アイコン装飾

Icon ウィジェットに影、ボーダー、グラデーションなどの装飾機能を追加します。

アイコン装飾 のプロジェクト画像
スター
25
フォーク
3
最終プッシュ(UTC)
2026/02/03
プロジェクト状態
公開中

元の README

以下は英語原文のスナップショットです。最新版は GitHub をご覧ください。

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),
        ),
    ],
),
Guillaume Roux GitHub avatar
GitHub 作者

Guillaume Roux ↗

Flutter Software Engineer, co-organizer of Flutter Lyon

Veson NauticalLyon, France公式サイト ↗
言語DartHTML

カテゴリー

このリポジトリが公開するパッケージ

使用している依存関係

依存関係一覧 5 件

  • flutter{"sdk":"flutter"}
  • alchemist開発用{"git":{"url":"https://github.com/Betterment/alchemist.git","ref":"ab1f2eb49584339be119eaec28a5562f6b325cbc"}}
  • fd_lints開発用^2.3.0
  • flutter_test開発用{"sdk":"flutter"}
  • meta開発用^1.15.0

プロジェクトに合うリポジトリを選ぶには?

用途で絞り込み、開発状況を比較し、採用前に元のリポジトリで要件を確認しましょう。

  1. 名前・作者・説明で検索し、技術トピックで絞り込みます。
  2. スター、フォーク、最近のプッシュを比較します。スターは関心の目安であり、品質の保証ではありません。
  3. 利用前に GitHub で README、ライセンス、Issues を確認します。

情報源と管理

“A repository is the most basic element of GitHub.”

GitHub Docs — About repositories ↗