{"repo":"dint-dev/universal_io","free":true,"listed":false,"github":"https://github.com/dint-dev/universal_io","clone":"git clone https://github.com/dint-dev/universal_io.git","description":"Cross-platform 'dart:io', including browser-compatible HttpClient.","language":"Dart","stars":101,"topics":["dart","flutter"],"license":"Apache-2.0","category":"mobile-apps","readme_excerpt":"Overview A cross-platform dart:io that works on all platforms, including browsers. You can simply replace dart:io imports with package:universal io/universal io.dart . Licensed under the Apache License 2.0. Some of the source code was derived from Dart SDK, which was obtained under the BSD-style license of Dart SDK. See LICENSE file for details. APIs added on top of \"dart:io\" BrowserHttpClient A subclass of \"dart:io\" HttpClient that works in browsers. See also BrowserHttpClientRequest, BrowserHttpClientResponse, and BrowserHttpClientException. Uses XMLHttpRequest in browsers. WASM-compatible. HttpClient HttpClient() factory is changed so that it returns BrowserHttpClient on browsers. Platform The package makes methods like Platform.isAndroid and Platform.isMacOS work in the browsers too. InternetAddress The package makes it works in the browsers too. BytesBuilder The package makes it works in the browsers too. Links API reference Github project We appreciate feedback, issue reports, and pull requests. Similar packages universal html (cross-platform DOM, CSS, etc.) Getting started 1.Add dependency In pubspec.yaml: 2.Use HTTP client HTTP client behavior HTTP client is implemented with XMLHttpRequest (XHR) API on browsers. XHR causes the following differences with dart:io : HTTP connection is created only after request.close() has been called. Same-origin policy limitations. For making cross-origin requests, see documentation below. Helpful error messages When requests fail and ","default_branch":null,"files":null,"tree":[],"storefront":"/r/dint-dev","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/dint-dev/universal_io/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}