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

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

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