akvelon / flutter-code-editor

Flutter Code Editor is a multi-platform code editor supporting syntax highlighting, code blocks folding, autocompletion, read-only code blocks, hiding specific code blocks, themes, and more.
https://akvelon.com
Apache License 2.0
213 stars 54 forks source link

Autocomplete features #276

Open waseemdev opened 4 months ago

waseemdev commented 4 months ago

Hi, Here are two commits:

  1. I made Autocompleter abstract class and renamed default one to DefaultAutocompleter, so user can create its own implementation

    • also created SuggestionItem to be more customizable than just String, in some cases the displayed text in the popup list can be different than the actual code.
  2. made the popup list customizable so user can use his own widget using autocompleteListBuilder.

    • also moved these variables (caretPadding, autocompletePopupMaxHeight, autocompletePopupMaxWidth) to be fields in CodeEditor widget