kphanipavan / modal_progress_hud_nsn

Modal animated loading overlay package for long running tasks.
https://pub.dev/packages/modal_progress_hud_nsn
MIT License
6 stars 10 forks source link

Screen Jump to top on progressIndicator call #2

Closed Jimmyjai closed 1 year ago

Jimmyjai commented 2 years ago

I was using modal_progress_hud, which doesn't have null safety. So, I have updated it with modal_progress_hud_nsn.

Issue: For example, I have a form with 10 textboxes and a submit button. After filling all the textboxes, I must be on the bottom of the screen. On submit hit, _setState(() { saving = true; }); Which calls the progressIndicator, and the screen automatically jumps to the top.

But this issue is not there in modal_progress_hud.

Please help me out.

kphanipavan commented 2 years ago

Are you using the Form class or the listView class?

Listview has a passable physics parameter. Try switching between NeverScrollablePhysics and AlwaysScrollablePhysics.

Also try using modal_progress_hud_alt. Its the same as the original package with null safety, with support for more platforms than mine.

Share your results here...

TQ

Edit: Markdown Syntax

minhdanh commented 2 years ago

I'm having this issue as well with current version

kphanipavan commented 2 years ago

Listview has a passable physics parameter. Try switching between NeverScrollablePhysics and AlwaysScrollablePhysics.

Have you tried this fix?

minhdanh commented 2 years ago

I already tried that but that didn't solve the issue :"(

kphanipavan commented 2 years ago

Can you post the code snippet here?

I will try to replicate it on my end...

minhdanh commented 1 year ago

Hi @kphanipavan, I'm still seeing this behavior with the latest version as of now. I've create a repo to reproduce this. Please see here: https://github.com/minhdanh/test_hud Basically it's the code from your example with just this addition: https://github.com/minhdanh/test_hud/blob/master/lib/main.dart#L192 After tapping Login button the screen is scrolled to the top of the screen.

minhdanh commented 1 year ago

Hi @kphanipavan I've created a PR to fix this issue: #12 Please have a look. Thank you!

kphanipavan commented 1 year ago

Hi @minhdanh

Thank you for the contribution, it is working as intended.

Closing this issue for now, open if necessary.

~Pvn