getPlaceHolder method
Widget
getPlaceHolder([
- bool visible = true,
- bool isFirst = true,
- PlaceHolederScene scene = PlaceHolederScene.none,
- EdgeInsets inset = EdgeInsets.zero,
- EdgeInsets vInset = EdgeInsets.zero,
- String placeHolder = '暂无数据',
- TextStyle? placeHolderType,
- String placeHolderIcon = 'no_data',
- Function? callBack,
Implementation
Widget getPlaceHolder(
[bool visible = true,
bool isFirst = true,
PlaceHolederScene scene = PlaceHolederScene.none,
EdgeInsets inset = EdgeInsets.zero,
EdgeInsets vInset = EdgeInsets.zero,
String placeHolder = '暂无数据',
TextStyle? placeHolderType,
String placeHolderIcon = 'no_data',
Function? callBack]) {
return visible && !isFirst
? Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
SvgPicture.asset('assets/images/$placeHolderIcon.svg'),
if (placeHolder.isNotEmpty)
Tapped(
onTap: callBack,
child: Text(
placeHolder,
style: placeHolderType,
).marginOnly(top: vInset.top),
)
],
).paddingOnly(bottom: inset.bottom),
)
: this;
}