newColorizeBuilder method

ColorizeBuilder newColorizeBuilder(
  1. int? color,
  2. int? background,
  3. int? link
)

create a colorize builder

Implementation

ColorizeBuilder newColorizeBuilder(int? color, int? background, int? link) {
  final tmp0 = color;
  final tmp4 = background;
  final tmp8 = link;
  var tmp1 = 0;
  var tmp3 = 0;
  var tmp5 = 0;
  var tmp7 = 0;
  var tmp9 = 0;
  var tmp11 = 0;
  if (tmp0 == null) {
    tmp1 = 0;
  } else {
    tmp1 = 1;
    final tmp2 = tmp0;
    tmp3 = tmp2;
  }
  if (tmp4 == null) {
    tmp5 = 0;
  } else {
    tmp5 = 1;
    final tmp6 = tmp4;
    tmp7 = tmp6;
  }
  if (tmp8 == null) {
    tmp9 = 0;
  } else {
    tmp9 = 1;
    final tmp10 = tmp8;
    tmp11 = tmp10;
  }
  final tmp12 = _newColorizeBuilder(tmp1, tmp3, tmp5, tmp7, tmp9, tmp11);
  final tmp14 = tmp12.arg0;
  final tmp15 = tmp12.arg1;
  final tmp16 = tmp12.arg2;
  final tmp17 = tmp12.arg3;
  final tmp18 = tmp12.arg4;
  if (tmp14 == 0) {
    debugAllocation("handle error", tmp15, tmp16);
    final ffi.Pointer<ffi.Uint8> tmp15_0 = ffi.Pointer.fromAddress(tmp15);
    final tmp14_0 = utf8.decode(
      tmp15_0.asTypedList(tmp16),
      allowMalformed: true,
    );
    if (tmp16 > 0) {
      final ffi.Pointer<ffi.Void> tmp15_0;
      tmp15_0 = ffi.Pointer.fromAddress(tmp15);
      this.__deallocate(tmp15_0, tmp17, 1);
    }
    throw tmp14_0;
  }
  final ffi.Pointer<ffi.Void> tmp18_0 = ffi.Pointer.fromAddress(tmp18);
  final tmp18_1 = _Box(this, tmp18_0, "drop_box_ColorizeBuilder");
  tmp18_1._finalizer = this._registerFinalizer(tmp18_1);
  final tmp13 = ColorizeBuilder._(this, tmp18_1);
  return tmp13;
}