Is there a possible way to remove card on paginated data table on flutter?
Asked
Active
Viewed 91 times
1 Answers
0
You can remove the card on your paginated data table by wrapping it with a theme widget and setting the theme of the card to have zero elevation
class CustomDataTable extends StatelessWidget {
final DataTableSource source;
final List<DataColumn> columns;
const CustomDataTable(
{super.key, required this.columns, required this.source});
@override
Widget build(BuildContext context) {
return Theme(
data: Theme.of(context).copyWith(
cardTheme: const CardTheme(
color: Colors.transparent,
elevation: 0.0, //removes the card
),
dividerTheme: const DividerThemeData(
color: Colors.transparent,
thickness: 0.0, // removes the row dividers
),
),
child: PaginatedDataTable(
columns: columns,
source: source,
),
);
}
}

John Bryan
- 151
- 2
- 4