webservice 0.0.4 copy "webservice: ^0.0.4" to clipboard
webservice: ^0.0.4 copied to clipboard

outdated

A powerful Http client for Dart, which handles requests. Super easy to use and much more comming soon. Wait for our updates.

example/lib/main.dart

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

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

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

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'WebService',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: const MyHomePage(),
    );
  }
}

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

  @override
  State<MyHomePage> createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {

  @override
  void initState() {

    super.initState();
  }

  getData(){
    WebService().get(url: "https://dummyjson.com/products", onResponse: (response){
      print('${response.statusCode} ${response.message} ${response.data}');
    });
  }

  @override
  Widget build(BuildContext context) {
    return const Scaffold();
  }
}
10
likes
0
pub points
64%
popularity

Publisher

unverified uploader

A powerful Http client for Dart, which handles requests. Super easy to use and much more comming soon. Wait for our updates.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

dio, flutter

More

Packages that depend on webservice