persistCalculatorDocument method

  1. @protected
Future<void> persistCalculatorDocument({
  1. bool force = false,
})

Persists the calculator document.

This method is called when the calculator state is saved.

Implementation

@protected
Future<void> persistCalculatorDocument({bool force = false}) async {
  if (force || await canSaveUserEntry()) {
    debugLog(
      'persisting calculator bloc document',
      value: document.toJson(),
      debugLabel: debugLabel,
    );

    return dataProvider.persistCalculatorDocument(document);
  }
}