defineScreenPrototype method
AFSingleScreenPrototypeBody
defineScreenPrototype({
- required AFPrototypeID id,
- required Object? stateView,
- AFTestTimeHandling timeHandling = AFTestTimeHandling.paused,
- 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,
);
}