• Todd Volkert's avatar
    Prepare for HttpClientResponse Uint8List SDK change (#34863) · e8270ff6
    Todd Volkert authored
    * Prepare for HttpClientResponse Uint8List SDK change
    
    An upcoming change in the Dart SDK will change `HttpClientResponse`
    from implementing `Stream<List<int>>` to instead implement
    `Stream<Uint8List>`.
    
    This forwards-compatible change to `_MockHttpClientResponse` is being
    made to allow for a smooth rollout of that SDK breaking change. The
    current structure of the class is as follows:
    
    ```dart
    _MockHttpClientResponse extends Stream<List<int>> implements HttpClientResponse {
      ...
    }
    ```
    
    This structure would require that the Dart SDK change land atomically
    a change to the class (`extends Stream<Uint8List>`). This atomic landing
    requirement doesn't play well at all with Flutter's roll model vis-a-vis
    the Dart SDK's roll model to Google's internal repo.  As such, this commit
    changes the structure of `_MockHttpClientResponse` to be:
    
    ```dart
    _MockHttpClientResponse implements HttpClientResponse {
      final Stream<Uint8List> _delegate;
    
      ...
    }
    ```
    
    Once the Dart SDK change has fully rolled out, we can simplify this class
    back to its former structure.
    
    https://github.com/dart-lang/sdk/issues/36900
    
    * Review comment
    e8270ff6
Name
Last commit
Last update
..
accessibility.dart Loading commit data...
all_elements.dart Loading commit data...
binding.dart Loading commit data...
controller.dart Loading commit data...
finders.dart Loading commit data...
goldens.dart Loading commit data...
matchers.dart Loading commit data...
nonconst.dart Loading commit data...
platform.dart Loading commit data...
stack_manipulation.dart Loading commit data...
test_async_utils.dart Loading commit data...
test_compat.dart Loading commit data...
test_exception_reporter.dart Loading commit data...
test_pointer.dart Loading commit data...
test_text_input.dart Loading commit data...
test_vsync.dart Loading commit data...
widget_tester.dart Loading commit data...
window.dart Loading commit data...