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

Error TublesItems swipe to fast #2

Closed
berthojoris opened this issue May 31, 2020 · 2 comments
Closed

Error TublesItems swipe to fast #2

berthojoris opened this issue May 31, 2020 · 2 comments

Comments

@berthojoris
Copy link

berthojoris commented May 31, 2020

Jadi kasusnya pas ane swipe TublesItems terlalu cepat sebelum setPolyLines berhasil di apply di item sebelumnya. Jadinya langsung jadi error di layar dia otomatis swipe gak berenti dan jika navigasi dipilih maka langsung error

Exception has occurred.
_AssertionError ('package:flutter/src/widgets/scroll_controller.dart': Failed assertion: line 110 pos 12: '_positions.isNotEmpty': ScrollController not attached to any scroll views.)

Mungkin sebaiknya di bikin block (TublesItems) pake CircularProgressIndicator sampai setPolyLines jalan dan route dibuatkan baru di release lagi TublesItems nya buat di swipe

Ane sih udah record video step2nya

@yusriltakeuchi
Copy link
Owner

Makasi laporan issuenya mas. Mungkin video yang direcord bisa disharing sebagai pembanding?

@berthojoris
Copy link
Author

Ane udah coba fix pake cara sendiri mas

Trik yg ane pake itu

  • Set loading indicator bool _loadingIndicator = false; di MapProvider
  • Di void setPolyLines ane set _loadingIndicator = true; trus di set false lagi setelah notifyListeners
  • Bikin 1 container buat loading messagenya
  • Widget _tublesChild ane bungkus pake widget Visibility lalu check provider statusnya false atau true lalu tampilin loading messagenya

Hasilnya : https://drive.google.com/file/d/1ALttKRv21Ij0euyct8Uix9dNe-O6gxB3/view

Jadi buat prevent scroll lagi ketika sedang finding route. Gak tau ini solusi bagus apa enggak ^_^

Baru mulai coba2 d flutter dan ketemu sample dari mas lalu coba2 oprek

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

No branches or pull requests

2 participants