Skip to main content

localize_token_manager 1.0.1+7 copy "localize_token_manager: ^1.0.1+7" to clipboard
localize_token_manager: ^1.0.1+7 copied to clipboard

A clean, customizable API service package with Dio and refresh token handling

example/localize_token_manager_example.dart

import 'package:localize_token_manager/localize_token_manager.dart';

Future<void> main() async {
  // Initialize API service
  final api = LocalizeTokenManager(
    baseUrl: "https://api.example.com",
    defaultHeaders: {
      'App-Version': '1.0.0',
    },
  );

  // Example: POST request
  final loginResponse = await api.request(
    endpoint: '/auth/login',
    method: HttpMethod.post,
    body: {
      'email': 'info@gmail.com',
      'password': 'admin',
    },
    fromJson: (data) => null,
  );

  if (loginResponse.status) {
    print('Login successful: ${loginResponse.data}');
  }
}
0
likes
130
points
2
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

A clean, customizable API service package with Dio and refresh token handling

Repository (GitHub)
View/report issues

License

MIT (license)

Dependencies

dio, flutter_secure_storage

More

Packages that depend on localize_token_manager