You Can Create easily Flutter Table with this DataTable() Widget. Then You need columns and rows for the table. columns called DataColumn() and rows called DataRow(). DataColumn() insert label set Value and DataRow() insert DataCell() set Value.
DataTable() Code Example:
DataTable(
columns: [
DataColumn(
label: Text('ID',
style: TextStyle(
fontSize: 20,
fontWeight: FontWeight.w800,
color: Colors.red
),)
),
DataColumn(
label: Text('NAME',
style: TextStyle(
fontSize: 20,
fontWeight: FontWeight.w800,
color: Colors.red
),)
),
DataColumn(
label: Text('AGE',
style: TextStyle(
fontSize: 20,
fontWeight: FontWeight.w800,
color: Colors.red
),)
),
],
rows: [
DataRow(cells: [
DataCell(
Text(
'0001'
)
),
DataCell(
Text(
'Zisan'
)
),
DataCell(
Text(
'16'
)
),
]),
DataRow(cells: [
DataCell(
Text(
'0002'
)
),
DataCell(
Text(
'Riyan'
)
),
DataCell(
Text(
'21'
)
),
]),
DataRow(cells: [
DataCell(
Text(
'0003'
)
),
DataCell(
Text(
'Safiq'
)
),
DataCell(
Text(
'29'
)
),
]),
DataRow(cells: [
DataCell(
Text(
'0004'
)
),
DataCell(
Text(
'Faruk'
)
),
DataCell(
Text(
'36'
)
),
]),
DataRow(cells: [
DataCell(
Text(
'0001'
)
),
DataCell(
Text(
'Zisan'
)
),
DataCell(
Text(
'16'
)
),
]),
DataRow(cells: [
DataCell(
Text(
'0002'
)
),
DataCell(
Text(
'Riyan'
)
),
DataCell(
Text(
'21'
)
),
]),
DataRow(cells: [
DataCell(
Text(
'0003'
)
),
DataCell(
Text(
'Safiq'
)
),
DataCell(
Text(
'29'
)
),
]),
DataRow(cells: [
DataCell(
Text(
'0004'
)
),
DataCell(
Text(
'Faruk'
)
),
DataCell(
Text(
'36'
)
),
]),
DataRow(cells: [
DataCell(
Text(
'0001'
)
),
DataCell(
Text(
'Zisan'
)
),
DataCell(
Text(
'16'
)
),
]),
DataRow(cells: [
DataCell(
Text(
'0002'
)
),
DataCell(
Text(
'Riyan'
)
),
DataCell(
Text(
'21'
)
),
]),
DataRow(cells: [
DataCell(
Text(
'0003'
)
),
DataCell(
Text(
'Safiq'
)
),
DataCell(
Text(
'29'
)
),
]),
DataRow(cells: [
DataCell(
Text(
'0004'
)
),
DataCell(
Text(
'Faruk'
)
),
DataCell(
Text(
'36'
)
),
]),
DataRow(cells: [
DataCell(
Text(
'0001'
)
),
DataCell(
Text(
'Zisan'
)
),
DataCell(
Text(
'16'
)
),
]),
DataRow(cells: [
DataCell(
Text(
'0002'
)
),
DataCell(
Text(
'Riyan'
)
),
DataCell(
Text(
'21'
)
),
]),
DataRow(cells: [
DataCell(
Text(
'0003'
)
),
DataCell(
Text(
'Safiq'
)
),
DataCell(
Text(
'29'
)
),
]),
DataRow(cells: [
DataCell(
Text(
'0004'
)
),
DataCell(
Text(
'Faruk'
)
),
DataCell(
Text(
'36'
)
),
]),
])
How To Create Flutter DataTable:
- Boost WooCommerce Security: Set Up OTP Login in WordPressPasswords, while essential for security, can be vulnerable to hacking and breaches. To add an extra layer of protection for your WooCommerce store, consider implementing …
- How to Create Woocommerce Flutter App for WordPress freeAbsolutely! Let’s break down how to create a WooCommerce Flutter app for your WordPress store. Here’s a comprehensive outline of the process and essential considerations: …
- How to Add a Link to Your Facebook Story in 2024Facebook Stories have become an integral part of our social media experience, allowing us to share moments and updates with our friends and followers. But …
- Troubleshooting “Failed to download Laravel from dist” ErrorIf you encounter the “Failed to download Laravel from dist” error while working with Laravel 10, it is likely due to the absence of the …
- Solutions for “The file is too large for the destination file system” Error on PendriveIf you have ever encountered the frustrating error message “The file is too large for the destination file system” when trying to transfer files to …