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

dynamic_background のカバー
パッケージ詳細v0.6.0

dynamic_background

開発者がFlutterアプリ用のアニメーション背景を作成できるようにします。

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

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

flutter pub add dynamic_background

パッケージ概要

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

dynamic_background パッケージは、Flutter開発者がアプリケーションに滑らかでアニメーションされた背景を簡単に実装できるようにします。グラデーションアニメーション、シェーダー基準のビジュアル、カスタマイズ可能な動きパターンなど、さまざまな視覚効果をサポートしています。クロスプラットフォーム対応として設計されており、Android、iOS、Web、macOS、Windows、Linuxでスムーズに動作します。シンプルな pub add コマンドで既存のFlutterプロジェクトに簡単に統合でき、アニメーション速度、方向、色の遷移を微調整できる柔軟なAPIを提供します。重いパフォーマンスオーバーヘッドなしにアプリの美しさを高めるのに最適です。

用途

  • 没入型スプラッシュスクリーンの作成
  • オンボーディング体験の向上
  • ダッシュボードに視覚的な魅力を加える
  • モーションによるユーザー参加の向上
  • テーマ付きアプリインターフェースの設計

主な機能

  • アニメーショングラデーション背景
  • シェーダーに基づくビジュアルエフェクト
  • カスタマイズ可能なアニメーション速度と方向
  • クロスプラットフォーム互換性
  • 軽量でパフォーマンスに優れる
  • pub.dev を通じた簡単な統合

適している対象

  • 動的なビジュアルを求めるUIデザイナー
  • 魅力的なオンボーディングフローを構築する開発者
  • 現代的でアニメーション付きのバックドロップを必要とするアプリ
  • 複数のプラットフォームをターゲットにするプロジェクト
  • クリエイティブまたはライフスタイルアプリケーション開発

注意事項

  • 低性能デバイスでのパフォーマンスに影響を与える可能性があります
  • 最適なフレームレートを得るためには注意深い調整が必要です
  • 提供されたパラメータを超えるカスタマイズは限定的
  • 最小限の前面コンテンツと併用するのが最適です
  • 静的またはミニマリストデザインには推奨されません

元の README

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

Dynamic Background

A blue and black logo for Dynamic BG

Dynamic Background is a Flutter package that transforms your app's background into a captivating canvas of animated elements. Whether you prefer sleek stripes, mesmerizing gradients, or playful shapes, Dynamic Background provides an easy-to-use solution to breathe life into your UI. This versatile package offers customizable options to suit any design aesthetic, effortlessly elevating your app's visual appeal. Take your Flutter development to the next level with Dynamic Background – where stunning visuals meet effortless implementation for an immersive and visually striking app interface.

Four examples of different animated backgrounds. Four examples of different animated backgrounds. Four examples of different animated backgrounds.

Installation

In the pubspec.yaml of your project, add the following dependency:

dependencies:
  dynamic_background: ^0.5.0

Import it to each file you use it in:

import 'package:dynamic_background/dynamic_background.dart';

Usage

Example 1 - Simple circles scrolling

This example shows how to set up an animated background that shows blue circles scrolling from right to left on a pale blue background.

Note: The colors being used are provided with this package.

DynamicBg(
  painterData: ScrollerPainterData(
    shape: ScrollerShape.circles,
    backgroundColor: ColorSchemes.gentleBlueBg,
    color: ColorSchemes.gentleBlueFg,
    shapeOffset: ScrollerShapeOffset.shiftAndMesh,
  ),
  child: yourPageHere(),
),
Example 2 - Simple blue fader

This example shows how to set up an animated background that fades gently and randomly between different shades of blue.

Note: The colors being used are provided with this package.

DynamicBg(
  painterData: FaderPainterData(
    behavior: FaderBehavior.random,
    colors: ColorSchemes.gentleBlue,
  ),
  child: yourPageHere(),
),
Example 3 - Simple wave

This example shows how to set up an animated background with a blue, sine wave line in the middle of the screen.

Note: The colors being used are provided with this package.

DynamicBg(
  duration: const Duration(seconds: 5),
  painterData: WavePainterData(
    waves: [
      Wave(
        direction: WaveDirection.left2Right,
        amplitude: 50.0,
        offset: 0.5,
        color: Colors.transparent,
        lineColor: ColorSchemes.gentleBlueBg,
        lineThickness: 3.0,
      ),
    ],
  ),
  child: yourPageHere(),
),
Example 4 - Simple Lava Lamp

This example shows how to set up an animated background with moving circles to have a lava lamp effect.

Note: The colors being used are provided with this package.

DynamicBg(
  duration: const Duration(seconds: 35),
  painterData: LavaPainterData(
    width: 250.0,
    widthTolerance: 75.0,
    growAndShrink: true,
    growthRate: 10.0,
    growthRateTolerance: 5.0,
    blurLevel: 25.0,
    numBlobs: 5,
    backgroundColor: ColorSchemes.gentleWhiteBg,
    colors: [
      ColorSchemes.vibrantOrangeBg,
      ColorSchemes.vibrantOrangeFg,
      ColorSchemes.vibrantYellowBg,
      ColorSchemes.vibrantYellowFg,
    ],
    allSameColor: false,
    fadeBetweenColors: true,
    changeColorsTogether: false,
    speed: 20.0,
    speedTolerance: 5.0,
  ),
  child: yourPageHere(),
),
Example 5 - Prebuilt backgrounds

This example shows how to use prebuilt backgrounds.

This example also show the use of a custom duration. The prebuilt backgrounds give suggestions in their comments on how best to use them; this includes duration and platform brightness.

DynamicBg(
  duration: const Duration(seconds: 45),
  painterData: PrebuiltPainters.chocolate,
  child: yourPageHere(),
),
Example 6 - Modify prebuilt backgrounds

This example shows how to modify prebuilt backgrounds to best fit your needs.

The copyWith method can also be used on your own custom backgrounds.

DynamicBg(
  duration: const Duration(seconds: 45),
  painterData: PrebuiltPainters.chocolate.copyWith(
    backgroundColor: ColorSchemes.gentleYellowBg,
  ),
  child: yourPageHere(),
),
Example 7 - Stack backgrounds

This example shows how to stack backgrounds for interesting new effects.

DynamicBg(
  painterData: ScrollerPainterData(
    direction: ScrollDirection.left2Right,
    backgroundColor: ColorSchemes.gentleWhiteBg,
    color: ColorSchemes.gentleBlackFg,
    shapeOffset: ScrollerShapeOffset.shiftAndMesh,
  ),
  child: DynamicBg(
    duration: const Duration(seconds: 45),
    painterData: ScrollerPainterData(
      backgroundColor: Colors.transparent,
      color: ColorSchemes.vibrantBlackFg,
      shapeWidth: 28.0,
      spaceBetweenShapes: 55.0,
      shapeOffset: ScrollerShapeOffset.shiftAndMesh,
    ),
    child: yourPageHere(),
  ),
),
Example 8 - Backgrounds for smaller widgets

This example shows that you can apply dynamic backgrounds to widgets rather than the entire screen. Here is a button with an animated background.

final double buttonWidth = 500.0;
final double buttonHeight = 65.0;
final BorderRadius buttonRadius = BorderRadius.circular(5.0);

ClipRRect(
  borderRadius: buttonRadius,
  child: DynamicBg(
    width: buttonWidth,
    height: buttonHeight,
    painterData: ScrollerPainterData(
      direction: ScrollDirection.right2Left,
      shape: ScrollerShape.stripesDiagonalForward,
      backgroundColor: Color.fromARGB(255, 214, 232, 185),
      color: Color.fromARGB(255, 198, 225, 151),
      shapeWidth: 24.0,
      spaceBetweenShapes: 24.0,
      fadeEdges: false,
    ),
    child: Material(
      color: Colors.transparent,
      child: InkWell(
        onTap: () {
          print('Button pressed');
        },
        borderRadius: buttonRadius,
        child: Center(
          child: Text(
            'Save',
            style: TextStyle(
              color: Colors.white,
              fontSize: 25.0,
              fontWeight: FontWeight.w800,
            ),
          ),
        ),
      ),
    ),
  ),
),

If you found this helpful, please consider donating. Thanks!

buy me a coffee      paypal      venmo



カテゴリー

依存関係

依存関係一覧 1 件

ソースリポジトリ

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

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