Search code examples
flutterdart

Flutter/Dart Datatable or Sliver with fixed header and fixed row header


So I want to create a data view for a Flutter app that incorporates a datatable or sliver (or anything really) with a fixed header when scrolling vertically and also fixed row headers when scrolling horizontally. I tried messing around with the data_table_2 and table_sticky_headers plugins, but they don't do exactly what I want. I'm hoping someone can point me in the right direction or help come up with a solution.

Here's a gif image showing what I want to achieve...

Data View Idea


Solution

  • I figured it out. It was pretty simple actually, using nested Stack's and SingleChildScrollView's. No plug-ins required.

    Here's a link to the example source code if anyone is interested...

    https://github.com/jstoyles/flutter_data_view_idea