PTAlertInfo constructor
PTAlertInfo({
- required PTAlertCause cause,
- required PTAlertEffect effect,
- required List<
PTAlertActivePeriod> activePeriods, - required List<
PTAlertTranslation> urls, - required List<
PTAlertTranslation> headerTexts, - required List<
PTAlertTranslation> descriptionTexts, - PTAlertSeverityLevel? severityLevel,
- List<
PTAlertTranslation> causeDetails = const <PTAlertTranslation>[], - List<
PTAlertTranslation> effectDetails = const <PTAlertTranslation>[],
Create a PTAlertInfo.
API users do not typically create instances of this class directly. Get instances from PTStopInfo.alerts, PTTrip.alerts or PTStop.alerts.
Parameters
cause: (PTAlertCause) The cause of the alert.effect: (PTAlertEffect) The effect of the alert.activePeriods: (List<PTAlertActivePeriod>) Periods when the alert is active.urls: (List<PTAlertTranslation>) URL translations for more information.headerTexts: (List<PTAlertTranslation>) Header text translations.descriptionTexts: (List<PTAlertTranslation>) Description text translations.severityLevel: (PTAlertSeverityLevel?) The severity of the alert.causeDetails: (List<PTAlertTranslation>) Agency-specific cause wording translations.effectDetails: (List<PTAlertTranslation>) Agency-specific effect wording translations.
Implementation
PTAlertInfo({
required this.cause,
required this.effect,
required this.activePeriods,
required this.urls,
required this.headerTexts,
required this.descriptionTexts,
this.severityLevel,
this.causeDetails = const <PTAlertTranslation>[],
this.effectDetails = const <PTAlertTranslation>[],
});