retrieveCalculatorStateStatus method
Retrieves the current status of the calculator state, including validity and dirtiness.
It asynchronously checks if the calculator state is valid and dirty, then logs and returns the results.
Returns a Future that resolves to a tuple with isValid
indicating
if the state is valid and isDirty
indicating if the state has been
modified.
Implementation
Future<(bool isValid, bool isDirty)> retrieveCalculatorStateStatus() async {
final isValid = await isCalculatorStateValid();
final isDirty = await isCalculatorStateDirty();
debugLog(
'Calculator state is dirty',
value: isDirty,
debugLabel: debugLabel,
);
debugLog(
'Calculator state is valid',
value: isValid,
debugLabel: debugLabel,
);
return (isValid, isDirty);
}