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:
- How to Conduct YouTube Keyword Research Easily?Introduction YouTube is the second largest search engine in the world, making it a valuable platform for content creators and businesses alike. To maximize your …
- How to upgrade the Dart SDK version in flutterIf you’re a Flutter developer, you know how important it is to stay up-to-date with the latest version of the Dart SDK. Upgrading the Dart …
- Why Do Advertisers Use Testimonials?In the ever-competitive business landscape, nurturing strong connections with your customers remains paramount for enhancing your credibility and positioning yourself as an industry authority. Establishing …
- How To Earn $5 Fast Method!Looking to boost your income by $25 in less than an hour? This isn’t the start of a clichéd sales pitch; it’s about discovering several …
- What Does BMF Mean On TikTok? Latest Social Media AcronymsIn the fast-paced world of social media, acronyms are the language of choice, enabling users to communicate swiftly without the need for lengthy phrases. While …