buildNoDataWidget function

Widget buildNoDataWidget(
  1. {BaseViewState viewStateModel,
  2. Widget child,
  3. GestureDetector onTap}
)

Implementation

Widget buildNoDataWidget({BaseViewState viewStateModel, Widget child, GestureDetector onTap}) => Container(
  height: double.infinity,
  alignment: Alignment.center,
  margin: getEdgeInsetsSymmetric(horizontal: defMargin),
  child: child??GestureDetector(
    onTap: onTap??(){
      viewStateModel.requestWhenError();
    },
    child: Column(
      mainAxisAlignment: MainAxisAlignment.center,
      crossAxisAlignment: CrossAxisAlignment.center,
      children: [

        Spacer(),
        SizedBox(
            width: getWidth(100),
            height: getHeight(100),
            child: ExtendedImage(image: AssetImage('assets/images/nodata.png', package: 'flutter_mylibrary'))
        ),
        Text(
          viewStateModel.httpError.message??UNKNOWN_MSG,
          style: TextStyle(fontSize: getSp(16), color: Colors.grey[400]),
        ),
        Spacer(),
      ],
    ),
  ),
);