LindiStickerIcon constructor

LindiStickerIcon({
  1. required IconData icon,
  2. required Alignment alignment,
  3. IconType type = IconType.other,
  4. double iconSize = 14,
  5. Color iconColor = Colors.black,
  6. Color backgroundColor = Colors.white,
  7. IconData? lockedIcon,
  8. dynamic onTap()?,
})

Constructs a LindiStickerIcon with the provided properties.

icon is required and represents the main icon. alignment is required and defines the alignment of the sticker item. type defines the type of the icon item. iconColor sets the color of the main icon; defaults to Colors.black. backgroundColor sets the background color of the item; defaults to Colors.white. lockedIcon is an optional secondary icon if the item is lock. onTap is a callback that is called when the item is tapped.

Implementation

LindiStickerIcon(
    {required this.icon,
    required this.alignment,
    this.type = IconType.other,
    this.iconSize = 14,
    this.iconColor = Colors.black,
    this.backgroundColor = Colors.white,
    this.lockedIcon,
    this.onTap})
    : assert(!(lockedIcon != null && type != IconType.lock),
          'Locked Icon only can be used when type is IconType.lock'),
      assert(!(onTap != null && type == IconType.resize),
          'onTap function will not be called when type is IconType.lock');