dash_kit_network 2.0.4
dash_kit_network: ^2.0.4 copied to clipboard

Flutter Android iOS

The DashKit component that provides basic network functionality includes a token refreshing.

example/lib/main.dart

import 'package:example/app.dart';
import 'package:flutter/material.dart';
import 'package:dash_kit_network/dash_kit_network.dart';

import 'api/application_api.dart';

void main() {
  final dio = Dio();

  const apiEnvironment = ApiEnvironment(
    baseUrl: 'https://reqres.in/api/',
    validateRequestsByDefaut: false,
    isRequestsAuthorisedByDefault: false,
  );

  final apiClient = ApplicationApi(
    dio: dio,
    environment: apiEnvironment,
  );

  dio.interceptors.add(LogInterceptor(
    request: true,
    requestBody: true,
    requestHeader: true,
    responseBody: true,
  ));

  runApp(MyApp(
    apiClient: apiClient,
  ));
}
2
likes
80
pub points
41%
popularity

The DashKit component that provides basic network functionality includes a token refreshing.

Repository (GitHub)
View/report issues

Documentation

API reference

Uploader

flutter.dash.kit@gmail.com

License

MIT (LICENSE)

Dependencies

dio, flutter, flutter_secure_storage, meta, rxdart, shared_preferences

More

Packages that depend on dash_kit_network