noData static method
Widget
noData(
- BuildContext context, {
- String? str,
- double? height,
- Color textColor = Colors.grey,
Implementation
static Widget noData(BuildContext context,
{String? str, double? height, Color textColor = Colors.grey}) {
height ??= MediaQuery.of(context).size.height * 0.8;
return Container(
width: MediaQuery.of(context).size.width,
height: height,
alignment: Alignment.center,
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
// Container(
// child: Icon(
// Icons.no_backpack,
// size: 60,
// color: textColor,
// )),
Container(
alignment: Alignment.center,
child: Text(
str ?? 'No data'.tr(),
style: TextStyle(color: textColor ?? Colors.grey),
)),
],
));
}