handlePatchMetadataEvent method

Stream<S> handlePatchMetadataEvent(
  1. FastCalculatorBlocEventPayload<FastCalculatorResults>? payload
)

Implementation

Stream<S> handlePatchMetadataEvent(
  FastCalculatorBlocEventPayload? payload,
) async* {
  if (payload != null && payload.value is Map<String, dynamic>) {
    final newMetadata = mergeMetadata(payload.value as Map<String, dynamic>);

    yield currentState.copyWith(metadata: newMetadata) as S;
  }
}