md_api_service 0.0.2 md_api_service: ^0.0.2 copied to clipboard
A Base API Service to use single Dio for multiple host and make model mapping easier.
Use this package as a library
Depend on it
Run this command:
With Flutter:
$ flutter pub add md_api_service
This will add a line like this to your package's pubspec.yaml (and run an implicit flutter pub get
):
dependencies:
md_api_service: ^0.0.2
Alternatively, your editor might support flutter pub get
. Check the docs for your editor to learn more.
Import it
Now in your Dart code, you can use:
import 'package:md_api_service/api_service.dart';
import 'package:md_api_service/base/base_api_service.dart';
import 'package:md_api_service/extensions/request_options_ext.dart';
import 'package:md_api_service/helpers/http_headers.dart';
import 'package:md_api_service/helpers/http_method.dart';
import 'package:md_api_service/helpers/http_status.dart';
import 'package:md_api_service/helpers/network_request_options.dart';
import 'package:md_api_service/logger/log.dart';
import 'package:md_api_service/logger/logger_output.dart';
import 'package:md_api_service/logger/network/log_options.dart';
import 'package:md_api_service/logger/network/network_log_interceptor.dart';
import 'package:md_api_service/logger/network/network_logger.dart';
import 'package:md_api_service/logger/pretty_log_printer.dart';
import 'package:md_api_service/models/api_error.dart';
import 'package:md_api_service/models/api_response.dart';
import 'package:md_api_service/models/base_api_input.dart';
import 'package:md_api_service/models/json_array.dart';
import 'package:md_api_service/models/json_object.dart';
import 'package:md_api_service/models/type_alias.dart';