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

marquee_widget のカバー
パッケージ詳細v1.2.0

marquee_widget

RTL をサポートする Widget テキストおよびその他の Widget をスクロールする Flutter ウィジェットです。

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

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

flutter pub add marquee_widget

パッケージ概要

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

marquee_widget は、水平スクロールテキストおよびその他のウィジェットを可能にするFlutterパッケージであり、右から左へのレイアウト(RTL)もサポートしています。限られたスペースに長いコンテンツを表示する場合、たとえば見出しや通知などに最適です。このウィジェットは画面全体でコンテンツをスムーズにアニメーション化し、読みやすさと視覚的な魅力を確保します。Android、iOS、Web、macOS、Windows、Linuxなど、すべての主要プラットフォームで動作し、非常に汎用性が高いです。シンプルな設計により、既存のFlutterアプリに簡単に統合でき、複雑なセットアップは不要です。このパッケージは積極的にメンテナンスされており、オープンソースであるため、コミュニティからの貢献が可能です。

用途

  • ニュースアプリで長い見出しを表示する
  • 進行中の通知やアラートを表示
  • ダッシュボードでのティッカー風テキストのアニメーション
  • アラビア語やヘブライ語などのRTL言語をサポート
  • キオスクやデジタルサイネージで動的UI要素を作成する

主な機能

  • スムーズな水平スクロールアニメーション
  • 完全な RTL 言語サポート
  • クロスプラットフォーム互換性
  • 既存のFlutterコードへの簡単な統合
  • カスタマイズ可能な速度および遅延設定
  • テキストだけでなく、任意の Widget をサポートします

適している対象

  • 多言語アプリを開発する開発者
  • アニメーションテキストエフェクトが必要なデザイナー
  • 長文コンテンツをコンパクトに表示する必要があるアプリ
  • キオスクまたは公開情報システム
  • リアルタイムデータダッシュボード

注意事項

  • 非常に長いコンテンツではパフォーマンスに影響する可能性があります
  • 読みやすさのためにスクロール速度の微調整が必要です
  • 静的テキスト表示には適していません
  • 基本パラメータを超えるカスタマイズオプションは限られている
  • ユーザーの注意を散漫にしないように、控えめに使用することをお勧めします

元の README

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

marquee_widget

A Flutter widget that scrolls Widget Text and other Widget with supported RTL. Provides many customizationsincluding custom scroll directions and velocities, pausing after every round and specifying custom durations and curves for accelerating and decelerating.

Usage

This is a minimalistic example:

Marquee(
  child:Text( 'This project is a starting point for a Dart package, a library module containing code that can be shared easily across multiple Flutter or Dart projects. '),
)

And here's a piece of code that makes full use of the marquee's customizability:

set Width and Height with Continer()

Marquee(
  child:Text( 'This project is a starting point for a Dart package'),
  scrollAxis: Axis.horizontal,
  textDirection : TextDirection.rtl,
  animationDuration: Duration(seconds: 1),
  backDuration: Duration(milliseconds: 5000),
  pauseDuration: Duration(milliseconds: 2500),
  directionMarguee: DirectionMarguee.oneDirection,

)

Exmpale

GridView.count(
        crossAxisCount: 2,
        childAspectRatio: 0.7,
        children: <Widget>[
          GridTile(
            child: Card(
              child: Column(
                children: <Widget>[
                  Expanded(
                      child: Image.network(
                    "https://i.pinimg.com/564x/9d/a6/36/9da636b9e60ea40b18921b0053b7d486.jpg",
                    fit: BoxFit.fitHeight,
                  )),
                  Marquee(
                      child: Text(
                    "Flutter is a free and open source Google mobile UI ",
                    style: TextStyle(fontSize: 16),
                  )),
                ],
              ),
            ),
          ),
          GridTile(
            child: Card(
              child: Column(
                children: <Widget>[
                  Expanded(
                      child: Image.network(
                    "https://cdn-images-1.medium.com/max/1000/1*upTyVPOfBb0c4o1r57C9_w.png",
                    fit: BoxFit.fitHeight,
                  )),
                  Marquee(
                      child: Text(
                    "Flutter is a free and open source Google mobile UI ",
                    style: TextStyle(fontSize: 16),
                  )),
                ],
              ),
            ),
          ),
          GridTile(
            child: Card(
              child: Column(
                children: <Widget>[
                  Expanded(
                      child: Marquee(
                          child: Container(
                              width: 1000,
                              child: Image.network(
                                "https://i.pinimg.com/564x/9d/a6/36/9da636b9e60ea40b18921b0053b7d486.jpg",
                                fit: BoxFit.fitWidth,
                              )))),
                  Marquee(
                      child: Text(
                    "Flutter is a free and open source Google mobile UI ",
                    style: TextStyle(fontSize: 16),
                  )),
                ],
              ),
            ),
          ),
          GridTile(
            child: Card(
              child: Column(
                children: <Widget>[
                  Marquee(
                      child: Container(width: 1000,
                        child: Column(
                    children: <Widget>[
                        Marquee(
                            child: Container(
                                width: 1000,height: 260,
                                child: Image.network(
                                  "https://cdn-images-1.medium.com/max/1000/1*upTyVPOfBb0c4o1r57C9_w.png",
                                  fit: BoxFit.fitWidth,
                                ))),
                        Text(
                          "Flutter is a free and open source Google mobile UI ",
                          style: TextStyle(fontSize: 16),
                        ),
                    ],
                  ),
                      )),
                ],
              ),
            ),
          ),
        ],
      ),

LICENSE

Copyright (c) 2018 Marcel Garus

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

カテゴリー

ソースリポジトリ

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