NapaGridView constructor
NapaGridView({
- Axis scrollDirection = Axis.vertical,
- bool reverse = false,
- bool? primary,
- ScrollPhysics? physics,
- bool shrinkWrap = false,
- EdgeInsetsGeometry? padding,
- int crossAxisCount = 2,
- double mainAxisSpacing = 0.0,
- double crossAxisSpacing = 0.0,
- double childAspectRatio = 1.0,
- bool addAutomaticKeepAlives = true,
- bool addRepaintBoundaries = true,
- bool addSemanticIndexes = true,
- double? cacheExtent,
- List<
NapaWidget> ? children, - int? semanticChildCount,
- DragStartBehavior dragStartBehavior = .start,
- ScrollViewKeyboardDismissBehavior? keyboardDismissBehavior,
- Clip clipBehavior = .hardEdge,
- HitTestBehavior hitTestBehavior = .opaque,
Implementation
NapaGridView({
super.scrollDirection,
super.reverse,
super.primary,
super.physics,
super.shrinkWrap,
super.padding,
this.crossAxisCount = 2,
this.mainAxisSpacing = 0.0,
this.crossAxisSpacing = 0.0,
this.childAspectRatio = 1.0,
this.addAutomaticKeepAlives = true,
this.addRepaintBoundaries = true,
this.addSemanticIndexes = true,
super.cacheExtent,
List<NapaWidget>? children,
super.semanticChildCount,
super.dragStartBehavior,
super.keyboardDismissBehavior,
super.clipBehavior,
super.hitTestBehavior,
}) : children = children ?? [],
super(childMode: NapaChildMode.multipleChildren) {
properties.addAll([
InspectableProperty<int>(
name: 'crossAxisCount',
getValue: (obj) => crossAxisCount,
setValue: (obj, value, customData) => crossAxisCount = value,
clamp: (1, 100),
),
InspectableProperty<double>(
name: 'mainAxisSpacing',
getValue: (obj) => mainAxisSpacing,
setValue: (obj, value, customData) => mainAxisSpacing = value,
clamp: (0.0, double.infinity),
),
InspectableProperty<double>(
name: 'crossAxisSpacing',
getValue: (obj) => crossAxisSpacing,
setValue: (obj, value, customData) => crossAxisSpacing = value,
clamp: (0.0, double.infinity),
),
InspectableProperty<double>(
name: 'childAspectRatio',
getValue: (obj) => childAspectRatio,
setValue: (obj, value, customData) => childAspectRatio = value,
clamp: (0.0, double.infinity),
),
InspectableProperty<bool>(
name: 'addAutomaticKeepAlives',
getValue: (obj) => addAutomaticKeepAlives,
setValue: (obj, value, customData) => addAutomaticKeepAlives = value,
),
InspectableProperty<bool>(
name: 'addRepaintBoundaries',
getValue: (obj) => addRepaintBoundaries,
setValue: (obj, value, customData) => addRepaintBoundaries = value,
),
InspectableProperty<bool>(
name: 'addSemanticIndexes',
getValue: (obj) => addSemanticIndexes,
setValue: (obj, value, customData) => addSemanticIndexes = value,
),
]);
}