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

🐛 ListView => ListTile.selectable unexpected behaviour. #1144

Open
DevMensIT opened this issue Nov 22, 2024 · 2 comments
Open

🐛 ListView => ListTile.selectable unexpected behaviour. #1144

DevMensIT opened this issue Nov 22, 2024 · 2 comments

Comments

@DevMensIT
Copy link

Describe the bug
when i hit enter its not getting to next focus but when i tried to select twice then it goes to next focus.
i already use onSelectionChange to next focus but it calls when first i check then uncheck then check again (3x) after that focus on next tile

Expected behavior
it suppose to work when i select inside listview then suppose to go focus next tile.

Screenshots

2024-11-22.09-40-39.mp4

Code

 ListView.builder(
          itemCount: names.length,
          itemBuilder: (context, index) {
            final name = names[index];
            return ListTile.selectable(
              title: Text(name),
              onSelectionChange: (value) {
                if (value) FocusScope.of(context).nextFocus();
              },
              // selected: selectedNames == name,
              // onSelectionChange: (v) => setState(() => selectedNames = names),
            );
          });

@bdlukaa
Copy link
Owner

bdlukaa commented Nov 22, 2024

The "next focus" is the Checkbox. What happens when you call nextFocus() twice?

@DevMensIT
Copy link
Author

DevMensIT commented Nov 22, 2024

The "next focus" is the Checkbox. What happens when you call nextFocus() twice?

its working well with twice call....

one more :
when i use contentPadding : EdgeInsets.zero ()
but still showing padding much
and even check box size property is missing or compact icon is missing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants