i want to have first row locked/fixed in Flutter. How can i do that?
child: Container(
child: ListView(
shrinkWrap: true,
children: [
Column(
children: [
SingleChildScrollView(
scrollDirection: Axis.horizontal,
child: DataTable(
CodePudding user response:
Try this layout
Scaffold(
body: Container(
height: MediaQuery.of(context).size.height,
width: MediaQuery.of(context).size.width,
child : Column(
children: [
Row(
children:[
Text("Some text here"),
]
),
Expanded(
child: SingleChildScrollView()
)
]
)
)
CodePudding user response:
Unfortunately, you cannot do that in DataTable. I would suggest you try using DataTable2 package, which allows fixed table row headers and columns as well.
Click here for sample code.
CodePudding user response:
you can do that in horizontal_data_table. I would suggest you try using horizontal_data_table package, which allows fixed table row headers and columns as well.