NapaScrollView constructor
NapaScrollView({
- NapaChildMode childMode = NapaChildMode.noChildren,
- Axis scrollDirection = Axis.vertical,
- bool reverse = false,
- bool? primary,
- ScrollPhysics? physics,
- ScrollBehavior? scrollBehavior,
- bool shrinkWrap = false,
- double anchor = 0.0,
- double? cacheExtent,
- int? semanticChildCount,
- SliverPaintOrder paintOrder = .firstIsTop,
- DragStartBehavior dragStartBehavior = .start,
- ScrollViewKeyboardDismissBehavior? keyboardDismissBehavior,
- Clip clipBehavior = .hardEdge,
- HitTestBehavior hitTestBehavior = .opaque,
Implementation
NapaScrollView({
super.childMode,
this.scrollDirection = Axis.vertical,
this.reverse = false,
this.primary,
this.physics,
this.scrollBehavior,
this.shrinkWrap = false,
this.anchor = 0.0,
this.cacheExtent,
this.semanticChildCount,
this.paintOrder = .firstIsTop,
this.dragStartBehavior = .start,
this.keyboardDismissBehavior,
this.clipBehavior = .hardEdge,
this.hitTestBehavior = .opaque,
}) {
properties.addAll([
InspectableProperty<double>(
name: 'anchor',
getValue: (obj) => anchor,
setValue: (obj, value, customData) => anchor = value,
),
InspectableProperty<double>(
name: 'cacheExtent',
nullable: true,
getValue: (obj) => cacheExtent,
setValue: (obj, value, customData) => cacheExtent = value,
),
InspectableProperty<Enum>(
name: 'clipBehavior',
getValue: (obj) => clipBehavior,
setValue: (obj, value, customData) => clipBehavior = value,
values: () => Clip.values,
),
InspectableProperty<Enum>(
name: 'dragStartBehavior',
getValue: (obj) => dragStartBehavior,
setValue: (obj, value, customData) => dragStartBehavior = value,
values: () => DragStartBehavior.values,
),
InspectableProperty<Enum>(
name: 'hitTestBehavior',
getValue: (obj) => hitTestBehavior,
setValue: (obj, value, customData) => hitTestBehavior = value,
values: () => HitTestBehavior.values,
),
InspectableProperty<Enum>(
name: 'keyboardDismissBehavior',
nullable: true,
getValue: (obj) => keyboardDismissBehavior,
setValue: (obj, value, customData) => keyboardDismissBehavior = value,
values: () => ScrollViewKeyboardDismissBehavior.values,
),
InspectableProperty<Enum>(
name: 'paintOrder',
getValue: (obj) => paintOrder,
setValue: (obj, value, customData) => paintOrder = value,
values: () => SliverPaintOrder.values,
),
InspectableProperty<bool>(
name: 'primary',
nullable: true,
getValue: (obj) => primary,
setValue: (obj, value, customData) => primary = value,
),
InspectableProperty<bool>(
name: 'reverse',
getValue: (obj) => reverse,
setValue: (obj, value, customData) => reverse = value,
),
InspectableProperty<Enum>(
name: 'scrollDirection',
getValue: (obj) => scrollDirection,
setValue: (obj, value, customData) => scrollDirection = value,
values: () => Axis.values,
),
InspectableProperty<int>(
name: 'semanticChildCount',
nullable: true,
getValue: (obj) => semanticChildCount,
setValue: (obj, value, customData) => semanticChildCount = value,
),
InspectableProperty<bool>(
name: 'shrinkWrap',
getValue: (obj) => shrinkWrap,
setValue: (obj, value, customData) => shrinkWrap = value,
),
]);
}