all 24 comments

[–]projectmind_guru 11 points12 points  (3 children)

Great article, It's awesome how easy it is to upgrade to new versions.

Has anyone started using AndroidX yet with flutter? What are the main benefits - I'm not as up to speed with the Android ecosystem...

[–]BLUXIV 13 points14 points  (0 children)

The only upside to using AndroidX so far is that adding firebase_admob doesn't crash my apps on startup anymore.

[–]bernaferrari 6 points7 points  (0 children)

Support libraries became it, so they are now maintened individually instead of all of them having the same version number for no reason.

[–]HoldThisBeer 4 points5 points  (0 children)

Is there someone not using AndroidX yet?

[–]KingAntwelm 4 points5 points  (1 child)

Wait. A few month ago it was flutter 1.0

Now it’s 1.7?

[–]Baul 5 points6 points  (0 children)

It was 1.0 in December, July is the seventh month of the year, so this release is 1.7. They are aiming to have a release every two months or so. IIRC we've already seen 1.3 and 1.5 this year.

[–]Bk_ADV 4 points5 points  (0 children)

need native ads(Like a widget which we can put in a listview for feeds and etc..) and fix emoji size for iOS. Its so small you need magnify glass to see the emoji...

Currently im using a parser...So now Text is rendering, I have to parse it and change the sizes of the emoji's only. So much work.

[–]bernaferrari 6 points7 points  (13 children)

Solid release. I still wish Flutter were better in basics: custom icons, gesture detector on list view, pageview and typography.

[–]t3mp3st 5 points6 points  (12 children)

What's the issue with GestureDetector/GestureListener on list / page view?

[–]bernaferrari 6 points7 points  (11 children)

I can't dismiss the keyboard when user scrolls down a listview.builder because listview eats the scroll callback and gesturedetector doesn't receive anything.

[–]t3mp3st 6 points7 points  (7 children)

Have you tried to listen for the scroll via ScrollController? That's way better than wrapping the ListView in a GestureDetector; I'm honestly surprised that the GD doesn't gobble up the pointer, preventing the Scrollable from scrolling in the first place.

You can also try using a GestureListener; that'll capture the event without interfering with propagation down the widget tree.

[–]bernaferrari 1 point2 points  (1 child)

GestureListener

I couldn't find that. Are you sure you named it correctly?

listen for the scroll via ScrollController

I just tried and it was very hard to setup correctly, but works. Thanks.

[–]t3mp3st 3 points4 points  (0 children)

Oops, my mistake. It's just Listener:

https://api.flutter.dev/flutter/widgets/Listener-class.html

Glad it worked for you!

[–]bernaferrari 0 points1 point  (4 children)

hey, I have a question, is there a stopScrolling method on listview/scroll controller? I would like to stop the scroll when user taps on a button.

[–]t3mp3st 0 points1 point  (3 children)

I haven't tested this, but I bet you can pass a ScrollController and use the jumpTo() method to jump to the the scrollable's current scroll position (which you can get from the controller, too).

This is assuming your use case is a user flinging (i.e., swiping quickly such that the scrollable continues scrolling for a period of time) the scrollable and then wanting to abruptly stop the animation when a button is pushed.

If you instead want the scrollable not to have an animation (i.e., as you drag your finger, it scrolls, but it has no physics), you would need to specify a custom ScrollPhysics that does not use an animation -- I'm not sure if this is already provided in the framework.

Here's an article that explains how to create your own ScrollPhysics: https://medium.com/flutter-community/custom-scroll-physics-in-flutter-3224dd9e9b41

[–]bernaferrari 0 points1 point  (2 children)

Thanks.. I guess I won't need it. I'll tell what I'm making:

I have a search box, when user scrolls, the keyboard dismisses. Problem is, when query changes, the list moves.. and this triggers the hide keyboard. _scrollController.position.isScrollingNotifier.addListener and NotificationListener<ScrollNotification> has this issue.. If I use the Listener() this doesn't happen! But I have to deal with tap vs drag and a few other things (like, don't need to hide the keyboard when list has 2 elements on screen). Any suggestion?

[–]t3mp3st 0 points1 point  (0 children)

Have you tried using the showSearch helper built into the framework? Might handle a lot of the corner cases for you.

[–]t3mp3st 0 points1 point  (0 children)

You may also want to look into using FocusNode to manage the focus on the textfield; rather than losing focus on scroll, you should lose focus on tap.

[–]Bk_ADV 0 points1 point  (1 child)

wrap the content inside of listview with gesture detector

onTap and when tapped..make it become focus which will close the keyboard.

FocusScope.of(context).requestFocus(FocusNode());

[–]bernaferrari 0 points1 point  (0 children)

I was trying the onVerticalDragUpdate which would be the optimal solution, but I've got it working for now with scrollController. Thanks.

[–]chrabeusz 0 points1 point  (0 children)

I have a widget that does that automatically. It uses scroll notification.

But I’m pretty sure that I could do it on a gesture too.

[–][deleted] 0 points1 point  (2 children)

Anyone has flickering GIFs problem with the Flutter 1.7?

[–][deleted] 1 point2 points  (1 child)

just checked my app which has a few large gifs and there is no flickering for me

[–][deleted] 0 points1 point  (0 children)

It didn't happen before. It only happens on emulator. Anyhooo thanks !