import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:pull_to_refresh/pull_to_refresh.dart'; import '../utils/text_style.dart'; import '../utils/text_widget.dart'; CustomFooter footer(BuildContext context,double tm){ return CustomFooter( builder: (BuildContext context, LoadStatus? mode) { Widget body; if (mode == LoadStatus.idle) { body = Padding( padding: const EdgeInsets.only(bottom: 500.0), child: Txt(text:"pull up load", style: tS('NunitoBold', tm * 1.7, FontWeight.normal, Colors.black)), ); } else if (mode == LoadStatus.loading) { body = const CupertinoActivityIndicator(); } else if (mode == LoadStatus.failed) { body = Padding( padding: const EdgeInsets.only(bottom: 500.0), child: Txt(text:"Load Failed!Click retry!", style: tS('NunitoBold', tm * 1.7, FontWeight.normal, Colors.black),), ); } else if (mode == LoadStatus.canLoading) { body = Padding( padding: const EdgeInsets.only(bottom: 500.0), child: Txt(text:"release to load more", style: tS('NunitoBold', tm * 1.7, FontWeight.normal, Colors.black)), ); } else { body = Padding( padding: const EdgeInsets.only(bottom: 500.0), child: Txt(text:"No more Data", style: tS('NunitoBold', tm * 1.7, FontWeight.normal, Colors.black)), ); } return SizedBox( height: 55.0, child: Center(child: body), ); }, ); }