flutter_client_factory_widgets 1.0.0 copy "flutter_client_factory_widgets: ^1.0.0" to clipboard
flutter_client_factory_widgets: ^1.0.0 copied to clipboard

Dependency-free HTTP client factory for Dart and Flutter with streaming, native and browser transports, and optional resilience policies.

example/lib/main.dart

import 'package:flutter_client_factory/flutter_client_factory.dart';

Future<void> main() async {
  final factory = DefaultHttpClientFactory();
  factory.registerClient('api',
      baseUrl: 'https://jsonplaceholder.typicode.com/',
      timeout: const Duration(seconds: 10));

  try {
    final response = await factory.create('api').getAsync('todos/1');
    await response.requireSuccess();
    // ignore: avoid_print
    print(await response.readText());
  } finally {
    await factory.close();
  }
}
0
likes
0
points
13
downloads

Publisher

unverified uploader

Weekly Downloads

Dependency-free HTTP client factory for Dart and Flutter with streaming, native and browser transports, and optional resilience policies.

Repository (GitHub)
View/report issues

Topics

#http #networking #http-client

Funding

Consider supporting this project:

www.buymeacoffee.com

License

unknown (license)

More

Packages that depend on flutter_client_factory_widgets