fromDefault static method

DVCVariable fromDefault(
  1. String key,
  2. dynamic defaultValue
)

Implementation

static DVCVariable fromDefault(String key, dynamic defaultValue) {
  String mapType = defaultValue.runtimeType.toString().toLowerCase();

  return DVCVariable(
      key: key,
      value: defaultValue,
      type: VariableType.values
          .firstWhereOrNull((e) => e.toString() == "VariableType.$mapType")
  );
}