diff --git a/lib/src/infinite_list.dart b/lib/src/infinite_list.dart index d71e781..4c53da8 100644 --- a/lib/src/infinite_list.dart +++ b/lib/src/infinite_list.dart @@ -32,6 +32,7 @@ class InfiniteList extends StatelessWidget { this.cacheExtent, this.debounceDuration = defaultDebounceDuration, this.reverse = false, + this.shrinkWrap = false, this.isLoading = false, this.hasError = false, this.hasReachedMax = false, @@ -76,6 +77,12 @@ class InfiniteList extends StatelessWidget { /// {@endtemplate} final bool reverse; + /// {@template shrinkWrap} + /// Indicates if the extent of the [ScrollView] in the [scrollDirection] + /// should be determined by the contents being viewed. + /// {@endtemplate} + final bool shrinkWrap; + /// {@template item_count} /// The amount of items that need to be rendered by the [itemBuilder]. /// @@ -200,6 +207,7 @@ class InfiniteList extends StatelessWidget { return CustomScrollView( scrollDirection: scrollDirection, reverse: reverse, + shrinkWrap: shrinkWrap, controller: scrollController, physics: physics, cacheExtent: cacheExtent,