toForm method

List<MBMultipartForm>? toForm()

Converts this object to a list of multipart forms

Implementation

List<MBMultipartForm>? toForm() {
  if (wantsPush) {
    List<MBMultipartForm> forms = [];
    forms.add(MBMultipartForm.name('wants_push', 'true'));
    if (pushBody != null && pushBody != '') {
      forms.add(MBMultipartForm.name('push_body', pushBody!));
    }
    return forms;
  }
  return [];
}