{"id":32304287,"url":"https://github.com/dev-kasibhatla/flutter_connectivity","last_synced_at":"2026-02-21T08:36:35.950Z","repository":{"id":250560044,"uuid":"795053668","full_name":"dev-kasibhatla/flutter_connectivity","owner":"dev-kasibhatla","description":"Monitors and reports connection quality to a specific server. Ensures real internet access, not just connectivity. Pure Dart, Dart/Flutter compatible.","archived":false,"fork":false,"pushed_at":"2024-07-28T13:40:08.000Z","size":84,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-23T06:29:25.589Z","etag":null,"topics":["dart","flutter","library","network","package"],"latest_commit_sha":null,"homepage":"","language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dev-kasibhatla.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-05-02T13:46:37.000Z","updated_at":"2025-09-24T02:00:56.000Z","dependencies_parsed_at":"2024-07-28T13:44:54.884Z","dependency_job_id":null,"html_url":"https://github.com/dev-kasibhatla/flutter_connectivity","commit_stats":null,"previous_names":["dev-kasibhatla/flutter_connectivity"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/dev-kasibhatla/flutter_connectivity","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dev-kasibhatla%2Fflutter_connectivity","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dev-kasibhatla%2Fflutter_connectivity/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dev-kasibhatla%2Fflutter_connectivity/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dev-kasibhatla%2Fflutter_connectivity/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dev-kasibhatla","download_url":"https://codeload.github.com/dev-kasibhatla/flutter_connectivity/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dev-kasibhatla%2Fflutter_connectivity/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29677606,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-21T06:23:40.028Z","status":"ssl_error","status_checked_at":"2026-02-21T06:23:39.222Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dart","flutter","library","network","package"],"created_at":"2025-10-23T06:23:43.925Z","updated_at":"2026-02-21T08:36:35.944Z","avatar_url":"https://github.com/dev-kasibhatla.png","language":"Dart","funding_links":[],"categories":[],"sub_categories":[],"readme":"# flutter_connectivity\nConstantly monitors and reports changes in connection quality to a specific server or service, built in pure Dart and compatible with Dart and Flutter.\n\nUnlike other packages that only check internet connectivity, this one ensures actual internet access by testing against your designated server.\n## Features\n\n- [x] Select a server to test against (eg: example.com)\n- [x] Configure interval for testing\n- [x] Configure how many failed tests before reporting a connection loss\n- [x] Set latency thresholds for different connection qualities\n- [x] Get notified of connection quality changes in real-time\n- [x] Pause and resume monitoring\n- [x] Query connection history\n- [x] Accommodates occasional network hiccups\n\nUse this package when you need to:\n- monitor connection quality\n- maintain a stable connection\n- detect network issues\n- provide real-time feedback to users (eg: connection quality indicator)\n\n## Getting started\n\n1. Install the package\n\nDart\n```bash\ndart pub add flutter_connectivity\n```\nFlutter\n```bash\nflutter pub add flutter_connectivity\n```\n2. Import the package\n```dart\nimport 'package:flutter_connectivity/flutter_connectivity.dart';\n```\n\n3. Create a new instance of `FlutterConnectivity` and start monitoring\n```dart\n// instantiate\nFlutterConnectivity connectivity = FlutterConnectivity(endpoint: 'https://example.com');\n\n// listen\nconnectivity.listenToLatencyChanges((ConnectivityStatus status, int latency) {\n    print('Connection status: $status, latency: $latency');\n});\n```\n\n## Screenshot\n![Screenshot](extra/screenshot.png)\n\n## Compatibility\nWorks with all Dart and Flutter (web, mobile, desktop) projects.\n\n## Usage\n\n**Create a new instance of `FlutterConnectivity`**\n\n```dart\n// Modify the endpoint to your server\nFlutterConnectivity connectivity = FlutterConnectivity(endpoint: 'https://example.com');\n```\n\n**Optional: Configure the connectivity instance**\n```dart\nconnectivity.configure(\n    // How many failed requests before reporting a connection loss\n    allowedFailedRequests: 2,\n    \n    // How often to check the connection\n    checkInterval: const Duration(seconds: 3),\n    \n    // What kind of logs appear on your console\n    logLevel: LogLevel.error,\n);\n```\n\n**Optional: Configure latency thresholds**\n```dart\n// Set latency thresholds in milliseconds\nconnectivity.setLatencyThresholds(\n    disconnected: 10000,\n    slow: 5000,\n    moderate: 2000,\n    fast: 1000,\n);\n```\n\n**Start the connectivity monitor**\n```dart\nconnectivity.listenToLatencyChanges((ConnectivityStatus status, int latency) {\n    print('Connection status: $status, latency: $latency');\n});\n```\n\n**Pause and resume monitoring**\n```dart\n// Pause monitoring\nconnectivity.pause();\n\n// Resume monitoring\nconnectivity.resume();\n```\n\n**Get history of latencies with timestamps**\n```dart\nMap\u003cint, int\u003e latencies = connectivity.latencyHistory;\n```\n\n**Stop monitoring**\n```dart\nconnectivity.dispose();\n```\n\nCheck out the [example](https://pub.dev/packages/flutter_connectivity/example) for a complete implementation. Run the example using the following command:\n```bash\ndart example/example.dart\n```\n\n\n\n## Additional information\nReport issues and help improve the package on [GitHub](https://github.com/dev-kasibhatla/flutter_connectivity/issues).\nCheck [API reference](https://pub.dev/documentation/flutter_connectivity/latest/) for more detailed information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdev-kasibhatla%2Fflutter_connectivity","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdev-kasibhatla%2Fflutter_connectivity","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdev-kasibhatla%2Fflutter_connectivity/lists"}