UIGridBuilder<T>.extent constructor

const UIGridBuilder<T>.extent({
  1. Key? key,
  2. Axis scrollDirection = Axis.vertical,
  3. bool reverse = false,
  4. ScrollController? controller,
  5. bool? primary,
  6. ScrollPhysics? physics,
  7. ScrollBehavior? scrollBehavior,
  8. bool shrinkWrap = false,
  9. Key? center,
  10. double anchor = 0.0,
  11. double? cacheExtent,
  12. int? semanticChildCount,
  13. DragStartBehavior dragStartBehavior = DragStartBehavior.start,
  14. ScrollViewKeyboardDismissBehavior keyboardDismissBehavior = ScrollViewKeyboardDismissBehavior.manual,
  15. String? restorationId,
  16. Clip clipBehavior = Clip.hardEdge,
  17. required double maxCrossAxisExtent,
  18. required Widget builder(
    1. BuildContext context,
    2. T item
    ),
  19. required List<T> source,
  20. double mainAxisSpacing = 0.0,
  21. double crossAxisSpacing = 0.0,
  22. double childAspectRatio = 1.0,
  23. EdgeInsetsGeometry? padding,
  24. bool alwaysShowScrollbar = false,
})

Creates a ScrollView that creates custom scroll effects using slivers.

See the ScrollView constructor for more details on these arguments.

Implementation

const UIGridBuilder.extent({
  Key? key,
  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,
  required double maxCrossAxisExtent,
  required this.builder,
  required this.source,
  this.mainAxisSpacing = 0.0,
  this.crossAxisSpacing = 0.0,
  this.childAspectRatio = 1.0,
  this.padding,
  this.alwaysShowScrollbar = false,
})  : 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),
      // ignore: prefer_initializing_formals
      maxCrossAxisExtent = maxCrossAxisExtent,
      crossAxisCount = null,
      super(key: key);