shareAsSticker static method

dynamic shareAsSticker({
  1. required String stickerPath,
  2. required String clintID,
  3. double posX = 0.2,
  4. double posY = 0.8,
  5. double rotation = 0.0,
  6. int widthDp = 200,
  7. int heightDp = 200,
})

this add sticker to camera in snapchat

Implementation

static shareAsSticker({
  required String stickerPath,
  required String clintID,
  double posX = 0.2,
  double posY = 0.8,
  double rotation = 0.0,
  int widthDp = 200,
  int heightDp = 200,
}) async {
  try {
    await platform.invokeMethod('addStickerToSnapchat', {
      'stickerPath': stickerPath,
      'clientId': clintID,
      'posX': posX,
      'posY': posY,
      'rotation': rotation,
      'widthDp': widthDp,
      'heightDp': heightDp,
    });
  } on PlatformException catch (e, s) {
    log("Failed with error : '${e.message}'. \n $s");
    throw (e, s);
  } catch (e, s) {
    log("Failed with error : $e \n $s");
    throw (e, s);
  }
}