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

outline_gradient_button のカバー
パッケージ詳細v2.0.1+1

outline_gradient_button

OutlineGradientButtonパッケージは、グラデーションアウトライン付きのボタンを作成するために開発されました。

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

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

flutter pub add outline_gradient_button

パッケージ概要

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

outline_gradient_button パッケージは、Flutter アプリケーションでグラデーションのアウトラインを持つ視覚的に魅力的なボタンを作成できるようにします。標準のボタンウィジェットを拡張し、カスタマイズ可能なグラデーションの境界線を追加することで、モダンでダイナミックなUIデザインが実現できます。機能性を損なわず、スタイリッシュで目を引くインターフェースを目指すアプリに最適です。このパッケージは、Android、iOS、Web、macOS、Windows、Linuxなどすべての主要プラットフォームをサポートしており、デバイス間での一貫した外観を保証します。pub add を使用した最小限の設定で、既存プロジェクトへのシームレスな統合が可能です。

用途

  • スタイリッシュなUI要素の作成
  • アプリの視覚的魅力を高める
  • インタラクティブなコール・トゥ・アクションボタンのデザイン
  • モダンなモバイルおよびウェブインターフェースの構築
  • フォームボタンにグラデーション効果を追加する

主な機能

  • グラデーションアウトラインスタイル
  • クロスプラットフォーム互換性
  • Flutter との簡単な統合
  • カスタマイズ可能な枠線の色と幅
  • さまざまなボタンタイプ(例:ElevatedButton、TextButton)をサポートしています
  • 軽量でパフォーマンスに優れる

適している対象

  • 視覚的な魅力を求めるUIデザイナー
  • 現代のFlutterアプリを開発する開発者
  • 勾配ベースのインタラクティブ要素を必要とするプロジェクト
  • 複数のプラットフォームをターゲットにするアプリ
  • プロトタイピングおよび本番環境対応のインターフェース

注意事項

  • 複雑なグラデーションには追加のスタイリングが必要になる場合があります
  • アウトライン効果に限定され、塗りのグラデーションは対応していません
  • 多数のボタンによるパフォーマンスへの影響
  • 可視性のために、対照的な背景色と組み合わせて使用するのが最適です

元の README

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

wow

Example

Take a look at the provided example for how to use the OutlineGradientButton.

How to use

demo_button1

OutlineGradientButton(
  child: Text('WOW'),
  gradient: LinearGradient(
    colors: [Colors.purple, Colors.pink],
    begin: Alignment.topCenter,
    end: Alignment.bottomCenter,
  ),
  strokeWidth: 4,
),

demo_button2

OutlineGradientButton(
  child: Text('TEXT'),
  gradient: LinearGradient(colors: [Colors.pink, Colors.purple]),
  strokeWidth: 4,
  radius: Radius.circular(8),
),

demo_button3

OutlineGradientButton(
  child: Text('OMG'),
  gradient: LinearGradient(
    stops: [0, 0.5, 0.5, 1],
    colors: [Colors.green, Colors.green, Colors.red, Colors.red],
  ),
  strokeWidth: 4,
  corners: Corners(topLeft: Radius.elliptical(16, 14), bottomRight: Radius.circular(6)),
),

demo_button4

OutlineGradientButton(
  child: SizedBox(
    width: 52,
    height: 52,
    child: Column(
      mainAxisSize: MainAxisSize.min,
      mainAxisAlignment: MainAxisAlignment.center,
      children: <Widget>[
        Icon(Icons.opacity, color: Colors.grey, size: 24),
        Text('TEXT', style: TextStyle(fontSize: 9)),
      ],
    ),
  ),
  gradient: LinearGradient(
    colors: [Colors.blue, Colors.black],
    begin: Alignment(-1, -1),
    end: Alignment(2, 2),
  ),
  strokeWidth: 4,
  padding: EdgeInsets.zero,
  radius: Radius.circular(26),
),

demo_button5

OutlineGradientButton(
  child: Text('Linear gradient', style: TextStyle(color: Colors.black, fontSize: 10)),
  gradient: LinearGradient(
    colors: List.generate(360, (h) => HSLColor.fromAHSL(1, h.toDouble(), 1, 0.5).toColor()),
  ),
  strokeWidth: 2,
  padding: EdgeInsets.symmetric(horizontal: 24, vertical: 12),
  radius: Radius.circular(8),
),

demo_button6

OutlineGradientButton(
  child: Text('Sweep gradient', style: TextStyle(color: Colors.black, fontSize: 10)),
  gradient: SweepGradient(
    colors: List.generate(360, (h) => HSLColor.fromAHSL(1, h.toDouble(), 1, 0.5).toColor()),
  ),
  strokeWidth: 2,
  padding: EdgeInsets.symmetric(horizontal: 24, vertical: 12),
  radius: Radius.circular(8),
),

demo_button7

OutlineGradientButton(
  child: Text('With background color and elevation', style: TextStyle(color: Colors.white, fontSize: 12)),
  gradient: LinearGradient(colors: [Colors.greenAccent, Colors.yellow]),
  strokeWidth: 2,
  padding: EdgeInsets.symmetric(horizontal: 24, vertical: 12),
  corners: Corners(topRight: Radius.circular(16), bottomRight: Radius.circular(16)),
  backgroundColor: Colors.lightBlue,
  elevation: 4,
  inkWell: true,
  onTap: () => showSnack('onTap'),
  onDoubleTap: () => showSnack('onDoubleTap'),
  onLongPress: () => showSnack('onLongPress'),
),

カテゴリー

ソースリポジトリ

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