123456789101112131415161718192021222324252627282930313233343536373839404142 |
- import 'package:easy_refresh/easy_refresh.dart';
- class RefreshConfig {
- RefreshConfig._();
- static RefreshConfig? _instance;
- static RefreshConfig get() => _instance ?? RefreshConfig._();
- void initDefault({
- ClassicHeader? header,
- ClassicFooter? footer,
- }) {
- EasyRefresh.defaultHeaderBuilder = () =>
- header ??
- const ClassicHeader(
- dragText: '下拉刷新',
- armedText: '释放开始',
- readyText: '刷新中...',
- processingText: '刷新中...',
- processedText: '成功了',
- noMoreText: '已加载全部',
- failedText: '刷新失败',
- messageText: '最后更新于 %T',
- processedDuration: Duration(milliseconds: 200),
- );
- EasyRefresh.defaultFooterBuilder = () =>
- footer ??
- const ClassicFooter(
- dragText: '上拉加载',
- armedText: '释放开始',
- readyText: '加载中...',
- processingText: '加载中...',
- processedText: '成功了',
- noMoreText: '已加载全部',
- failedText: '加载失败',
- messageText: '最后更新于 %T',
- processedDuration: Duration(milliseconds: 200),
- );
- }
- }
|