Widget.listView constructor Null safety

const Widget.listView(
  1. {Key? key,
  2. @Default(Axis.vertical) Axis scrollDirection,
  3. @Default(false) bool reverse,
  4. bool? primary,
  5. ScrollPhysics? physics,
  6. @Default(false) bool shrinkWrap,
  7. EdgeInsets? padding,
  8. double? itemExtent,
  9. Widget? prototypeItem,
  10. @Default(true) bool addAutomaticKeepAlives,
  11. @Default(true) bool addRepaintBoundaries,
  12. @Default(true) bool addSemanticIndexes,
  13. double? cacheExtent,
  14. @Default([]) List<Widget> children,
  15. int? semanticChildCount,
  16. String? restorationId,
  17. @Default(Clip.hardEdge) Clip clipBehavior}
)

Implementation

const factory Widget.listView({
  Key? key,
  @Default(Axis.vertical) Axis scrollDirection,
  @Default(false) bool reverse,
  bool? primary,
  ScrollPhysics? physics,
  @Default(false) bool shrinkWrap,
  EdgeInsets? padding,
  double? itemExtent,
  Widget? prototypeItem,
  @Default(true) bool addAutomaticKeepAlives,
  @Default(true) bool addRepaintBoundaries,
  @Default(true) bool addSemanticIndexes,
  double? cacheExtent,
  @Default([]) List<Widget> children,
  int? semanticChildCount,
  String? restorationId,
  @Default(Clip.hardEdge) Clip clipBehavior,
}) = ListView;