defineScreenPrototype method

AFSingleScreenPrototypeBody defineScreenPrototype({
  1. required AFPrototypeID id,
  2. required Object? stateView,
  3. AFNavigatePushAction? navigate,
  4. AFNavigateWithOnEventContextDelegate? navigateWithEventContext,
  5. AFTestTimeHandling timeHandling = AFTestTimeHandling.paused,
  6. String? title,
})

Define a prototype which shows a single screen in a particular screen view state/route param state.

Implementation

AFSingleScreenPrototypeBody defineScreenPrototype({
  required AFPrototypeID   id,
  required Object? stateView,
  AFNavigatePushAction? navigate,
  AFNavigateWithOnEventContextDelegate? navigateWithEventContext,
  AFTestTimeHandling timeHandling = AFTestTimeHandling.paused,
  String? title,
}) {
  final stateViewActual = stateView ?? <Object>[];
  return screenTests.addPrototype(
    id: id,
    stateView: stateViewActual,
    navigate: navigate,
    navigateWithEventContext: navigateWithEventContext,
    timeHandling: timeHandling,
  );
}