buildChild method
Widget
buildChild(
- dynamic status, {
- LoadMoreTextBuilder builder = TextBuilderEbznz.arabic,
override
Implementation
@override
Widget buildChild(LoadMoreStatus status,
{LoadMoreTextBuilder builder = TextBuilderEbznz.arabic}) {
String text = builder(status);
if (status == LoadMoreStatus.fail) {
return Container(
child: Text(text),
);
}
if (status == LoadMoreStatus.idle) {
return Text(text);
}
if (status == LoadMoreStatus.loading) {
return Container(
alignment: Alignment.center,
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
SizedBox(
width: _loadmoreIndicatorSize,
height: _loadmoreIndicatorSize,
child: CircularProgressIndicator(
backgroundColor: Colors.black54,
),
),
Padding(
padding: const EdgeInsets.all(8.0),
child: Text(text),
),
],
),
);
}
if (status == LoadMoreStatus.nomore) {
return Text(text);
}
return Text(text);
}