AnimatedGridView constructor

const AnimatedGridView({
  1. required List<Widget> children,
  2. required int crossAxisCount,
  3. Key? key,
  4. double mainAxisSpacing = 0.0,
  5. double crossAxisSpacing = 0.0,
  6. double childAspectRatio = 1.0,
  7. double? mainAxisExtent,
  8. double extendedSpaceBetween = 30,
  9. int duration = 200,
  10. Axis scrollDirection = Axis.vertical,
  11. bool reverse = false,
  12. ScrollController? controller,
  13. bool primary = false,
  14. ScrollPhysics? physics,
  15. bool shrinkWrap = false,
  16. EdgeInsetsGeometry? padding,
  17. double? itemExtent,
  18. bool addAutomaticKeepAlives = true,
  19. bool addRepaintBoundaries = true,
  20. bool addSemanticIndexes = true,
  21. double? cacheExtent,
  22. Widget? prototypeItem,
  23. int? semanticChildCount,
  24. DragStartBehavior dragStartBehavior = DragStartBehavior.start,
  25. ScrollViewKeyboardDismissBehavior keyboardDismissBehavior = ScrollViewKeyboardDismissBehavior.manual,
  26. String? restorationId,
  27. Clip clipBehavior = Clip.hardEdge,
  28. ScrollBehavior? scrollBehavior,
  29. Key? center,
  30. double anchor = 0.0,
})

Implementation

const AnimatedGridView({
  required this.children,
  required this.crossAxisCount,
  Key? key,
  this.mainAxisSpacing = 0.0,
  this.crossAxisSpacing = 0.0,
  this.childAspectRatio = 1.0,
  this.mainAxisExtent,
  this.extendedSpaceBetween = 30,
  this.duration = 200,
  this.scrollDirection = Axis.vertical,
  this.reverse = false,
  this.controller,
  this.primary = false,
  this.physics,
  this.shrinkWrap = false,
  this.padding,
  this.itemExtent,
  this.addAutomaticKeepAlives = true,
  this.addRepaintBoundaries = true,
  this.addSemanticIndexes = true,
  this.cacheExtent,
  this.prototypeItem,
  this.semanticChildCount,
  this.dragStartBehavior = DragStartBehavior.start,
  this.keyboardDismissBehavior = ScrollViewKeyboardDismissBehavior.manual,
  this.restorationId,
  this.clipBehavior = Clip.hardEdge,
  this.scrollBehavior,
  this.center,
  this.anchor = 0.0,
})  : assert(crossAxisCount != null && crossAxisCount > 0),
      assert(mainAxisSpacing != null && mainAxisSpacing >= 0),
      assert(crossAxisSpacing != null && crossAxisSpacing >= 0),
      assert(childAspectRatio != null && childAspectRatio > 0),
      super(key: key);