NapaStack constructor

NapaStack({
  1. AlignmentGeometry alignment = AlignmentDirectional.topStart,
  2. StackFit fit = .loose,
  3. Clip clipBehavior = .hardEdge,
  4. List<NapaWidget>? children,
})

Implementation

NapaStack({
  this.alignment = AlignmentDirectional.topStart,
  this.fit = .loose,
  this.clipBehavior = .hardEdge,
  super.children,
}) {
  properties.addAll([
    InspectableProperty<AlignmentGeometry>(
      name: 'alignment',
      getValue: (Inspectable obj) => alignment,
      setValue: (obj, value, customData) => alignment = value,
    ),
    InspectableProperty<Enum>(
      name: 'clipBehavior',
      getValue: (obj) => clipBehavior,
      setValue: (obj, value, customData) => clipBehavior = value,
      values: () => Clip.values,
    ),
    InspectableProperty<Enum>(
      name: 'fit',
      getValue: (obj) => fit,
      setValue: (obj, value, customData) => fit = value,
      values: () => StackFit.values,
    ),
    InspectableProperty<Enum>(
      name: 'textDirection',
      nullable: true,
      getValue: (obj) => textDirection,
      setValue: (obj, value, customData) => textDirection = value,
      values: () => TextDirection.values,
    ),

  ]);
}