expandBuild method
Implementation
Widget expandBuild() {
return Expanded(
child: Container(
color: backgroundColor,
child: LayoutBuilder(
builder: (context, constraints) {
double height = constraints.maxHeight;
return EasyRefresh(
onRefresh: onRefresh,
onLoad: onLoad,
controller: controller,
child: Column(
children: [
Expanded(
child: ListView.builder(
itemCount: itemCount + 1,
itemBuilder: (BuildContext context, int index) {
if (index == 0) {
if (show && (title != null)) {
return title!;
} else if (!show && empty != null) {
return Gap(height: height, child: empty!);
} else {
return Container();
}
} else {
return (animationType == null)
? itemBuilder(index - 1)
: XAnimation(
animationType: animationType,
child: itemBuilder(index - 1),
);
}
}),
)
],
),
);
},
),
),
);
}