Widget.gridView constructor Null safety

const Widget.gridView(
  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. required SliverGridDelegate gridDelegate,
  9. @Default(true) bool addAutomaticKeepAlives,
  10. @Default(true) bool addRepaintBoundaries,
  11. @Default(true) bool addSemanticIndexes,
  12. double? cacheExtent,
  13. @Default([]) List<Widget> children,
  14. int? semanticChildCount,
  15. @Default(Clip.hardEdge) Clip clipBehavior,
  16. @Default(ScrollViewKeyboardDismissBehavior.manual) ScrollViewKeyboardDismissBehavior keyboardDismissBehavior,
  17. String? restorationId}
)

Implementation

const factory Widget.gridView({
  Key? key,
  @Default(Axis.vertical) Axis scrollDirection,
  @Default(false) bool reverse,
  bool? primary,
  ScrollPhysics? physics,
  @Default(false) bool shrinkWrap,
  EdgeInsets? padding,
  required SliverGridDelegate gridDelegate,
  @Default(true) bool addAutomaticKeepAlives,
  @Default(true) bool addRepaintBoundaries,
  @Default(true) bool addSemanticIndexes,
  double? cacheExtent,
  @Default([]) List<Widget> children,
  int? semanticChildCount,
  @Default(Clip.hardEdge) Clip clipBehavior,
  @Default(ScrollViewKeyboardDismissBehavior.manual)
      ScrollViewKeyboardDismissBehavior keyboardDismissBehavior,
  String? restorationId,
}) = GridView;