提交 34219842 authored 作者: shixiaochen's avatar shixiaochen

1、增加方法hideBankCard(银行卡号脱敏);

上级 252485f9
......@@ -44,4 +44,6 @@
* hideName姓名脱敏
* ## 1.2.2
* hideBankCard银行卡号脱敏
* ## 1.2.3
* 修复BaseListWidget首次无法展示空省图问题
\ No newline at end of file
......@@ -51,7 +51,6 @@ class _BaseListWidgetState extends State<BaseListWidget> {
final List<dynamic> _dataList = [];
int _page = 1;
int _count = 0;
bool _startLoadingFinish = false; // 首次进入loading加载完成标识
StateType _stateType = StateType.loading; // 列表状态
// 禁止手动触发滚动,处理刷新过程中禁止滚动列表操作
bool _disallowScroll = false;
......@@ -83,7 +82,6 @@ class _BaseListWidgetState extends State<BaseListWidget> {
builder: (ctx, state) {
if (state.mode == IndicatorMode.inactive ||
state.mode == IndicatorMode.done) {
_startLoadingFinish = true;
return const SizedBox();
}
return Container(
......@@ -145,11 +143,13 @@ class _BaseListWidgetState extends State<BaseListWidget> {
}
_dataList.addAll(result);
_count = _dataList.length;
setState(() {});
_stateType = isEmpty ? StateType.empty : StateType.success;
if (mounted) {
setState(() {});
}
_controller.finishLoad(result.length < widget.pageSize
? IndicatorResult.noMore
: IndicatorResult.success);
_stateType = isEmpty ? StateType.empty : StateType.success;
}
void _requestError(code, msg) {
......@@ -158,7 +158,9 @@ class _BaseListWidgetState extends State<BaseListWidget> {
}
_stateType = StateType.error;
ToastUtil.showToast(msg);
setState(() {});
if (mounted) {
setState(() {});
}
if (_page == 1) {
_controller.finishRefresh();
} else {
......@@ -226,7 +228,7 @@ class _BaseListWidgetState extends State<BaseListWidget> {
return [
if (header.position == IndicatorPosition.locator)
const HeaderLocator.sliver(),
if (isEmpty && _startLoadingFinish)
if (isEmpty)
SliverFillViewport(
delegate: SliverChildBuilderDelegate(
(context, index) {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论