@@ -518,7 +518,7 @@ class _MediaUploadStreamSink implements StreamSink<List<int>> {
518
518
final storage_api.Object _object;
519
519
final String ? _predefinedAcl;
520
520
final int ? _length;
521
- final BytesBuilder buffer = BytesBuilder ();
521
+ final BytesBuilder _buffer = BytesBuilder ();
522
522
final _controller = StreamController <List <int >>(sync : true );
523
523
late StreamSubscription _subscription;
524
524
late StreamController <List <int >> _resumableController;
@@ -576,12 +576,12 @@ class _MediaUploadStreamSink implements StreamSink<List<int>> {
576
576
void _onData (List <int > data) {
577
577
assert (_state != _stateLengthKnown);
578
578
if (_state == _stateProbingLength) {
579
- buffer .add (data);
580
- if (buffer .length > _maxNormalUploadLength) {
579
+ _buffer .add (data);
580
+ if (_buffer .length > _maxNormalUploadLength) {
581
581
// Start resumable upload.
582
582
// TODO: Avoid using another stream-controller.
583
583
_resumableController = StreamController <List <int >>(sync : true );
584
- _resumableController.add (buffer .takeBytes ());
584
+ _resumableController.add (_buffer .takeBytes ());
585
585
_startResumableUpload (_resumableController.stream, _length);
586
586
_state = _stateDecidedResumable;
587
587
@@ -604,7 +604,7 @@ class _MediaUploadStreamSink implements StreamSink<List<int>> {
604
604
if (_state == _stateProbingLength) {
605
605
// As the data is already cached don't bother to wait on somebody
606
606
// listening on the stream before adding the data.
607
- _startNormalUpload (Stream .value (buffer .takeBytes ()), buffer .length);
607
+ _startNormalUpload (Stream .value (_buffer .takeBytes ()), _buffer .length);
608
608
} else {
609
609
_resumableController.close ();
610
610
}
0 commit comments