Rotation.fromJson constructor

Rotation.fromJson(
  1. Object? j
)

Implementation

factory Rotation.fromJson(Object? j) {
  final json = j as Map<String, Object?>;
  return Rotation(
    nextRotationTime: switch (json['nextRotationTime']) {
      null => null,
      Object $1 => Timestamp.fromJson($1),
    },
    rotationPeriod: switch (json['rotationPeriod']) {
      null => null,
      Object $1 => Duration.fromJson($1),
    },
  );
}