cah4a / dart_nock

HTTP requests mocking library for dart and flutter.
https://pub.dev/packages/nock
MIT License
20 stars 14 forks source link

Fix issue with dart 2.10 #6

Closed msneujink closed 4 years ago

msneujink commented 4 years ago

When running with dart 2.10 and flutter 1.22.0 i'm getting the following errors:

./../../.pub-cache/hosted/pub.dartlang.org/nock-1.0.2/lib/src/overrides.dart:131:7: Error: The non-abstract class 'MockHttpClientRequest' is missing implementations for these members:
 - HttpClientRequest.abort
Try to either
 - provide an implementation,
 - inherit an implementation from a superclass or mixin,
 - mark the class as abstract, or
 - provide a 'noSuchMethod' implementation.

class MockHttpClientRequest extends HttpClientRequest {
      ^^^^^^^^^^^^^^^^^^^^^
org-dartlang-sdk:///third_party/dart/sdk/lib/_http/http.dart:2045:8: Context: 'HttpClientRequest.abort' is defined here.
  void abort([Object? exception, StackTrace? stackTrace]);

This commit will fix the issue and will implement the abort method

cah4a commented 4 years ago

Nice! I will publish a new version soon.

Thanks for your contribution!

msneujink commented 4 years ago

Thanks for merging and the quick response! You're welcome!

cah4a commented 4 years ago

Hey, @msneujink!

I've just published v1.1.0 with that PR.