addEmailPusher method
add another http pusher to the notification system
Implementation
Future<bool> addEmailPusher(
String deviceName,
String appName,
String email,
String? lang,
) {
final tmp1 = deviceName;
final tmp5 = appName;
final tmp9 = email;
final tmp13 = lang;
var tmp0 = 0;
var tmp2 = 0;
var tmp3 = 0;
var tmp4 = 0;
var tmp6 = 0;
var tmp7 = 0;
var tmp8 = 0;
var tmp10 = 0;
var tmp11 = 0;
var tmp12 = 0;
var tmp14 = 0;
var tmp16 = 0;
var tmp17 = 0;
var tmp18 = 0;
tmp0 = _box.borrow();
final tmp1_0 = utf8.encode(tmp1);
tmp3 = tmp1_0.length;
final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
tmp2_1.setAll(0, tmp1_0);
tmp2 = tmp2_0.address;
tmp4 = tmp3;
final tmp5_0 = utf8.encode(tmp5);
tmp7 = tmp5_0.length;
final ffi.Pointer<ffi.Uint8> tmp6_0 = _api.__allocate(tmp7 * 1, 1);
final Uint8List tmp6_1 = tmp6_0.asTypedList(tmp7);
tmp6_1.setAll(0, tmp5_0);
tmp6 = tmp6_0.address;
tmp8 = tmp7;
final tmp9_0 = utf8.encode(tmp9);
tmp11 = tmp9_0.length;
final ffi.Pointer<ffi.Uint8> tmp10_0 = _api.__allocate(tmp11 * 1, 1);
final Uint8List tmp10_1 = tmp10_0.asTypedList(tmp11);
tmp10_1.setAll(0, tmp9_0);
tmp10 = tmp10_0.address;
tmp12 = tmp11;
if (tmp13 == null) {
tmp14 = 0;
} else {
tmp14 = 1;
final tmp15 = tmp13;
final tmp15_0 = utf8.encode(tmp15);
tmp17 = tmp15_0.length;
final ffi.Pointer<ffi.Uint8> tmp16_0 = _api.__allocate(tmp17 * 1, 1);
final Uint8List tmp16_1 = tmp16_0.asTypedList(tmp17);
tmp16_1.setAll(0, tmp15_0);
tmp16 = tmp16_0.address;
tmp18 = tmp17;
}
final tmp19 = _api._clientAddEmailPusher(
tmp0,
tmp2,
tmp3,
tmp4,
tmp6,
tmp7,
tmp8,
tmp10,
tmp11,
tmp12,
tmp14,
tmp16,
tmp17,
tmp18,
);
final tmp21 = tmp19;
final ffi.Pointer<ffi.Void> tmp21_0 = ffi.Pointer.fromAddress(tmp21);
final tmp21_1 =
_Box(_api, tmp21_0, "__Client_add_email_pusher_future_drop");
tmp21_1._finalizer = _api._registerFinalizer(tmp21_1);
final tmp20 = _nativeFuture(tmp21_1, _api.__clientAddEmailPusherFuturePoll);
return tmp20;
}