flutterchina / azlistview Goto Github PK
View Code? Open in Web Editor NEWA Flutter sticky headers & index ListView. Flutter 城市列表、联系人列表,索引&悬停。
License: BSD 3-Clause "New" or "Revised" License
A Flutter sticky headers & index ListView. Flutter 城市列表、联系人列表,索引&悬停。
License: BSD 3-Clause "New" or "Revised" License
询问作者 能够在这个属性中添加一个index索引吗,我试过自己修改插件添加一个索引,但是同事请求后还是得自己改
itemBuilder: (context, model) => _buildListItem(model), 在此处model后面添加一个index索引
现在加了 Divider(height: 0.1, indent: 68)
但是如果 A 这个Tag下只有一个数据或者最后一个数据的时候不想让分割线显示 但是好像没办法 请问有什么好办法呢?
你好,当我使用本插件时,当我顶部有搜索输入,弹出键盘时indexBarBuilder的高度会超限:
azlistview: ^0.1.2
◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤
Issue with the Alphabets when phone rotate on the small side...I get A RenderFlex overflowed by 200 pixels on the bottom.
Is there a way to hide alphabets or reduce the number of letters like on android phones?
Is there documentation on this?
是否有计划将azlistview也升级成null safety的包。:)
感谢!
https://www.youtube.com/watch?v=bvq7wbn4VAA&ab_channel=Flutter
当页面数据撑不满一屏时,失去了拖动回弹的效果
没有滚动监听了么?
当有多个列表并存时,通过顶部tabbar切换,如果给AzListView传入不同的scrollController或不传入,采用默认生成不同的controller,点击顶部状态栏,没有scrollToTop效果。如果传入同一个scrollController,右侧索引会失效,而且会报错一个scrollController绑定不同的listview
列表样式 支持自定义吗
如何调整内容区的行间距的?
indexBarBuilder: (BuildContext context, List tags, IndexBarTouchCallback onTouch) => _indexBarBuilder(tags, onTouch),
_indexBarBuilder(List tags, IndexBarTouchCallback onTouch) {
return IndexBar(
data: tags.map((e) => e.toUpperCase()).toList(),
width: 36,
itemHeight: 20,
touchDownColor: Color(0xff111111),
touchDownTextStyle: TextStyle(color: Colors.white),
textStyle: TextStyle(fontSize: 16, color: Colors.grey),
onTouch: onTouch,
);
}
滑动indexBar 列表没有跟随滑动
我在 az_listview.dart 120行 打印结果
不设置indexBarBuilder的时候一切正常
可以帮我看一下是什么问题吗?
如题,谢谢。
如何运行,如何使用,说缺少main.dart
有什么办法添加这样一个功能:列表滚动到一个字母项时,左边的字母列表下标也跟着变
当最后的一组高度的整体不能撑满屏幕时, 滑动到最后一组, 再定位到其索引时,定位有问题. 不能滚动到相应索引的第一列.
首先感谢你提供的组件,我在使用组件时发现了一个小问题,我不知道是不是该定义为bug。 当我把模拟数据加载完 通过右侧的字母列表 滑动选中对应的区域 屏幕中间会显示当前停留的字母区域的 灰色的字母,这个滑动的时候 都是ok的,但是发现如果用手直接点对应的字母后 该字母不会消失,点击屏幕周边 也不会消失,如果重新用手在字母列表上滑动一下 则能消失。 不知是否是bug 还是我缺少了什么设置。希望能得到你的帮助
在使用中,发现当我使用GridView布局,一排几个item时,使用右边的a-z滑动,左边的定位对应不上。谢谢
Item高度能不能不设,根据内容动态变化?
How to set the separator of the suspension_view
我想要即使没有数据的情况下,A-Z的索引也展示。怎么做到?
与SmartRefreer和Sing了ScrollView以及CustomerScrollView结合使用的时候会报错,导致我做不了分页与下拉刷新
对于滚动持续加载数据的listview是否不适用呢?
个人猜想因为涉及到排序问题,所以插件应该只适用于一次性加载完成数据后的数据,也就是说列表大小应该是一次性加载完成的吧?
期待你的答复
请问,这个列表是否有复选功能?
套一个EasyRefresh,会报错
热门城市那一行怎么样让不一直在顶部悬浮的?
在相同的字母分组下 比如都是Z 然后名字叫 张** 周**,这样同一组内会乱序 并没有按照张姓结束后才是周姓这样子排序
List<Widget> pages = [
Body(),
GitHubLanguagePage(),
];
int currentIndex = 0;
@override
Widget build(BuildContext context) {
return Scaffold(
resizeToAvoidBottomInset: false,
body: pages[currentIndex],
floatingActionButton: FloatingActionButton(
onPressed: () {
print("add press ");
},
child: Icon(Icons.add),
),
floatingActionButtonLocation: FloatingActionButtonLocation.centerDocked,
bottomNavigationBar: BottomAppBar(
shape: CircularNotchedRectangle(),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
IconButton(
icon: Icon(Icons.view_module),
onPressed: () {
setState(() {
currentIndex = 0;
});
print("全部:$currentIndex");
},
),
IconButton(
icon: Icon(Icons.favorite),
onPressed: () {
setState(() {
currentIndex = 1;
});
print("收藏:$currentIndex");
},
),
],
),
),
);
}
Body Widget code:
@override
Widget build(BuildContext context) {
_search('');
print('build ...');
return Scaffold(
resizeToAvoidBottomInset: false,
body: SafeArea(
child: Column(
children: [
Container(
margin: EdgeInsets.all(12),
decoration: BoxDecoration(
border: Border.all(
color: Color.fromARGB(255, 225, 226, 230), width: 0.33),
color: Color.fromARGB(255, 239, 240, 244),
borderRadius: BorderRadius.circular(12)),
child: TextField(
autofocus: false,
onChanged: (value) {
_search(value);
},
controller: textEditingController,
decoration: InputDecoration(
prefixIcon: Icon(
Icons.search,
color: Colors.grey,
),
suffixIcon: Offstage(
offstage: textEditingController.text.isEmpty,
child: InkWell(
onTap: () {
textEditingController.clear();
_search('');
},
child: Icon(
Icons.cancel,
color: Colors.grey,
),
),
),
border: InputBorder.none,
hintText: 'Search',
hintStyle: TextStyle(color: Colors.grey)),
),
),
Expanded(
child: AzListView(
data: controller.dataList(),
physics: AlwaysScrollableScrollPhysics(),
itemCount: controller.dataList().length,
itemBuilder: (BuildContext context, int index) {
PinYin model = controller.dataList()[index];
return getListItem(context, model);
},
itemScrollController: itemScrollController,
susItemBuilder: (BuildContext context, int index) {
PinYin model = controller.dataList()[index];
return getSusItem(context, model.getSuspensionTag());
},
indexBarOptions: IndexBarOptions(
needRebuild: true,
selectTextStyle: TextStyle(
fontSize: 12,
color: Colors.white,
fontWeight: FontWeight.w500),
selectItemDecoration: BoxDecoration(
shape: BoxShape.circle, color: Color(0xFF333333)),
indexHintWidth: 96,
indexHintHeight: 97,
// indexHintDecoration: BoxDecoration(
// image: DecorationImage(
// image: AssetImage(
// Utils.getImgPath('ic_index_bar_bubble_white')),
// fit: BoxFit.contain,
// ),
// ),
indexHintAlignment: Alignment.centerRight,
indexHintTextStyle:
TextStyle(fontSize: 24.0, color: Colors.black87),
indexHintOffset: Offset(-30, 0),
),
),
)
],
),
),
);
}
设置了 resizeToAvoidBottomInset: false
当点击搜索的时候键盘弹出就报底部溢出
════════ Exception caught by rendering library ═════════════════════════════════════════════════════
The following assertion was thrown during layout:
A RenderFlex overflowed by 25 pixels on the bottom.
The relevant error-causing widget was:
Column file:///Users/zhaoxm/workspace/flutter/azlistview/lib/src/index_bar.dart:244:18
The overflowing RenderFlex has an orientation of Axis.vertical.
The edge of the RenderFlex that is overflowing has been marked in the rendering with a yellow and black striped pattern. This is usually caused by the contents being too big for the RenderFlex.
Consider applying a flex factor (e.g. using an Expanded widget) to force the children of the RenderFlex to fit within the available space instead of being sized to their natural size.
This is considered an error condition because it indicates that there is content that cannot be seen. If the content is legitimately bigger than the available space, consider clipping it with a ClipRect widget before putting it in the flex, or using a scrollable container rather than a Flex, like a ListView.
The specific RenderFlex in question is: RenderFlex#4ae29 relayoutBoundary=up9 OVERFLOWING
... parentData: (can use size)
... constraints: BoxConstraints(0.0<=w<=36.0, 0.0<=h<=342.7)
... size: Size(36.0, 342.7)
... direction: vertical
... mainAxisAlignment: start
... mainAxisSize: min
... crossAxisAlignment: center
... verticalDirection: down
◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤
════════════════════════════════════════════════════════════════════════════════════════════════════
您好,我在使用azlisview的时候使用了屏幕适配的方案来设定各种尺寸,在给itemHeight等height赋值时发现需传入Int类型,我之前是把我要的参数toInt(),后来发现数据量多了后,indexbar就不能正确的跳转到对应的地方了,应该是精度缺失的问题。请问有没有可能把这些设置尺寸的参数的类型换成double呢,还是有其他的考量?
Hello, I have attempted to create a version of the listview that is similar to the Github Languages example. I have successfully implemented all needed features except 1. Scrolling to a specific position based on clicking on the shortcut list does not work. It doesn't attempt to scroll. What functions control the scroll? What are the necessary dependencies? (There is no error message when I click) ((The Letter Preview shows up when I click, but the specific letter also does not remain highlighted))
我下载了源文件,在City Select(Custom header)这个案例,屏幕上一片空白只有滑动页面的时候才会显示城市
tag 始终在左边 右边的字母排序 始终在右边
我需要进行下拉下回弹效果怎么设置
滚动顶部是个动态的高度。比如里面有一些资源位
建议动态的获取header的高度
I was unable to load an image on the list, I use both assets and network image still the same thing, is there I have to do this
Scaffold(
appBar: new AppBar(
title: new Text(widget.title),
centerTitle: true,
),
body: new Column(
children: [
Container(
alignment: Alignment.centerLeft,
padding: const EdgeInsets.only(left: 15.0),
height: 50.0,
child: Text("当前城市: 成都市"),
),
Expanded(
flex: 1,
child: new AzListView(
data: _cityList,
topData: _hotCityList,
itemBuilder: (context, model) => _buildListItem(model),
suspensionWidget: _buildSusWidget(_suspensionTag),
isUseRealIndex: true,
itemHeight: _itemHeight,
suspensionHeight: _suspensionHeight,
onSusTagChanged: _onSusTagChanged,
))
],
));我发现这个必须要放在Scaffold里面并且要有appbar,不然点击侧边索引后对应的索引标题会有部分重复啊,不知道是我写错了还是有问题,麻烦作者确认一下
在 header 添加了布局,isUseRealIndex: = false 因为需要索引一直显示。
但是怎么在最上方加个箭头,好回到最上方呢?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.