bosskmk / pluto_grid

PlutoGrid is a dataGrid for flutter that can be controlled by the keyboard on desktop and web. Of course, it works well on Android and IOS.

Home Page:https://pluto.weblaze.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to pass Future<List> to FutureBuilder()/ListView.builder in createHeader ?

d-adamkiewicz opened this issue · comments

- void _handlePubEventButton() {
+ void _handlePubEventButton(String filterValue) {

- filterValue: 'a',
+ filterValue: filterValue,



- createHeader: (e) => TextButton(
-              onPressed: _handlePubEventButton,
-              child: const Text('put event'),
-            ),
+ createHeader: (e) => Row(children: [
+            for (var k in ['a', 'b', c.'])
+             TextButton(
+               onPressed: () => _handlePubEventButton(k),
+                child: Text(k),
+             )
+          ]),

Great widget!!!. As you can see I modified script a bit to be able to use List to create Row of buttons - it seems to work fine. but I failed to use Future<List> and FutureBuilder()/ListViev.builder() to do the same - is this doable?

Originally posted by @d-adamkiewicz in #438 (comment)

This issue is stale because it has been open for 30 days with no activity.

This issue was closed because it has been inactive for 14 days since being marked as stale.