ezto_http_client 8.0.4 copy "ezto_http_client: ^8.0.4" to clipboard
ezto_http_client: ^8.0.4 copied to clipboard

ezto http client

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:ezto_http_client/ezto_http_client.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatefulWidget {
  const MyApp({super.key});

  @override
  State<MyApp> createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  final _httpClientPlugin = HttpNativeClient();

  @override
  void initState() {
    super.initState();
    _httpClientPlugin
        .getUrl("https://api.ipify.org")
        .then(
          (value) => print(
            value.encode(),
          ),
        )
        .catchError((exception) {
      debugPrint(exception.toString());
    });
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Plugin example app'),
        ),
        body: const Center(
          child: Text('Running on:\n'),
        ),
      ),
    );
  }
}
0
likes
130
points
199
downloads

Publisher

unverified uploader

Weekly Downloads

ezto http client

Homepage

Documentation

API reference

License

unknown (license)

Dependencies

flutter, plugin_platform_interface

More

Packages that depend on ezto_http_client