finalize method

Stream<Uint8List> finalize()

Implementation

Stream<Uint8List> finalize() {
  if (isFinalized) {
    throw StateError(
      'The MultipartFile has already been finalized. '
      'This typically means you are using '
      'the same MultipartFile in repeated requests.',
    );
  }
  _isFinalized = true;
  return _dataBuilder()
      .map((e) => e is Uint8List ? e : Uint8List.fromList(e));
}