Screen.open constructor

Screen.open(
  1. BuildContext context, {
  2. Key? key,
  3. String? name,
  4. Tranx? primaryTranx,
  5. Tranx? secondaryTranx,
  6. Tranx? tertiaryTranx,
  7. Curve? curve,
  8. Curve? secondaryCurve,
  9. Curve? tertiaryCurve,
  10. Duration? duration,
  11. Duration? secondaryDuration,
  12. Duration? tertiaryDuration,
  13. bool replace = false,
  14. bool closeAllPrev = false,
})

Implementation

Screen.open(
  BuildContext context, {
  Key? key,
  String? name,
  // tranx
  Tranx? primaryTranx,
  Tranx? secondaryTranx,
  Tranx? tertiaryTranx,
  // curve
  Curve? curve,
  Curve? secondaryCurve,
  Curve? tertiaryCurve,
  // duration
  Duration? duration,
  Duration? secondaryDuration,
  Duration? tertiaryDuration,
  this.replace = false,
  this.closeAllPrev = false,
})  : name = '${name ?? DateTime.now().millisecond}/@screen',
      super(key: key) {
  // tranx
  _tranx.data = primaryTranx;
  _secondaryTranx.data = secondaryTranx;
  _tertiaryTranx.data = tertiaryTranx;
  // curve
  _curve.data = curve;
  _secondaryCurve.data = secondaryCurve;
  _tertiaryCurve.data = tertiaryCurve;
  // duration
  _duration.data = duration;
  _secondaryDuration.data = secondaryDuration;
  _tertiaryDuration.data = tertiaryDuration;
  Screens.open(context, screen: this, replace: replace, closeAllPrev: closeAllPrev);
}