create static method

NetworkStatisticsEntryCall create({
  1. bool schemeUtilsIsSetDefaultData = false,
  2. String special_type = "networkStatisticsEntryCall",
  3. String special_return_type = "networkStatisticsEntry",
  4. NetworkType? network_type,
  5. num? sent_bytes,
  6. num? received_bytes,
  7. double? duration,
})
override

Generate By AZKADEV | Azka Axelion Gibran Script Dont edit by hand or anything manual

Implementation

static NetworkStatisticsEntryCall create({
  bool schemeUtilsIsSetDefaultData = false,
  String special_type = "networkStatisticsEntryCall",
  String special_return_type = "networkStatisticsEntry",
  NetworkType? network_type,
  num? sent_bytes,
  num? received_bytes,
  double? duration,
}) {
  // NetworkStatisticsEntryCall networkStatisticsEntryCall = NetworkStatisticsEntryCall({
  final Map networkStatisticsEntryCall_data_create_json = {
    "@type": special_type,
    "@return_type": special_return_type,
    "network_type": (network_type != null) ? network_type.toJson() : null,
    "sent_bytes": sent_bytes,
    "received_bytes": received_bytes,
    "duration": duration,
  };

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

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