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

Added direction to allow the list to grow up #28

Merged
merged 3 commits into from
Jan 23, 2019
Merged

Added direction to allow the list to grow up #28

merged 3 commits into from
Jan 23, 2019

Conversation

KaYBlitZ
Copy link
Contributor

I used the code from yohom and Rassell to create a new attribute direction. This allows the list to grow up or down. It is by default down.

The list will resize to be just below the notch of the device if applicable. It will auto-resize during orientation changes as well.

Let me know what you guys think and see if you can break it ;)

@sjmcdowall
Copy link
Collaborator

sjmcdowall commented Jan 21, 2019 via email

lib/flutter_typeahead.dart Outdated Show resolved Hide resolved
lib/flutter_typeahead.dart Outdated Show resolved Hide resolved
lib/flutter_typeahead.dart Show resolved Hide resolved

OverlayEntry _overlayEntry;

bool _isOpened = false;
bool widgetMounted = true;
double maxHeight = defaultHeight;

_SuggestionsBoxController(this.context);
_SuggestionsBoxController(this.context, this.direction);

open() {
if (this._isOpened) return;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also the test before (and for some reason I can't comment on that line) in close() could be better done (without the assert) with

    this._overlayEntry?.remove();

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Which line is this?

Copy link
Contributor Author

@KaYBlitZ KaYBlitZ left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I fixed the assert. It should only allow down & up. No left, right, or null. As for the pubspec and the CHANGELOG files, I was looking at the previous commits and Abdul seems to modify these after merging into the develop branch. Then he brings everything back into master.

Copy link
Collaborator

@sjmcdowall sjmcdowall left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good -- see my comment (suggestion) about the line # I was referring too -- maybe because it wasn't changed code it wouldn't let me comment in the code .. so that's far ..

@AbdulRahmanAlHamali
Copy link
Owner

Great work @KaYBlitZ! Unfortunately I won't be able to review your work before the weekend, so if you guys are sure if the code you can go ahead and merge it :)

@KaYBlitZ KaYBlitZ changed the base branch from master to develop January 23, 2019 14:54
@KaYBlitZ KaYBlitZ merged commit 437147c into AbdulRahmanAlHamali:develop Jan 23, 2019
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

Successfully merging this pull request may close these issues.

3 participants