Questions tagged [flutter-datatable]

DataTable widget allows you to build a table that automatically sizes its columns according to what’s actually in the cells.

For more info on DataTable, watch this video By Flutter: https://youtu.be/ktTajqbhIcY

32 questions
8
votes
2 answers

How to change background color of Flutter DataTable on hover over rows?

I have a DataTable in my scene. I want to change the background color of rows when the user hovers over any row. I found several samples on flutter.dev but none are working. For instance, look at the following code (full code). Although I have green…
Hesam
  • 52,260
  • 74
  • 224
  • 365
3
votes
2 answers

Flutter DataTable limit width to screen width & wrap text

This is my DataTable: SizedBox( height: 200, child: SingleChildScrollView( scrollDirection: Axis.vertical, child: DataTable( columnSpacing: 0, columns: const [ DataColumn(label: Text("Domain")), …
PlutoHDDev
  • 540
  • 7
  • 25
1
vote
1 answer

How do I change the color of the sorting icon in a DataTable?

Widget DataTable has an built-in icon for sorting indication How can I change the color or even the icon? Scrollbar( controller: _scrollController, child: SingleChildScrollView( …
Tony Lam
  • 205
  • 8
1
vote
1 answer

what is the right/efficient way to update List if I add a new item for DB in Flutter

Currently if there is a list in db, and I wanna add a new item, I have to use following method: List contentsList = []; updateList() async{ contentsList.clear(); ProfilesProvider profilesProvider = ProfilesProvider(); …
matti peter
  • 150
  • 10
1
vote
1 answer

How to populate DataTable widget with data fetched from my API?

So I try the code from following stack overflow answer How to populate DataTable with JSON API in flutter, and changed that as per my need but DataTable is not populated and displaying my error message "No data found...". I'm adding whatever I've…
1
vote
1 answer

Flutter app state not mounted (setState) on click inside DataTable

Whenever I click within a DataRow and try to setState(), apparently the main app state is not mounted. If anyone can point me into the right direction as to why this happens, I would greatly appreciate it. I really need to be able to update the app…
Savado
  • 557
  • 1
  • 3
  • 18
1
vote
2 answers

How to sum rows in Flutter Data Table after every week of data?

I'm writing a simple timeclock for my employees in Flutter. I display their timecard in a Flutter Data Table, like this: DataTable( columns: const [ DataColumn(label: Text('Employee')), DataColumn(label: Text('Clock-In')), …
SqueezeOJ
  • 441
  • 7
  • 17
1
vote
1 answer

Problem getting Flutter DataTable border radius on table borders

I have a DataTable that I want to add a border radius to. After reading up on this, I added the DataTable to a Container widget. It works great when I do not add a background color to my headings. When doing this, the entire table's color is…
1
vote
0 answers

Flutter DataTable column autoresize to prevent overflow

I've got a DataTable in an app like this: Widget build(BuildContext context) { return FutureBuilder>( future: budgetApiHelper.getBudgetCategories(), initialData: [], builder: (context, snapshot) { if…
derekantrican
  • 1,891
  • 3
  • 27
  • 57
1
vote
2 answers

How to use local Sqlite database efficiency in Dart/Flutter

I'm a newbie in flutter and android application. I have developed a quiz app. It loading a Json data from Firebase and i want to save it to Sqlite(for query fast purpose). My problem is Json data quite complicated, it have multi data array…
Littlepea
  • 155
  • 7
0
votes
0 answers

Flutter DataRow.key does not show key for find.byKey Widget Testing

I'm writing widget tests for a Flutter app. I have a DataTable that I'm trying to test, but when I try to find a specific DataRow by the ValueKey I've assigned, I get the error: Expected: exactly one matching node in the widget tree Actual:…
bubba
  • 83
  • 6
0
votes
1 answer

Connect the flutter with MySQL database with Nodejs API?

I am trying to make connection with flutter with MySQL, Nodejs API. and I did not any idea regarding that, and even there is no any video available on youtube for flutter database connectivity with mysql and node api. I don't have any idea regarding…
0
votes
0 answers

How to restrain DataTable to just expand on max height or lower

I have a layout in Flutter where I have a DataTable which should just expand into its contents, or to definite max height (in this example it would be 200). The DataTable definition is contained into two SingleChildScrollViews scrolling height and…
0
votes
1 answer

Flutter dynamic DataTable

I have a DataTable that I want to make dynamic based on the user's date selection. The number of columns will therefore differ. My current code creates a List from a Firestore collection for the headers and another for the Row/Cell values. When…
ben
  • 81
  • 8
0
votes
0 answers

PaginatedDataTable not scrolling horizontally

I've tried in many ways to make the layout user friendly. now I'm having issue with PaginateDatatable is not scrolling horizontally and causes overflow to be hidden like in image. Note: I'm trying to scroll rows area without scrolling Rows per page:…
Poula Adel
  • 609
  • 1
  • 10
  • 33
1
2 3