create static method

Balance create({
  1. bool schemeUtilsIsSetDefaultData = false,
  2. String special_type = "balance",
  3. num? balance,
})
override

return original data json

Implementation

static Balance create({
  bool schemeUtilsIsSetDefaultData = false,
  String special_type = "balance",
  num? balance,
}) {
  // Balance balance = Balance({
  final Map balance_data_create_json = {
    "@type": special_type,
    "balance": balance,
  };

  balance_data_create_json.removeWhere((key, value) => value == null);

  if (schemeUtilsIsSetDefaultData) {
    defaultData.forEach((key, value) {
      if (balance_data_create_json.containsKey(key) == false) {
        balance_data_create_json[key] = value;
      }
    });
  }
  return Balance(balance_data_create_json);
}