toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  Map<String, dynamic> params = {};
  if ((address ?? '').isNotEmpty) {
    params['address'] = address;
  }
  if ((chainName ?? '').isNotEmpty) {
    params['chainName'] = chainName;
  }
  if (chainId != null) {
    params['chainId'] = chainId;
  }

  return params;
}