FavouriteWidget constructor

const FavouriteWidget({
  1. Key? key,
  2. required bool isLiked,
  3. required VoidCallback onAdd,
  4. required VoidCallback onRemove,
  5. Color? iconColor,
  6. double? iconSize,
  7. Alignment? alignment,
  8. bool disablePadding = false,
  9. Duration snackDuration = const Duration(seconds: 3),
  10. bool enableHaptic = true,
  11. required String toastType,
})

Implementation

const FavouriteWidget({
  Key? key,
  required this.isLiked,
  required this.onAdd,
  required this.onRemove,
  this.iconColor,
  this.iconSize,
  this.alignment,
  this.disablePadding = false,
  this.snackDuration = const Duration(seconds: 3),
  this.enableHaptic = true,
  required this.toastType,
}) : super(key: key);