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.
https://pluto.weblaze.dev
MIT License
636 stars 290 forks source link

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

Closed d-adamkiewicz closed 3 months ago

d-adamkiewicz commented 5 months ago
- 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 https://github.com/bosskmk/pluto_grid/issues/438#issuecomment-1910093588_

github-actions[bot] commented 4 months ago

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

github-actions[bot] commented 3 months ago

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