SolDay class

A class representing a Sol (Martian day) and its associated data

Constructors

SolDay({required int sol, required DateTime earthDate, required int totalPhotos, required List<String> cameras})
SolDay.fromJson(Map<String, dynamic> json)
Factory constructor to create a SolDay instance from a JSON object
factory

Properties

cameras List<String>
List of cameras that took photos on this Sol
final
earthDate DateTime
The corresponding Earth date
final
hashCode int
Overriding the hash code getter to generate a hash code based on the Sol number. This is used to check if a SolDay object is already present in a list.
no setteroverride
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
sol int
The Sol (Martian day) number
final
totalPhotos int
Total number of photos taken on this Sol
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
Overriding the equality operator to compare SolDay objects based on the Sol number. This is used to check if a SolDay object is already present in a list.
override

Static Methods

getFormattedEarthDate(DateTime earthDate) String
Returns the formatted Earth date as a string given a DateTime earthDate
getMaxPhotos(List<SolDay> days) int
Returns the maximum number of photos taken on a single Sol from a list of SolDay objects