StreakifyWidget constructor

const StreakifyWidget({
  1. Key? key,
  2. required int numberOfDays,
  3. required Map<int, bool> isDayTargetReachedMap,
  4. Color emptyColor = Colors.grey,
  5. Color filledColor = Colors.green,
  6. double height = 100,
  7. double width = 400,
  8. void onTap(
    1. int index
    )?,
  9. int crossAxisCount = 7,
  10. EdgeInsetsGeometry margin = const EdgeInsets.all(10),
  11. EdgeInsetsGeometry padding = const EdgeInsets.all(10),
  12. BorderRadius borderRadius = const BorderRadius.all(Radius.circular(8)),
  13. Color? borderColor,
  14. double borderWidth = 1,
  15. Axis scrollDirection = Axis.horizontal,
  16. ScrollPhysics scrollPhysics = const BouncingScrollPhysics(),
  17. double mainAxisSpacing = 2,
  18. double crossAxisSpacing = 2,
})

Implementation

const StreakifyWidget({
  super.key,
  required this.numberOfDays,
  required this.isDayTargetReachedMap,
  this.emptyColor = Colors.grey,
  this.filledColor = Colors.green,
  this.height = 100,
  this.width = 400,
  this.onTap,
  this.crossAxisCount = 7,
  this.margin = const EdgeInsets.all(10),
  this.padding = const EdgeInsets.all(10),
  this.borderRadius = const BorderRadius.all(Radius.circular(8)),
  this.borderColor,
  this.borderWidth = 1,
  this.scrollDirection = Axis.horizontal,
  this.scrollPhysics = const BouncingScrollPhysics(),
  this.mainAxisSpacing = 2,
  this.crossAxisSpacing = 2,
});