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
268 stars 49 forks source link

Error when cacheExtent set to null #7

Closed AlexV525 closed 2 years ago

AlexV525 commented 4 years ago

By set cacheExtent to null, the error occurred when swiping between tab.

════════ Exception caught by rendering library ═════════════════════════════════════════════════════
The following NoSuchMethodError was thrown during performLayout():
The method '_greaterThanFromInteger' was called on null.
Receiver: null
Tried calling: _greaterThanFromInteger(2)

User-created ancestor of the error-causing widget was: 
  ExtendedTabBarView file:///Users/alex/Documents/OpenJMU/lib/pages/home/AppsPage.dart:203:20
When the exception was thrown, this was the stack: 
#0      Object.noSuchMethod (dart:core-patch/object_patch.dart:51:5)
#1      int.> (dart:core-patch/integers.dart:101:18)
#2      RenderSliverFixedExtentBoxAdaptor._calculateTrailingGarbage (package:flutter/src/rendering/sliver_fixed_extent_list.dart:158:45)
#3      RenderSliverFixedExtentBoxAdaptor.performLayout (package:flutter/src/rendering/sliver_fixed_extent_list.dart:189:35)
#4      RenderObject.layout (package:flutter/src/rendering/object.dart:1701:7)
zmtzawqlp commented 2 years ago

cacheExtent can't be null now