FirestoreAnimatedGrid<T> constructor

FirestoreAnimatedGrid<T>({
  1. Key? key,
  2. required Query<T> query,
  3. required FirestoreAnimatedGridItemBuilder<T> itemBuilder,
  4. required int crossAxisCount,
  5. double mainAxisSpacing = 4.0,
  6. double crossAxisSpacing = 4.0,
  7. double childAspectRatio = 1.0,
  8. dynamic onLoaded(
    1. QuerySnapshot<T>
    )?,
  9. dynamic filter,
  10. Widget? defaultChild,
  11. ErrorChildBuilder? errorChild,
  12. Widget? emptyChild,
  13. Axis scrollDirection = Axis.vertical,
  14. bool reverse = false,
  15. bool debug = false,
  16. bool linear = false,
  17. ScrollController? controller,
  18. bool? primary,
  19. ScrollPhysics? physics,
  20. bool shrinkWrap = false,
  21. EdgeInsets? padding,
  22. Duration duration = const Duration(milliseconds: 300),
})

Creates a scrolling container that animates items when they are inserted or removed.

Implementation

FirestoreAnimatedGrid({
  Key? key,
  required this.query,
  required this.itemBuilder,
  required this.crossAxisCount,
  this.mainAxisSpacing = 4.0,
  this.crossAxisSpacing = 4.0,
  this.childAspectRatio = 1.0,
  this.onLoaded,
  this.filter,
  this.defaultChild,
  this.errorChild,
  this.emptyChild,
  this.scrollDirection = Axis.vertical,
  this.reverse = false,
  this.debug = false,
  this.linear = false,
  this.controller,
  this.primary,
  this.physics,
  this.shrinkWrap = false,
  this.padding,
  this.duration = const Duration(milliseconds: 300),
})  : assert(crossAxisCount > 0),
      assert(mainAxisSpacing >= 0),
      assert(crossAxisSpacing >= 0),
      assert(childAspectRatio > 0),
      super(key: key);