custom_api_services 0.0.2 copy "custom_api_services: ^0.0.2" to clipboard
custom_api_services: ^0.0.2 copied to clipboard

A Dio-based network manager with caching, authentication, offline support, progress tracking, and error handling for Flutter/Dart apps.

example/lib/main.dart

import 'package:custom_api_services_example/home_screen.dart';
import 'package:flutter/material.dart';
import 'package:custom_api_services/custom_api_services.dart';

late ApiServices customApiService;
late CustomApiServices globalInstance;

void main() {
  WidgetsFlutterBinding.ensureInitialized();
  customApiService = ApiServices(enableCache: true);
  globalInstance = CustomApiServices(
    baseUrl: 'https://www.staging2.clickawaygrocer.com.au/wp-json/mobileapp/v1',
    // baseUrl: 'http://52.66.76.36/api',
    // baseUrl: 'https://staging.tigratem.com/api',
    enableCache: true,
  );
  runApp(const MyApp());
}

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

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

class _MyAppState extends State<MyApp> {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(home: HomeScreen());
  }
}
0
likes
135
points
168
downloads

Publisher

verified publishermanishtalreja.in

Weekly Downloads

A Dio-based network manager with caching, authentication, offline support, progress tracking, and error handling for Flutter/Dart apps.

Homepage

Documentation

API reference

License

MIT (license)

Dependencies

connectivity_plus, dio, flutter, hive, hive_flutter, http, plugin_platform_interface

More

Packages that depend on custom_api_services

Packages that implement custom_api_services