mergeWidgetData method

void mergeWidgetData(
  1. WidgetData? data
)

Implementation

void mergeWidgetData(WidgetData? data) {
  if(data == null) return;
  this._widgetData = data;
  if(data.pg != null) this.pg = data.pg;
  if(data.method != null) this.method = data.method;


  this._widgetCompleted = data.completed;
  this._widgetTermPassed = data.termPassed;
  if(data.currency != null) this.currency = data.currency;
  if(data.selectTerms != null) this._widgetSelectTerms = data.selectTerms;
  if(data.walletId != null) this._widgetWalletId = data.walletId;

  if(this.extra == null) {
    this.extra = Extra();
  }
  if(data?.extra?.directCardCompany != null) this.extra?.directCardCompany = data?.extra?.directCardCompany;
  if(data?.extra?.directCardQuota != null) this.extra?.directCardQuota = "${data?.extra?.directCardQuota}";
  if(data?.extra?.cardQuota != null) this.extra?.cardQuota = "${data?.extra?.cardQuota}";
}