PrelimInfo.optional constructor

PrelimInfo.optional(
  1. {int? timeStamp,
  2. int teamNumber = 0,
  3. int matchNumber = 0,
  4. MatchType matchType = MatchType.unset,
  5. TeamAlliance alliance = TeamAlliance.red,
  6. MatchStartingPosition startingPosition = MatchStartingPosition.unset}
)

Implementation

factory PrelimInfo.optional(
        {int? timeStamp,
        int teamNumber = 0,
        int matchNumber = 0,
        MatchType matchType = MatchType.unset,
        TeamAlliance alliance = TeamAlliance.red,
        MatchStartingPosition startingPosition =
            MatchStartingPosition.unset}) =>
    PrelimInfo(
        timeStamp:
            timeStamp ?? DateTime.now().millisecondsSinceEpoch,
        teamNumber: teamNumber,
        matchNumber: matchNumber,
        matchType: matchType,
        alliance: alliance,
        startingPosition: startingPosition);