Screen.build constructor

Screen.build({
  1. Key? key,
  2. String? name,
  3. Tranx? primaryTranx,
  4. Tranx? secondaryTranx,
  5. Tranx? tertiaryTranx,
  6. bool replace = false,
  7. bool closeAllPrev = false,
})

Implementation

Screen.build({
  Key? key,
  String? name,
  Tranx? primaryTranx,
  Tranx? secondaryTranx,
  Tranx? tertiaryTranx,
  this.replace = false,
  this.closeAllPrev = false,
})  : name = '${name ?? DateTime.now().millisecond}/@screen',
      super(key: key) {
  _tranx.data = primaryTranx ?? $tranx.translate(Offset(0, 1), Offset.zero).fade(0, 1);
  _secondaryTranx.data = secondaryTranx ?? $tranx;
  _tertiaryTranx.data = tertiaryTranx ?? $tranx.fade(0, 1);
}