universal_io 0.3.0 copy "universal_io: ^0.3.0" to clipboard
universal_io: ^0.3.0 copied to clipboard

outdated

Cross-platform version of 'dart:io'. Supports browser, Node.JS, and other targets.

example/example.dart

import 'package:universal_io/io.dart';

void main() async {
  // Use 'dart:io' HttpClient API
  //
  // This works automatically in:
  //   * Browser (where standard 'dart:io' would fail)
  //   * Flutter and VM
  final httpClient = new HttpClient();
  final request = await httpClient.getUrl(Uri.parse("http://google.com"));
  final response = await request.close();
  print("Google.com HTTP status: ${response.statusCode}");
}
212
likes
0
pub points
99%
popularity

Publisher

verified publisherdint.dev

Cross-platform version of 'dart:io'. Supports browser, Node.JS, and other targets.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

ip, meta, raw, typed_data, zone_local

More

Packages that depend on universal_io