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

Custumize the dropdown height #32

Open
alessioC42 opened this issue Apr 28, 2024 · 0 comments
Open

Custumize the dropdown height #32

alessioC42 opened this issue Apr 28, 2024 · 0 comments

Comments

@alessioC42
Copy link

Is there a way to customize the dropdown height? I am using the package without any suggestions, so the only suggestion shown is the input query. I searched for an API to adjust the container height but where not able to find it.
image

ChipsInput<String>(
    initialValue: ["init_testval"],
    enabled: true,
    autocorrect: false,
    decoration: InputDecoration(
      labelText: title,
    ),
    findSuggestions: (String query) {
      if (query.trim().isEmpty) return [];
      return [query];
    },
    onChanged: (data) {
      debugPrint(data.toString());
    },
    chipBuilder: (context, state, profile) {
      return InputChip(
        key: ObjectKey(profile),
        label: Text(profile),
        onDeleted: () => state.deleteChip(profile),
        materialTapTargetSize: MaterialTapTargetSize.shrinkWrap,
      );
    },
    suggestionBuilder: (context, query) {
      return ListTile(
          title: Text("add '$query'"),
      );
    },
  );
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

1 participant