A complete implementation of authentication and Rest API connection with the backends that use Django Rest Framework.

Features

Supports SimpleJWT

Automatically store tokens and refresh

Make quick REST API requests to your DRF backend

Getting started

To install it just run:

flutter pub add django_rest_framework_client

and import in in your files like this:

import 'package:django_rest_framework_client/django_rest_framework_client.dart';

Usage

You can find best practices of using this package in example app.

To use this package, initialize this class:


// initialize
final DRFApi api = DRFApi('https://your-drf-api.com/v1/api');

// login
// api.login('username', 'password');

// logout
// api.logout();

// request
// api.get('path'); api.post('path', {'body': 'content'} );


Additional information

For more info and help:

https://docs.tijorat.org/flutter/django-rest-framework-client