getPlaceHolder method

Widget getPlaceHolder([
  1. bool visible = true,
  2. bool isFirst = true,
  3. PlaceHolederScene scene = PlaceHolederScene.none,
  4. EdgeInsets inset = EdgeInsets.zero,
  5. EdgeInsets vInset = EdgeInsets.zero,
  6. String placeHolder = '暂无数据',
  7. TextStyle? placeHolderType,
  8. String placeHolderIcon = 'no_data',
  9. 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;
}