create static method

StatisticalGraph create({
  1. bool schemeUtilsIsSetDefaultData = false,
  2. String special_type = "statisticalGraph",
  3. bool special_is_json_scheme_class = true,
  4. String special_return_type = "statisticalGraph",
  5. StatisticalGraphData? statistical_graph_data,
  6. StatisticalGraphAsync? statistical_graph_async,
  7. StatisticalGraphError? statistical_graph_error,
})
override

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

Implementation

static StatisticalGraph create({
  bool schemeUtilsIsSetDefaultData = false,
  String special_type = "statisticalGraph",
  bool special_is_json_scheme_class = true,
  String special_return_type = "statisticalGraph",
  StatisticalGraphData? statistical_graph_data,
  StatisticalGraphAsync? statistical_graph_async,
  StatisticalGraphError? statistical_graph_error,
}) {
  // StatisticalGraph statisticalGraph = StatisticalGraph({
  final Map statisticalGraph_data_create_json = {
    "@type": special_type,
    "@is_json_scheme_class": special_is_json_scheme_class,
    "@return_type": special_return_type,
    "statistical_graph_data": (statistical_graph_data != null) ? statistical_graph_data.toJson() : null,
    "statistical_graph_async": (statistical_graph_async != null) ? statistical_graph_async.toJson() : null,
    "statistical_graph_error": (statistical_graph_error != null) ? statistical_graph_error.toJson() : null,
  };

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

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