dash_kit_network 4.3.0 dash_kit_network: ^4.3.0 copied to clipboard
The DashKit plugin that provides basic network functionality including token refresh.
import 'package:dash_kit_network/dash_kit_network.dart';
import 'package:example/api/application_api.dart';
import 'package:example/app.dart';
import 'package:flutter/material.dart';
void main() {
final dio = Dio();
const apiEnvironment = ApiEnvironment(
baseUrl: 'https://reqres.in/api/',
validateRequestsByDefault: false,
);
final apiClient = ApplicationApi(
dio: dio,
environment: apiEnvironment,
);
dio.interceptors.add(LogInterceptor(
requestBody: true,
responseBody: true,
));
runApp(MyApp(
apiClient: apiClient,
));
}