noRowsWidget property
Widget to be shown if there are no rows.
Create a widget like the one below and pass it to PlutoGrid.noRowsWidget.
class _NoRows extends StatelessWidget {
const _NoRows({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return IgnorePointer(
child: Center(
child: DecoratedBox(
decoration: BoxDecoration(
color: Colors.white,
border: Border.all(),
borderRadius: const BorderRadius.all(Radius.circular(5)),
),
child: Padding(
padding: const EdgeInsets.all(10),
child: Column(
mainAxisSize: MainAxisSize.min,
mainAxisAlignment: MainAxisAlignment.center,
children: const [
Icon(Icons.info_outline),
SizedBox(height: 5),
Text('There are no records'),
],
),
),
),
),
);
}
}
Implementation
final Widget? noRowsWidget;