搜索插件、代码仓与 APP 分类

marquee_list 封面
插件详情v1.0.0

marquee_list

一个用于以跑马灯样式显示项目列表的 Marquee 列表小部件

AndroidiOSWebmacOSWindowsLinux
近 30 天下载
784
喜欢数
53
Pub 分数
150

安装插件

flutter pub add marquee_list

插件介绍

基于插件公开信息、社区数据与项目使用情况整理的选型参考。

一个 Flutter 小部件,以滚动条风格显示项目列表,项目水平或垂直滚动以显示超出可用空间的内容。非常适合展示长文本、标签或具有连续运动的动态列表。该小部件支持平滑动画以及可自定义的方向、速度和行为。可无缝集成到现有 UI 中,并在移动、网页和桌面等主要平台上正常运行。

适合场景

  • 显示长文本标签
  • 创建动画新闻滚动条
  • 显示滚动商品名称
  • 突出显示动态内容
  • 通过动态效果增强用户界面

主要特点

  • 水平和垂直滚动
  • 可自定义的滚动速度
  • 平滑动画
  • 支持动态列表项
  • 跨平台兼容性

适合对象

  • 空间有限的 UI
  • 新闻或公告横幅
  • 产品展示
  • 动画文本显示
  • 交互式仪表板

使用建议

  • 大型列表可能影响性能
  • 需要仔细调整滚动速度
  • 不适合静态内容
  • 如果使用过度,可能会造成干扰
  • 需要在所有目标平台上进行测试

原始 README

以下为关联源码仓库的 README 原文快照,最新内容请访问源码仓库。

A Flutter Marquee list widget to display a list of items in a marquee style.

marquee_list_showcase

Features

Use this widget in your Flutter app to:

  • Scroll a list of items horizontally or vertically by defining scrollDirection.
  • Customize the scrolling speed using scrollDuration.

Usage

Scroll horizontally
import 'package:marquee_list/marquee_list.dart';

//....
   child: MarqueeList(
     scrollDirection: Axis.horizontal, // By default, it's horizontal
     children: [
       Text("Text 1"),
       Text("Text 2"),
       Text("Text 3"),
       Text("Text 4"),
     ],
   ),
//....
Scroll vertically
import 'package:marquee_list/marquee_list.dart';

//....
   child: MarqueeList(
     scrollDirection: Axis.vertical, // Change direction to vertical
     children: [
       Text("Text 1"),
       Text("Text 2"),
       Text("Text 3"),
       Text("Text 4"),
     ],
   ),
//....
Customize the scrolling speed
import 'package:marquee_list/marquee_list.dart';

//....
   child: MarqueeList(
     scrollDuration: const Duration(seconds: 3), // Default is 1 second
     children: [
       Text("Text 1"),
       Text("Text 2"),
       Text("Text 3"),
       Text("Text 4"),
     ],
   ),
//....
Receive call back when scroll ends using onScrollEnd callback
import 'package:marquee_list/marquee_list.dart';

//....
   child: MarqueeList(
     scrollDirection: Axis.horizontal,
     onScrollEnd: () {
       // Do something when the scroll ends
     },
     children: [
       Text("Text 1"),
       Text("Text 2"),
       Text("Text 3"),
       Text("Text 4"),
     ],
   ),
//....

Contributing to this package

Contributions are welcome! Here is a curated list of how you can help:

  • Report bugs and scenarios that are difficult to implement
  • Report parts of the documentation that are unclear
  • Fix typos/grammar mistakes
  • Update the documentation or add examples
  • Implement new features by making a pull-request

MIT License

Copyright (c) 2024 Burhanuddin Rashid

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.

所属分类

源码仓库

使用此插件的项目

暂无相关数据。