Have been trying to display data on a table, I used Datatable but my only 4 columns show, and the rest hidden. And most of the titles of columns show the error "Right overflowed by 12 pixels" but when I turn my device landscape it shows others and some still hidden. Below is my code:
body: SingleChildScrollView(
child: Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: <Widget>[
SizedBox(
height: 20,
),
Center(
child: Text(
'Rejected',
style: TextStyle(fontSize: 20, fontWeight: FontWeight.bold),
)),
SizedBox(
height: 10,
),
Material(
elevation: 3.0,
borderRadius: BorderRadius.circular(30.0),
color: colorBlue,
child: MaterialButton(
minWidth: MediaQuery.of(context).size.width,
padding: EdgeInsets.fromLTRB(20.0, 15.0, 20.0, 15.0),
onPressed: () async {
},child: Text(
"ADD NEW",
style: TextStyle(
color: Colors.white,
),
),
)
),
SizedBox(
height: 10,
),
DataTable(
columns: [
DataColumn(label: Text('No')),
DataColumn(label: Text('PO Ref')),
DataColumn(label: Text('Req Ref')),
DataColumn(label: Text('Requester')),
DataColumn(label: Text('Supplier')),
DataColumn(label: Text('Created')),
DataColumn(label: Text('By')),
DataColumn(label: Text('Delivery')),
DataColumn(label: Text('Status')),
],
rows: [
DataRow(cells: [
DataCell(Text('1')),
DataCell(Text('Arya')),
DataCell(Text('6')),
DataCell(Text('Arya')),
DataCell(Text('6')),
DataCell(Text('Arya')),
DataCell(Text('6')),
DataCell(Text('Arya')),
DataCell(Text('6')),
]),
DataRow(cells: [
DataCell(Text('2')),
DataCell(Text('John')),
DataCell(Text('9')),
DataCell(Text('John')),
DataCell(Text('9')),
DataCell(Text('Arya')),
DataCell(Text('6')),
DataCell(Text('Arya')),
DataCell(Text('6')),
]),
DataRow(cells: [
DataCell(Text('3')),
DataCell(Text('Tony')),
DataCell(Text('8')),
DataCell(Text('Tony')),
DataCell(Text('8')),
DataCell(Text('Arya')),
DataCell(Text('6')),
DataCell(Text('Arya')),
DataCell(Text('6')),
]),
],
),
]))
Is there a way I can make just this page landscape to see all my data without hiding and removing the overflowed error?