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

flutter_switch_clipper のカバー
パッケージ詳細v0.0.7

flutter_switch_clipper

2つのウィジェットを、デフォルトのクリッパーまたはカスタムクリッパーで切り替えるためのFlutterパッケージです。

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

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

flutter pub add flutter_switch_clipper

パッケージ概要

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

デフォルトまたはカスタムクリッパーを使用して、2つのウィジェット間でスムーズな切り替えを可能にするFlutterパッケージです。アニメーションされたクリッピング効果によりUIの遷移を強化し、ダイナミックで視覚的に魅力的なインターフェースを作成するのに最適です。複数のプラットフォームをサポートしており、Flutterアプリにシームレスに統合できます。開発者は特定のデザイン要件に合わせてクリッパーの動作をカスタマイズでき、アニメーションスタイルとパフォーマンスの柔軟性を提供します。タブ、トグル、コンテンツ切り替えなどのインタラクティブな要素に最適です。

用途

  • アニメーションウィジェットの遷移
  • カスタムタブインジケーター
  • インタラクティブUIコンポーネント
  • 動的コンテンツ切り替え
  • スムーズな画面遷移
  • デザイン重視のアニメーション

主な機能

  • デフォルトおよびカスタムクリッパーのサポート
  • クロスプラットフォーム互換性
  • スムーズな遷移アニメーション
  • Flutter との簡単な統合
  • 柔軟なウィジェット切り替え
  • 高度にカスタマイズ可能なクリッピング効果

適している対象

  • 視覚的な魅力を求めるUIデザイナー
  • インタラクティブなインターフェースを構築する開発者
  • 動的コンテンツ切り替えを必要とするアプリ
  • カスタムアニメーションが必要なプロジェクト
  • Flutterの初心者がクリッパー効果を探求しています

注意事項

  • 複雑なクリッピングによるパフォーマンスへの影響
  • Clipper クラスの理解が必要です
  • 大規模なウィジェットには最適化が必要になる場合があります
  • 基本的な使用方法以外のドキュメントは限られている
  • 単純な静的レイアウトには適していません

元の README

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

Flutter Switch Clipper

A Flutter package that two widgets switch with clipper.

pub package GitHub stars GitHub forks CodeFactor FlutterCandies

体验一下

体验网址:Demo

使用

使用FillClipper并自定义相关参数

View code
SwitchClipper(
    initSelect: true,
    child: const Icon(Icons.favorite, size: 200, color: Colors.redAccent),
    background: const Icon(Icons.favorite, size: 200, color: Colors.white),
    duration: const Duration(milliseconds: 800),
    animationClip: FillClipper(fillAlignment: _alignment,fillOffset: 50),
),

使用默认FillClipper

View code
const SwitchClipper(
    enableWhenAnimating: false,
    child: Text(
        'FlutterCandies',
        style: TextStyle(
            fontWeight: FontWeight.bold,
            fontSize: 50,
            color: Colors.amber,
            height: 2,
        ),
    ),
    background: Text(
        'FlutterCandies',
        style: TextStyle(
            fontWeight: FontWeight.bold,
            fontSize: 50,
            color: Colors.white,
            height: 2,
        ),
    ),
    curve: Curves.slowMiddle,
    reverseCurve: Curves.linear,
),

使用CircleClipper切换图标颜色

View code
SwitchClipper(
    child: const Icon(Icons.accessibility_new_rounded, size: 200, color: Colors.blueAccent),
    background: const Icon(Icons.accessibility_new_rounded, size: 200, color: Colors.white),
    curve: Curves.ease,
    duration: const Duration(milliseconds: 800),
    animationClip: CircleClipper(),
),

使用CircleClipper切换两个图标

View code
SwitchClipper(
    child: ColoredBox(
    color: Colors.blueGrey[200] ?? Colors.blueGrey,
    child: const Icon(Icons.accessibility_new_rounded, size: 200, color: Colors.white)),
    background: const Icon(Icons.accessible_forward_outlined, size: 200, color: Colors.white),
    curve: Curves.ease,
    duration: const Duration(milliseconds: 800),
    animationClip: CircleClipper(),
),

使用ShutterClipper

View code
SwitchClipper(
    child: ColoredBox(
        color: Colors.blueGrey[200] ?? Colors.blueGrey,
        child: const Icon(Icons.accessibility_new_rounded, size: 200, color: Colors.white)),
    background: const Icon(Icons.accessible_forward_outlined, size: 200, color: Colors.white),
    curve: Curves.ease,
    duration: const Duration(milliseconds: 800),
    animationClip: ShutterClipper(activeAlignment: _alignment),
),

使用WaveClipper

View code
SwitchClipper(
    child: const Icon(Icons.access_time_filled_rounded, size: 200, color: Colors.blue),
    background: const Icon(Icons.access_time_filled_rounded, size: 200, color: Colors.white),
    curve: Curves.ease,
    duration: const Duration(milliseconds: 2000),
    animationClip: WaveClipper(
        waveAlignment: _alignment == FillAlignment.left ? WaveAlignment.left : WaveAlignment.right,
    ),
),

使用CameraClipper

View code
SwitchClipper(
    child: Container(
        width: 200,
        height: 200,
        alignment: Alignment.center,
        decoration: const BoxDecoration(
            shape: BoxShape.circle,
            color: Colors.blue,
        ),
        child: const Text(
            'Camera',
            style: TextStyle(color: Colors.white, fontSize: 40, fontWeight: FontWeight.bold),
        ),
    ),
    background: Container(
        width: 200,
        height: 200,
        decoration: const BoxDecoration(
            shape: BoxShape.circle,
            color: Colors.white,
        ),
    ),
    duration: const Duration(milliseconds: 2000),
    animationClip: CameraClipper(),
),

カテゴリー

ソースリポジトリ

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

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