universal_io 0.2.0 copy "universal_io: ^0.2.0" to clipboard
universal_io: ^0.2.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';
import 'dart:html' as html;

void main() async {
  // Use 'dart:io' HttpClient API
  final httpClient = new HttpClient();
  final request = await httpClient.getUrl(Uri.parse("http://googl.com"));
  final response = await request.close();

  // Add HTML element:
  //   <h1>Google.com HTTP status: 200</h1>
  final text = "Google.com HTTP status: ${response.statusCode}";
  html.document.body.append(html.HeadingElement.h1()..appendText(text));
}
213
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