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

flutter_scrolling_fab_animated のカバー
パッケージ詳細v0.1.5

flutter_scrolling_fab_animated

スクロールダウン時にサイズが変化するフローティングボタンを追加するパッケージ

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

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

flutter pub add flutter_scrolling_fab_animated

パッケージ概要

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

スクロールイベントに応じて浮動操作ボタン(FAB)をアニメーション化することで、ユーザー体験を向上させるFlutterパッケージです。ユーザーが下にスクロールするとFABは小さくなりまたは非表示になり、上にスクロールすると拡大されまたは再表示されます。この動作により、UIの洗練さを保ちながらも主要な操作を常にアクセス可能にします。本パッケージはAndroid、iOS、Web、macOS、Windows、Linuxなどすべての主要プラットフォームをサポートしており、一貫したクロスプラットフォームデザインに最適です。

用途

  • スクロール駆動型FABアニメーション
  • ダイナミックなFABsでモバイルアプリのUXを向上させる
  • スクロール時に隠れたFABを使用してクリーンなインターフェースを作成する
  • 複数のプラットフォーム間での一貫した FAB の動作
  • スクロール可能なリストにおける視覚的階層の向上

主な機能

  • スクロール時の自動FABサイズアニメーション
  • クロスプラットフォーム互換性
  • 既存のスクロールビューとの簡単な統合
  • カスタマイズ可能なアニメーション曲線
  • FAB の収縮および拡張をサポート

適している対象

  • モバイルおよびウェブアプリ開発者
  • インタラクティブUIに焦点を当てるデザイナー
  • 長くスクロール可能なコンテンツを備えたアプリ
  • 軽量な FAB の拡張機能を求める開発者
  • プラットフォームに依存しないコンポーネントを必要とするプロジェクト

注意事項

  • 最適なアニメーションタイミングを得るために微調整が必要になる場合があります
  • 単一スクロール画面に最適
  • サイズと表示以外のカスタマイズは限られている
  • 複雑なネストされたスクロールシナリオには適していません
  • 親のスクロール可能なウィジェットの動作に依存します

元の README

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

Flutter Scrolling Fab Animated

This package is a floating button whose change of size when scroll down and return to its original size when on top again. It's useful with ListView widget and other scrollable widgets.

With animated icon

New Features 💥

  • Adding on long press support
  • Adding ripple effect for the button
  • Removing square shadow around the button when pressing it
  • Added gradient background

Instalation

Include flutter_scrolling_fab_animated in your pubspec.yaml file:

dependencies:
  flutter:
    sdk: flutter
  flutter_scrolling_fab_animated: version

Usage

To use this package, just import it into your file and enjoy it.

import 'package:bottom_sheet_expandable_bar/bottom_sheet_bar_icon.dart';
import 'package:flutter_scrolling_fab_animated/flutter_scrolling_fab_animated.dart';

...

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text('Flutter Scrolling Fab Animated Demo'),
      ),
      body: Container(
        child: new ListView.builder(
          controller: _scrollController,
          itemCount: items.length,
          itemBuilder: (BuildContext ctxt, int index) {
            return new Card(
              child: ListTile(
                title: Text(items[index]),
              )
            );
          }
        ),
      ),
      floatingActionButton: ScrollingFabAnimated(
        icon: Icon(Icons.add, color: Colors.white,),
        text: Text('Add', style: TextStyle(color: Colors.white, fontSize: 16.0),),
        onPress: (){},
        scrollController: _scrollController,
        gradient: const LinearGradient(colors: [Color(0xff0CA2E6),Color(0xff2E3D97),],begin: Alignment.topCenter, end: Alignment.bottomCenter),
        animateIcon: true,
        inverted: false,
        radius: 10.0,
      )
    );
  }

...

Example with a GridView

import 'package:bottom_sheet_expandable_bar/bottom_sheet_bar_icon.dart';
import 'package:flutter_scrolling_fab_animated/flutter_scrolling_fab_animated.dart';

...

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text('Flutter Scrolling Fab Animated Demo'),
      ),
      body: Container(
        child: new GridView.builder(
          gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: 2),
          controller: _scrollController,
          itemCount: items.length,
          itemBuilder: (BuildContext ctxt, int index) {
            return new Card(
              child: ListTile(
                title: Center(child: Text(items[index])),
              )
            );
          }),
      ),
      floatingActionButton: ScrollingFabAnimated(
        icon: Icon(Icons.add, color: Colors.white,),
        text: Text('Add', style: TextStyle(color: Colors.white, fontSize: 16.0),),
        onPress: (){},
        scrollController: _scrollController,
        animateIcon: true,
        inverted: false,
        radius: 10.0,
      )
    );
  }

...

Properties
Name Description Required Default
icon Widget to use as button icon True
text Widget to use as button text when button is expanded True
onPress Function to use when press the button True
scrollController ScrollController to use to determine when user is on top or not True
elevation Double value to set the button elevation False 5.0
shadowColor Color value to set the button shadow color False ThemeData.shadowColor
width Double value to set the button width when is expanded False 120.0
height Double value to set the button height False 60.0
duration Value to set the duration for animation False 250 milliseconds
curve Value to set the curve for animation False Curves.easeInOut
limitIndicator Double value to set the boundary value when scroll animation is triggered False 10.0
color Color to set the button background color False Colors.blueAccent
gradient Color to set the button background gradient False null
animateIcon Value to indicate if animate or not the icon False true
inverted Value to inverte the behavior of the animation False false
radius Double value to set the button radius False null

カテゴリー

ソースリポジトリ

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

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