Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
d-adamkiewicz opened this issue Jan 26, 2024 · 2 comments
Labels
stale This issue is stale because it has been open for 30 days with no activity.

Comments

@d-adamkiewicz
Copy link

d-adamkiewicz commented Jan 26, 2024

- 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)

Copy link

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

@github-actions github-actions bot added the stale This issue is stale because it has been open for 30 days with no activity. label Feb 25, 2024
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale This issue is stale because it has been open for 30 days with no activity.
Projects
None yet
Development

No branches or pull requests

1 participant