UIGridBuilder<T>.extent constructor
const
UIGridBuilder<T>.extent ({
- Key? key,
- Axis scrollDirection = Axis.vertical,
- bool reverse = false,
- ScrollController? controller,
- bool? primary,
- ScrollPhysics? physics,
- ScrollBehavior? scrollBehavior,
- bool shrinkWrap = false,
- Key? center,
- double anchor = 0.0,
- double? cacheExtent,
- int? semanticChildCount,
- DragStartBehavior dragStartBehavior = DragStartBehavior.start,
- ScrollViewKeyboardDismissBehavior keyboardDismissBehavior = ScrollViewKeyboardDismissBehavior.manual,
- String? restorationId,
- Clip clipBehavior = Clip.hardEdge,
- required double maxCrossAxisExtent,
- required Widget builder(
- BuildContext context,
- T item
- required List<
T> source, - double mainAxisSpacing = 0.0,
- double crossAxisSpacing = 0.0,
- double childAspectRatio = 1.0,
- EdgeInsetsGeometry? padding,
- 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);