fluttercandies / extended_tabs

A powerful official extension library of Tab/TabBar/TabView, which support to scroll ancestor or child Tabs when current is overscroll, and set scroll direction and cache extent.
https://fluttercandies.github.io/extended_tabs/
MIT License
271 stars 49 forks source link

Calling null when set cacheExtent to null. #3

Closed AlexV525 closed 5 years ago

AlexV525 commented 5 years ago

As cacheExtent provide null setter to make all pages cached, the code didn't handle null properly, as the code goes: https://github.com/fluttercandies/extended_tabs/blob/2be7c5212b14222daf3ab3af72b132287c916b82/lib/src/page_view.dart#L222 null value will failed at here and the code will never goes to else. But after added widget.cacheExtent != null, it will goes wrong with Infinity or NaN toInt with the value set to double.infinity, so it needs some further handle.