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

gradient_borders のカバー
パッケージ詳細v1.0.4

gradient_borders

入力およびコンテナ用のグラデーション枠。基本的なFlutterウィジェット(コンテナおよび入力装飾)と統合されたボーダーパッケージ。使いやすく、プラットフォームに依存しない。

AndroidiOSWebmacOSWindowsLinux
30日間ダウンロード
19.3万
いいね数
333
Pub ポイント
160

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

flutter pub add gradient_borders

パッケージ概要

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

コンテナーや入力フィールドにグラデーションボーダーを追加するFlutterパッケージで、滑らかな色の遷移により視覚的な魅力を高めます。すべての主要プラットフォーム(Android、iOS、Web、macOS、Windows、Linux)でのシンプルさと互換性を考慮して設計されています。ContainerやInputDecorationなどの標準Flutterウィジェットとシームレスに統合され、最小限のセットアップで利用可能です。複雑さなくユーザー体験を向上させる、現代的なUIデザインに最適です。

用途

  • フォーム入力にスタイリッシュな枠を追加する
  • カードまたはコンテナのビジュアルを強化する
  • アプリケーションでモダンなUI要素を作成する
  • グラデーションを使用したレスポンシブレイアウトの設計
  • ボタンまたはフィールドの境界をカスタマイズする
  • 最小限のコードでアプリの美しさを向上させる

主な機能

  • Container および InputDecoration との簡単な統合
  • スムーズなグラデーションの遷移をサポート
  • クロスプラットフォーム互換性
  • 最小限の構成が必要
  • 既存の Flutter ウィジェットと連携可能
  • 追加の依存関係は必要ありません

適している対象

  • 視覚的な向上を求めるUIデザイナー
  • 現代のモバイルまたはウェブアプリを開発する開発者
  • 洗練されたボーダー効果を必要とするプロジェクト
  • ユーザーインターフェースの仕上げに注力したアプリ
  • Flutterのデコレーションオプションを探索する初心者
  • プラットフォームに依存しないスタイルを望むチーム

注意事項

  • 多数のグラデーションボーダーを持つ低スペックデバイスでのパフォーマンスに影響する可能性があります
  • グラデーションの方向と色以外のカスタマイズは限定的です
  • 複雑な縁のパターンには向かない
  • 読みやすさのためにコントラストに注意が必要です
  • 視覚的な混雑を避けるために控えめに使用することをお勧めします
  • 一貫性を確保するために Flutter のレンダリングパイプラインに依存しています

元の README

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

Gradient borders

style: very good analysis

Various borders that use gradient instead of boring plain colors.

Usage

Box borders:

Change your container borders to use fancy gradients:

Container(
  width: 100,
  height: 100,
  decoration: BoxDecoration(
    border: const GradientBoxBorder(
      gradient: LinearGradient(colors: [Colors.blue, Colors.red]),
      width: 4,
    ),
    borderRadius: BorderRadius.circular(16)
  ),
),

Works with both: border radius, and with BoxShape.circle

Parameters
Parameter Type Default Description
gradient Gradient required The gradient to use for the border color.
width double 1.0 The width of the border.
strokeAlign double BorderSide.strokeAlignInside The alignment of the stroke relative to the border edge. Use BorderSide.strokeAlignInside (-1), BorderSide.strokeAlignCenter (0), or BorderSide.strokeAlignOutside (1).

image

Input borders

You can use GradientOutlineInputBorder as a part of your input decoration:

TextField(
  decoration: InputDecoration(
    border: GradientOutlineInputBorder(
      gradient: LinearGradient(colors: [Colors.red, Colors.blue]),
      width: 2,
    ),
    focusedBorder: GradientOutlineInputBorder(
     gradient: LinearGradient(colors: [Colors.yellow, Colors.green]),
      width: 2
    ),
    label: Text("Example"),
  ),
),
Parameters
Parameter Type Default Description
gradient Gradient required The gradient to use for the border color.
width double 1.0 The width of the border.
gapPadding double 4.0 Horizontal padding around the label cutout in the border.
borderRadius BorderRadius BorderRadius.all(Radius.circular(4)) The border radius of the rounded corners.
borderAlignment OutlineBorderAlignment OutlineBorderAlignment.onEdge Controls where the stroke is drawn relative to the widget edge. onEdge draws the border centered on the widget boundary; inside draws it fully inside.

image

You can also use GradientUnderlineInputBorder as part of your input decoration:

TextField(
  decoration: InputDecoration(
    border: GradientOutlineInputBorder(
      gradient: LinearGradient(colors: [Colors.red, Colors.blue]),
      width: 2,
    ),
    focusedBorder: GradientUnderlineInputBorder(
     gradient: LinearGradient(colors: [Colors.yellow, Colors.green]),
      width: 2
    ),
    label: Text("Example"),
  ),
),
Sponsored by

The Code Brothers

カテゴリー

ソースリポジトリ

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