{"id":13465643,"url":"https://github.com/jogboms/flutter_offline","last_synced_at":"2025-05-15T11:02:58.234Z","repository":{"id":38956425,"uuid":"147478076","full_name":"jogboms/flutter_offline","owner":"jogboms","description":"✈️ A tidy utility to handle offline/online connectivity like a Boss","archived":false,"fork":false,"pushed_at":"2024-07-11T08:02:10.000Z","size":1177,"stargazers_count":1186,"open_issues_count":12,"forks_count":120,"subscribers_count":13,"default_branch":"master","last_synced_at":"2025-05-15T11:02:45.786Z","etag":null,"topics":["android","connectivity","connectivity-manager","dart-library","dartlang","flutter","flutter-package","flutter-widget","ios","network"],"latest_commit_sha":null,"homepage":"","language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jogboms.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"github":null,"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":["www.paypal.me/jogboms"]}},"created_at":"2018-09-05T07:30:33.000Z","updated_at":"2025-05-09T04:22:44.000Z","dependencies_parsed_at":"2024-06-18T18:22:25.035Z","dependency_job_id":"24bafc62-1f46-4941-8ab1-94c2d21935bd","html_url":"https://github.com/jogboms/flutter_offline","commit_stats":null,"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jogboms%2Fflutter_offline","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jogboms%2Fflutter_offline/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jogboms%2Fflutter_offline/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jogboms%2Fflutter_offline/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jogboms","download_url":"https://codeload.github.com/jogboms/flutter_offline/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254328385,"owners_count":22052632,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["android","connectivity","connectivity-manager","dart-library","dartlang","flutter","flutter-package","flutter-widget","ios","network"],"created_at":"2024-07-31T15:00:33.194Z","updated_at":"2025-05-15T11:02:58.178Z","avatar_url":"https://github.com/jogboms.png","language":"Dart","readme":"# ✈️ Flutter Offline\n\n[![Format, Analyze and Test](https://github.com/jogboms/flutter_offline/actions/workflows/main.yml/badge.svg)](https://github.com/jogboms/flutter_offline/actions/workflows/main.yml) [![codecov](https://codecov.io/gh/jogboms/flutter_offline/branch/master/graph/badge.svg)](https://codecov.io/gh/jogboms/flutter_offline) [![pub package](https://img.shields.io/pub/v/flutter_offline.svg)](https://pub.dartlang.org/packages/flutter_offline)\n\nA tidy utility to handle offline/online connectivity like a Boss. It provides support for both iOS and Android platforms (offcourse).\n\n## 🎖 Installing\n\n```yaml\ndependencies:\n  flutter_offline: \"^4.0.0\"\n```\n\n### ⚡️ Import\n\n```dart\nimport 'package:flutter_offline/flutter_offline.dart';\n```\n\n### ✔ Add Permission to Manifest\n\n```dart\n\u003cuses-permission android:name=\"android.permission.INTERNET\"/\u003e\n```\n\n## 🎮 How To Use\n\n```dart\nimport 'package:flutter/material.dart';\nimport 'package:flutter_offline/flutter_offline.dart';\n\nclass DemoPage extends StatelessWidget {\n  @override\n  Widget build(BuildContext context) {\n    return new Scaffold(\n      appBar: new AppBar(\n        title: new Text(\"Offline Demo\"),\n      ),\n      body: OfflineBuilder(\n        connectivityBuilder: (\n          BuildContext context,\n          List\u003cConnectivityResult\u003e connectivity,\n          Widget child,\n        ) {\n          final bool connected = !connectivity.contains(ConnectivityResult.none);\n          return new Stack(\n            fit: StackFit.expand,\n            children: [\n              Positioned(\n                height: 24.0,\n                left: 0.0,\n                right: 0.0,\n                child: Container(\n                  color: connected ? Color(0xFF00EE44) : Color(0xFFEE4400),\n                  child: Center(\n                    child: Text(\"${connected ? 'ONLINE' : 'OFFLINE'}\"),\n                  ),\n                ),\n              ),\n              Center(\n                child: new Text(\n                  'Yay!',\n                ),\n              ),\n            ],\n          );\n        },\n        child: Column(\n          mainAxisAlignment: MainAxisAlignment.center,\n          children: \u003cWidget\u003e[\n            new Text(\n              'There are no bottons to push :)',\n            ),\n            new Text(\n              'Just turn off your internet.',\n            ),\n          ],\n        ),\n      ),\n    );\n  }\n}\n```\n\nFor more info, please, refer to the `main.dart` in the example.\n\n## 📷 Screenshots\n\n\u003ctable\u003e\n  \u003ctr\u003e\n    \u003ctd align=\"center\"\u003e\n      \u003cimg src=\"https://raw.githubusercontent.com/jogboms/flutter_offline/master/screenshots/demo_1.gif\" width=\"250px\"\u003e\n    \u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\n      \u003cimg src=\"https://raw.githubusercontent.com/jogboms/flutter_offline/master/screenshots/demo_2.gif\" width=\"250px\"\u003e\n    \u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\n      \u003cimg src=\"https://raw.githubusercontent.com/jogboms/flutter_offline/master/screenshots/demo_3.gif\" width=\"250px\"\u003e\n    \u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/table\u003e\n\n## 🐛 Bugs/Requests\n\nIf you encounter any problems feel free to open an issue. If you feel the library is\nmissing a feature, please raise a ticket on Github and I'll look into it.\nPull request are also welcome.\n\n### ❗️ Note\n\nFor help getting started with Flutter, view our online\n[documentation](https://flutter.io/).\n\nFor help on editing plugin code, view the [documentation](https://flutter.io/platform-plugins/#edit-code).\n\n### 🤓 Mentions\n\nSimon Lightfoot ([@slightfoot](https://github.com/slightfoot)) is just awesome 👍.\n\n## ⭐️ License\n\nMIT License\n","funding_links":["www.paypal.me/jogboms"],"categories":["Components","Dart","组件","UI [🔝](#readme)"],"sub_categories":["UI"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjogboms%2Fflutter_offline","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjogboms%2Fflutter_offline","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjogboms%2Fflutter_offline/lists"}