currentTime property
AFTimeState
get
currentTime
Implementation
AFTimeState get currentTime {
final state = AFibF.g.internalOnlyActiveStore.state;
final testState = state.private.testState.findState(testId);
if(testState == null) {
throw AFException("No test state for test $testId");
}
final models = testState.models;
var timeState;
if(models == null) {
// this is a workflow test.
timeState = state.public.time;
} else {
timeState = testState.models!["AFTimeState"] as AFTimeState?;
}
if(timeState == null) {
throw AFException("You called currentTime in a test, but you don't have an AFTimeState in the models for the test");
}
return timeState;
}