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

パッケージ詳細v2.0.0

flutter_speed_dial_material_design

Material Design スピードダイヤルを実装するための Flutter プラグイン(https://material.io/components/buttons-floating-action-button/#types-of-transitions)

30日間ダウンロード
46
いいね数
62
Pub ポイント
40

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

flutter pub add flutter_speed_dial_material_design

パッケージ概要

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

Material Design スピードダイヤルを実装するFlutterプラグインで、拡張可能なメニュー項目を持つフローティングアクションボタンです。遷移とインタラクションに関してMaterial Designガイドラインに従っており、1つのFABから複数の操作にアクセスできるようにします。カスタマイズ可能なアイコン、ラベル、アニメーションスタイルをサポートしており、モバイルアプリのユーザーインターフェース効率を高めるのに最適です。最小限のセットアップで既存のFlutterプロジェクトにスムーズに統合できます。

用途

  • モバイルアプリにクイックアクセス操作メニューを追加する
  • タスク指向インターフェースにおけるナビゲーションの向上
  • Material Designの標準に従ってUIの一貫性を向上させる
  • コンパクトで機能豊富なフローティングボタンの作成
  • 洗練されたレイアウトで補助アクションへのアクセスを簡素化

主な機能

  • Material Design準拠のアニメーション
  • カスタマイズ可能なメニュー項目とアイコン
  • ラベルおよびツールチップのサポート
  • 既存のFlutterウィジェットとの簡単な統合
  • 拡張方向および速度の設定可能

適している対象

  • Material Design アプリを開発する開発者
  • 迅速な操作アクセスを必要とするUI中心のアプリケーション
  • 洗練された、モダンなインターフェースを目指すプロジェクト
  • 再利用可能な FAB コンポーネントを探しているモバイルアプリ開発者
  • Googleのデザインガイドラインに従うチーム

注意事項

  • 制限されたプラットフォーム固有のカスタマイズ
  • 非Materialテーマ用に追加のスタイリングが必要になる場合があります
  • 非常に大きなメニュー設定には最適化されていません
  • 古いデバイスではアニメーションのパフォーマンスが異なる場合があります
  • キーボードナビゲーションの組み込みサポートなし

元の README

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

Flutter Speed dial of Material Design style

Flutter package which applies Material design Speed dial

Preview

There are several packages that provide fancy speed dial. However, as most of those do not work properly on docked FAB using notch, I referenced Andrea Bizzoto and Matt Carroll's idea/code specified here to make it work fine with notch as well. Truly appreciate to Andrea and Matt for sharing such an awesome idea and codes.

Usage

Basic usage
Widget build(BuildContext context) {
    return Scaffold(
      body: SafeArea(child: _buildBody()),
      floatingActionButton: _buildFloatingActionButton(),
      floatingActionButtonLocation: FloatingActionButtonLocation.endDocked,
      bottomNavigationBar: _buildBottomBar(),
    );
  }

Widget _buildFloatingActionButton() {
    final icons = [
      SpeedDialAction(child: Icon(Icons.mode_edit)),
      SpeedDialAction(child: Icon(Icons.date_range)),
      SpeedDialAction(child: Icon(Icons.list)),
    ];

    return SpeedDialFloatingActionButton(
      actions: icons,
      // Make sure one of child widget has Key value to have fade transition if widgets are same type.
      childOnFold: Icon(Icons.event_note, Key: UniqueKey()),
      childOnUnfold: Icon(Icons.add),
      useRotateAnimation: true,
      onAction: _onSpeedDialAction,
    );
  }
  
_onSpeedDialAction(int selectedActionIndex) {
  print('$selectedActionIndex Selected');
}
Using controller
SpeedDialController _controller = SpeedDialController();

SpeedDialFloatingActionButton(
      controller: _controller,
      ...
    );
    
// Use anywhere to mannually unfold
_controller.unfold();
Fade Transition animation between child widgets

In order to apply fade transition between [childOnFold] and [childOnUnfold], make sure one of those has Key field. (eg. ValueKey(value) or UniqueKey()). As we using AnimatedSwitcher for transition animation, no key with same type of child will perform no animation. It is AnimatedSwitcher's behaviour.

TO-DOs

  • [ ] Ability to display/hide speed dial when it is needed. (ex. hiding on scroll)
  • [X] Unfold function to force close the dial
  • [ ] Providing option for modal background with color parameter
  • [X] Text labels on each action widgets (Thanks to @CarlosHJuniior)

Contributing

Any pull requests for implementing To-Do functions are always welcome!

Other useful packages you might be instrested

Firebase Auth Simplify Google Maps Place Picker

Support

If the package was useful or saved your time, please do not hesitate to buy me a cup of coffee! ;)
The more caffeine I get, the more useful projects I can make in the future.

Buy Me A Coffee

カテゴリー

ソースリポジトリ

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

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