smart_api 1.0.1
smart_api: ^1.0.1 copied to clipboard
Dynamic Dio wrapper for Flutter — auto raw/multipart detection, global loader/snackbar hooks, configurable session-expiry & error handling, no-internet retry, and one-line API calls (no repeated try/c [...]
Use this package as a library
Depend on it
Run this command:
With Dart:
$ dart pub add smart_apiWith Flutter:
$ flutter pub add smart_apiThis will add a line like this to your package's pubspec.yaml (and run an implicit dart pub get):
dependencies:
smart_api: ^1.0.1Alternatively, your editor might support dart pub get or flutter pub get. Check the docs for your editor to learn more.
Import it
Now in your Dart code, you can use:
import 'package:smart_api/generated/assets.dart';
import 'package:smart_api/main.dart';
import 'package:smart_api/smart_api_client.dart';
import 'package:smart_api/smart_api_config.dart';
import 'package:smart_api/smart_api_hooks.dart';
import 'package:smart_api/smart_api_request.dart';
import 'package:smart_api/smart_api_response.dart';