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

插件详情v1.0.0

flutter_section_list_view

一个扩展的 Flutter ListView,支持类似 iOS UITableView 的分组功能

近 30 天下载
30
喜欢数
6
Pub 分数
40

安装插件

flutter pub add flutter_section_list_view

插件介绍

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

一个扩展标准 ListView 的 Flutter 包,支持类似于 iOS UITableView 的分段列表。它使开发者能够将列表项组织成带有标题和页脚的段落,从而提高复杂数据集的可读性和结构化程度。该包旨在与现有 Flutter 应用无缝集成,为来自 iOS 开发的开发者提供熟悉的界面。它支持动态更新、自定义段落样式以及流畅的滚动性能。

适合场景

  • 创建分组联系人列表
  • 实现分段设置菜单
  • 显示分类产品目录
  • 在 Flutter 中构建 iOS 风格的表格视图
  • 按日期整理聊天消息
  • 呈现层次数据结构

主要特点

  • 章节标题和页脚
  • iOS UITableView 类似行为
  • 可自定义的区域样式
  • 动态数据更新
  • 平滑滚动性能
  • 对嵌套列表的支持

适合对象

  • 从 iOS 迁移到 Flutter 的开发者
  • 需要结构化数据的应用程序显示
  • 需要分组的列表密集型UI
  • 优先考虑原生 iOS 用户体验模式的团队
  • 需要干净、有条理的列表布局的项目

使用建议

  • 有限的平台特定优化,超出 iOS 风格
  • 可能需要额外的样式调整以适应非iOS设计
  • 在没有分页的情况下,不适合处理非常大的数据集
  • 无内置的拖拽排序支持
  • 依赖外部 GitHub 仓库以获取更新

原始 README

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

flutter_section_list_view

A flutter list view which supports sections like iOS UITableView with no overhead

Usage

To use this plugin, add flutter_section_list_view as a dependency in your pubspec.yaml file.

Getting Started

Import this class
import 'flutter_section_list_view/flutter_section_list_view.dart';
Add flutter_section_list_view Widget

After importing this plugin to your project, you can simply use it as a normal widget


FlutterSectionListView(
        numberOfSection: 4,
        numberOfRowsInSection: (section) {
          return section * 3 + 1;
        },
        sectionWidget: (section) {
          return Container(child: Padding(
            padding: const EdgeInsets.all(8),
            child: Text('Section $section'),
          ), color: Colors.grey,);
        },
        rowWidget: (section, row) {
          return Container(
            child: Padding(
              padding: EdgeInsets.all(8),
              child: Text('Row $section - $row'),
            ),
          );
        },
      )

To use Pull-To-Refresh feature, simply provide value to attribute 'refresh', a callback function

listView.refresh = () async {
      await new Future.delayed(new Duration(seconds: 3));
      print('List Refreshed');
    };

For Pagination feature, provide value to attribute 'loadMoreData', a callback function

listView.loadMoreData = () async {
      await new Future.delayed(new Duration(seconds: 2));
      print('More Data loaded and List refreshed');
      /// set 'isMoreAvailable' attribute to 'false' when there are no more pages to return 
      listView.isMoreAvailable = false;
    };

所属分类

源码仓库

使用此插件的项目

暂无相关数据。