UIListView constructor

const UIListView({
  1. Key? key,
  2. required List<Widget> children,
  3. Axis scrollDirection = Axis.vertical,
  4. bool reverse = false,
  5. ScrollController? controller,
  6. bool? primary,
  7. ScrollPhysics? physics,
  8. ScrollBehavior? scrollBehavior,
  9. bool shrinkWrap = false,
  10. Key? center,
  11. double anchor = 0.0,
  12. double? cacheExtent,
  13. int? semanticChildCount,
  14. DragStartBehavior dragStartBehavior = DragStartBehavior.start,
  15. ScrollViewKeyboardDismissBehavior keyboardDismissBehavior = ScrollViewKeyboardDismissBehavior.manual,
  16. String? restorationId,
  17. Clip clipBehavior = Clip.hardEdge,
  18. bool alwaysShowScrollbar = false,
  19. EdgeInsetsGeometry? padding,
})

Creates a ScrollView that creates custom scroll effects using slivers.

See the ScrollView constructor for more details on these arguments.

Implementation

const UIListView({
  Key? key,
  required this.children,
  this.scrollDirection = Axis.vertical,
  this.reverse = false,
  this.controller,
  bool? primary,
  ScrollPhysics? physics,
  this.scrollBehavior,
  this.shrinkWrap = false,
  this.center,
  this.anchor = 0.0,
  this.cacheExtent,
  this.semanticChildCount,
  this.dragStartBehavior = DragStartBehavior.start,
  this.keyboardDismissBehavior = ScrollViewKeyboardDismissBehavior.manual,
  this.restorationId,
  this.clipBehavior = Clip.hardEdge,
  this.alwaysShowScrollbar = false,
  this.padding,
})  : assert(
        !(controller != null && primary == true),
        'Primary ScrollViews obtain their ScrollController via inheritance from a PrimaryScrollController widget. '
        'You cannot both set primary to true and pass an explicit controller.',
      ),
      assert(!shrinkWrap || center == null),
      assert(anchor >= 0.0 && anchor <= 1.0),
      assert(semanticChildCount == null || semanticChildCount >= 0),
      primary = primary ??
          controller == null && identical(scrollDirection, Axis.vertical),
      physics = physics ??
          (primary == true ||
                  (primary == null &&
                      controller == null &&
                      identical(scrollDirection, Axis.vertical))
              ? const AlwaysScrollableScrollPhysics()
              : null),
      super(key: key);