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

animate_gradient のカバー
パッケージ詳細v0.0.4

animate_gradient

このパッケージを使用すると、手間なくアニメーショングラデーションを作成できます。主色と補色を渡すだけで完了です。

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

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

flutter pub add animate_gradient

パッケージ概要

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

Animate Gradient は、Flutter パッケージで、アニメーション付きグラデーションの作成を簡単にします。主色と補色を指定するだけで、さまざまな UI 要素に滑らかでダイナミックなグラデーション遷移を簡単に生成できます。Android、iOS、Web、macOS、Windows、Linux など複数のプラットフォームをサポートしており、クロスプラットフォームアプリに最適です。パッケージは内部でアニメーションロジックを処理し、ボイラープレートコードを減らし、既存プロジェクトへの迅速な統合を可能にします。モダンで視覚的に魅力的なインターフェースに最適です。

用途

  • ダイナミックなアプリ背景の作成
  • スプラッシュスクリーンの強化
  • 色の遷移を使用してUI要素をアニメーション化する
  • インタラクティブなボタンの設計
  • 視覚的に魅力的なオンボーディングフローの構築

主な機能

  • シンプルな色ベースの設定
  • スムーズなグラデーションアニメーション
  • クロスプラットフォーム互換性
  • 最小限のセットアップが必要
  • 組み込みアニメーション処理

適している対象

  • Flutter ビギナー
  • UI/UXデザイナー
  • クロスプラットフォームアプリ開発者
  • 視覚的なインパクトを必要とするアプリ

注意事項

  • 色と速度以外のカスタマイズは限られている
  • 低性能デバイスでのパフォーマンスに影響を与える可能性があります
  • 複雑なグラデーションパターンには適していません

元の README

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

Animate Gradient

pub Animated-Gradient

This Package lets you make animated gradients without any hassle. Just pass the primary and secondary colors and you're done. You can do amazing effects using the alignments. For More info read the docs below.

Usage

Create your first animated gradient.

The only two required arguments are the primaryColors and secondaryColors.

| primaryColors length must greater or equal to 2.| | secondaryColors length must be equal to primaryColors length.|

    import 'package:animate_gradient/animate_gradient.dart';

     AnimateGradient(
        primaryColors: const [
          Colors.pink,
          Colors.pinkAccent,
          Colors.white,
        ],
        secondaryColors: const [
          Colors.blue,
          Colors.blueAccent,
          Colors.white,
        ],
        child: YourWidget(),
      ),
drawing
Play with alignments.

Alignments are optional. You can pass any of the following alignments.

primaryBegin primaryEnd secondaryBegin secondaryEnd

With this in place, you can have some crazy effects.

   import 'package:animate_gradient/animate_gradient.dart';

    AnimateGradient(
       primaryBegin: Alignment.topLeft,
       primaryEnd: Alignment.bottomLeft,
       secondaryBegin: Alignment.bottomLeft,
       secondaryEnd: Alignment.topRight,
       primaryColors: const [
         Colors.pink,
         Colors.pinkAccent,
         Colors.white,
       ],
       secondaryColors: const [
         Colors.white,
         Colors.blueAccent,
         Colors.blue,
       ],
       child: YourWidget(),
     ),
drawing
Alternatively! Use AlignemntGeometry for better control

With the apps built in rtl format normal Alignments cannot always work. So, you can use AlignemntGeometry instead.

primaryBegin --> primaryBeginGeometry

primaryEnd --> primaryEndGeometry

secondaryBegin --> secondaryBeginGeometry

secondaryEnd --> secondaryEndGeometry

With this, you also have an additional property textDirectionForGeometry. This will be used to resolve the AlignmentGeometry

   import 'package:animate_gradient/animate_gradient.dart';

    AnimateGradient(
      primaryBeginGeometry: const AlignmentDirectional(0, 1),
      primaryEndGeometry: const AlignmentDirectional(0, 2),
      secondaryBeginGeometry: const AlignmentDirectional(2, 0),
      secondaryEndGeometry: const AlignmentDirectional(0, -0.8),
      textDirectionForGeometry: TextDirection.rtl,
       primaryColors: const [
         Colors.pink,
         Colors.pinkAccent,
         Colors.white,
       ],
       secondaryColors: const [
         Colors.white,
         Colors.blueAccent,
         Colors.blue,
       ],
       child: YourWidget(),
     ),
drawing

Please note that AlignmentGeometry will be given more priority over Alignment

Available properties

Property Type Description
primaryColors List Starting colors of the animation.
secondaryColors List Ending colors of the animation.
primaryBegin Alignment? Starting Alignment of primaryColors.
primaryEnd Alignment? Ending Alignment of primaryColors.
secondaryBegin Alignment? Starting Alignment of secondaryColors.
secondaryEnd Alignment? Ending Alignment of secondaryColors.
primaryBeginGeometry AlignmentGeometry? Starting AlignmentGeometry of primaryColors.
primaryEndGeometry AlignmentGeometry? Ending AlignmentGeometry of primaryColors.
secondaryBeginGeometry AlignmentGeometry? Starting AlignmentGeometry of secondaryColors.
secondaryEndGeometry AlignmentGeometry? Ending AlignmentGeometry of secondaryColors.
textDirectionForGeometry TextDirection? TextDirection that will be used to resolve AlignmentGeometry
duration Duration? Duration between the transition.
controller AnimationController?
You can pass your own animation controller and use that

to control animation however you want.
animateAlignments bool? If you want to animate alignments.
reverse bool? If you want to reverse the animation.
repeat bool? If you want to repeat the animation.
curve Curve? The curve to use for the animation.
child Widget? You can pass your widget.

Author

This plugin is developed by Vikas Kumar.

カテゴリー

ソースリポジトリ

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

データはまだありません。