dio_extended 1.0.12 copy "dio_extended: ^1.0.12" to clipboard
dio_extended: ^1.0.12 copied to clipboard

a thin wrapper over the dio HTTP client that simplifies networking in Flutter.

example/lib/main.dart

/*
==========================================================
🧩 Example App β€” DioX Dio - Extended
==========================================================

This is a **simple example** demonstrating how to use the `dio_extended` library.

🎯 Purpose:
Show how to perform basic CRUD (Create, Read, Update, Delete) operations
using the extended Dio service (`BaseDioServices`) and a Freezed data model (`PostModel`).

πŸ“š Features demonstrated:
- GET: Display a list of posts from an API.
- POST: Add a new post using the FloatingActionButton.
- DELETE: Remove a post using the delete icon in each ListTile.
- ApiResult usage for success/failure response handling.

🌐 API endpoint used:
https://jsonplaceholder.typicode.com/posts

πŸ’‘ To run this example:
flutter run -t example/lib/main.dart

Or, if using VS Code:
Press F5 and select the β€œRun Example App” configuration.

==========================================================
*/

import 'package:dio_extended/diox.dart';
import 'package:example/statemanagement/origin/statefull_post_page_view.dart';
import 'package:flutter/material.dart';

void main() {
  ShakeChuckerConfigs.initialize(
    showOnRelease: false,
    showNotification: false,
  );
  runApp(
    ShakeForChucker(
      child: MaterialApp(
        title: 'DioX (Dio Extended) Example',
        debugShowCheckedModeBanner: false,
        theme: ThemeData(useMaterial3: true, colorSchemeSeed: Colors.blue),
        home: const StatefullPostPageView(),
        navigatorObservers: [
          ShakeChuckerConfigs.navigatorObserver,
        ],
      ),
    ),
  );
}
3
likes
160
points
37
downloads

Publisher

verified publisheranonimeact.com

Weekly Downloads

a thin wrapper over the dio HTTP client that simplifies networking in Flutter.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

chucker_flutter, dio, flutter, http_parser, mime, shake

More

Packages that depend on dio_extended