Skip to content
This repository has been archived by the owner on Oct 3, 2024. It is now read-only.

add super key to allow for rebuilds #21

Open
abdelaziz-mahdy opened this issue Jul 27, 2022 · 0 comments · May be fixed by #30
Open

add super key to allow for rebuilds #21

abdelaziz-mahdy opened this issue Jul 27, 2022 · 0 comments · May be fixed by #30
Labels
enhancement Improvement to existing functionality

Comments

@abdelaziz-mahdy
Copy link

abdelaziz-mahdy commented Jul 27, 2022

using the package i had two pages with diffrent text controllers but same ui widget but the key not being available doesnt allow rebuild to occur

fix

const EasyAutocomplete(
      {Key? key,
      this.suggestions,
      this.asyncSuggestions,
      this.suggestionBuilder,
      this.progressIndicatorBuilder,
      this.controller,
      this.decoration = const InputDecoration(),
      this.onChanged,
      this.onSubmitted,
      this.inputFormatter = const [],
      this.initialValue,
      this.autofocus = false,
      this.textCapitalization = TextCapitalization.sentences,
      this.keyboardType = TextInputType.text,
      this.focusNode,
      this.cursorColor,
      this.inputTextStyle = const TextStyle(),
      this.suggestionTextStyle = const TextStyle(),
      this.suggestionBackgroundColor,
      this.debounceDuration = const Duration(milliseconds: 400),
      this.validator})
      : assert(onChanged != null || controller != null,
            'onChanged and controller parameters cannot be both null at the same time'),
        assert(!(controller != null && initialValue != null),
            'controller and initialValue cannot be used at the same time'),
        assert(
            suggestions != null && asyncSuggestions == null ||
                suggestions == null && asyncSuggestions != null,
            'suggestions and asyncSuggestions cannot be both null or have values at the same time'),
        super(key: key);
4inka pushed a commit that referenced this issue May 2, 2023
@4inka 4inka linked a pull request May 2, 2023 that will close this issue
@4inka 4inka added the enhancement Improvement to existing functionality label May 2, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement Improvement to existing functionality
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants