TimestampSplit.fromJson constructor

TimestampSplit.fromJson(
  1. Object? j
)

Implementation

factory TimestampSplit.fromJson(Object? j) {
  final json = j as Map<String, Object?>;
  return TimestampSplit(
    trainingFraction: switch (json['trainingFraction']) {
      null => 0,
      Object $1 => decodeDouble($1),
    },
    validationFraction: switch (json['validationFraction']) {
      null => 0,
      Object $1 => decodeDouble($1),
    },
    testFraction: switch (json['testFraction']) {
      null => 0,
      Object $1 => decodeDouble($1),
    },
    key: switch (json['key']) {
      null => '',
      Object $1 => decodeString($1),
    },
  );
}