uno 1.0.1+1 copy "uno: ^1.0.1+1" to clipboard
uno: ^1.0.1+1 copied to clipboard

outdated

Future based HTTP client for the Dart and Flutter

example/uno_example.dart

import 'package:universal_io/io.dart';
import 'package:uno/src/presenter/uno_base.dart';
import 'package:uno/uno.dart';

void main() async {
  final uno = Uno();
  final response = await uno.get('http://localhost:8080/spoiler.png',
      responseType: ResponseType.arraybuffer);
  print(response.data);

  //final uno = Uno();

  // final formData = FormData();
  // formData.add('title', 'juca');
  // formData.addFile('image', 'mvvm.png');
  // final response = await uno.post('http://localhost:3000/form', data: formData);
  // print(response.data);

  // await uno(
  //   method: 'get',
  //   url: 'http://bit.ly/2mTM3nY',
  //   responseType: ResponseType.arraybuffer,
  //   onDownloadProgress: (total, current) {
  //     final percentCompleted = (current / total * 100).round();
  //     print('completed: $percentCompleted%');
  //   },
  // ).then((response) async {
  //   await File('ada_lovelace.jpg').writeAsBytes(response.data);
  // });
}
134
likes
0
pub points
85%
popularity

Publisher

verified publisherflutterando.com.br

Future based HTTP client for the Dart and Flutter

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

characters, meta, mime_type, path, universal_io

More

Packages that depend on uno