diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..9faeab5 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ + +dart_ping_ios/.flutter-plugins-dependencies diff --git a/README.md b/README.md index 8a8010f..64bb5ee 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,3 @@ In order to provide compatibility on iOS (via Flutter Method Channels) while ret [dart_ping](dart_ping) is the main package which supports Windows, Mac, Linux, and Android natively without additional binaries [dart_ping_ios](dart_ping_ios) is a plugin which adds cocoa dependencies to support ping on iOS systems. Using this plugin requires the Flutter SDK to be added to your dart project. - -### Windows Compatibility - -When using this package with Flutter for Windows, release builds [may not work as intended](https://github.com/point-source/dart_ping/issues/16). This is due to a [known issue](https://github.com/dart-lang/sdk/issues/39945) with the Flutter framework on windows. There is [a workaround described here.](https://github.com/dart-lang/sdk/issues/39945#issuecomment-870428151) \ No newline at end of file diff --git a/dart_ping/CHANGELOG.md b/dart_ping/CHANGELOG.md index 556a742..6483113 100644 --- a/dart_ping/CHANGELOG.md +++ b/dart_ping/CHANGELOG.md @@ -1,3 +1,17 @@ +## 8.0.1 + +- Fix windows timeout flag (Issue #37) + +## 8.0.0 + +- Use named capture groups for regex parsing +- Return false instead of throwing exception when stop() is called prematurely + +## 7.0.2 + +- Remove windows compatibility warning. Issue #27 / fixed upstream +- Add repository link to pubspec / pub.dev + ## 7.0.1 - Add documentation note about apple app sandbox in release mode diff --git a/dart_ping/README.md b/dart_ping/README.md index d2783e4..bb2fe48 100644 --- a/dart_ping/README.md +++ b/dart_ping/README.md @@ -21,6 +21,12 @@ void main() async { } ``` +Instead of listening to a stream, you can perform a single ping and immediately return the result like so: + +```dart +final result = await Ping('google.com', count: 1).stream.first; +``` + To use dart_ping on iOS, add the [dart_ping_ios](https://pub.dev/packages/dart_ping_ios) package as a dependency and register the iOS plugin before initializing Ping. For more detailed docs, see the [dart_ping_ios](https://pub.dev/packages/dart_ping_ios) package. Note that the iOS plugin requires the flutter sdk. (this is why it is not integrated into dart_ping directly) ```dart @@ -49,9 +55,9 @@ To override the parser to support an alternative OS language ```dart final parser = PingParser( responseStr: RegExp(r'Resposta de'), - responseRgx: RegExp(r'de (.*): bytes=(\d+) tempo=(\d+)ms TTL=(\d+)'), + responseRgx: RegExp(r'de (?.*): bytes=(?:\d+) tempo=(?