dio_extended 1.0.12
dio_extended: ^1.0.12 copied to clipboard
a thin wrapper over the dio HTTP client that simplifies networking in Flutter.
/*
==========================================================
π§© 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,
],
),
),
);
}