http_actions 1.0.4 copy "http_actions: ^1.0.4" to clipboard
http_actions: ^1.0.4 copied to clipboard

A HTTP networking package for Dart/Flutter,supports Global configuration, Interceptors, FormData,File uploading/downloading,Timeout, Cache Data etc

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:http_actions_example/screens/product/products_page.dart';

Future<void> main() async {
  WidgetsFlutterBinding.ensureInitialized();
  // await HttpHiveService().init();
  runApp(const MyApp());
}

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

  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: const ProductsPage(),
    );
  }
}

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

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

class _MyHomePageState extends State<MyHomePage> {
  int _counter = 0;

  void _incrementCounter() {
    setState(() {
      _counter++;
    });
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text("Demo"),
      ),
      body: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: <Widget>[
            const Text(
              'You have pushed the button this many times:',
            ),
            Text(
              '$_counter',
              style: Theme.of(context).textTheme.headlineMedium,
            ),
          ],
        ),
      ),
      floatingActionButton: FloatingActionButton(
        onPressed: _incrementCounter,
        tooltip: 'Increment',
        child: const Icon(Icons.add),
      ), // This trailing comma makes auto-formatting nicer for build methods.
    );
  }
}
5
likes
140
pub points
19%
popularity

Publisher

unverified uploader

A HTTP networking package for Dart/Flutter,supports Global configuration, Interceptors, FormData,File uploading/downloading,Timeout, Cache Data etc

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

connectivity_plus, flutter, flutter_cache_manager, http, http_parser

More

Packages that depend on http_actions