mirror of
https://git.proxmox.com/git/flutter/proxmox_login_manager.git
synced 2026-12-01 19:03:13 +00:00
No description
- Dart 100%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
Flutter 3.50 deprecates package:flutter/material.dart in favor of the standalone material_ui package, which defines separate runtime widget and localization types. Mixing the two across packages breaks widget lookup at runtime when host apps migrate to material_ui. Add material_ui (^1.1.0), raise the SDK constraints to Dart 3.13 and Flutter 3.47, and switch Material imports to package:material_ui. Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com> |
||
| assets | ||
| lib | ||
| test | ||
| .gitignore | ||
| .metadata | ||
| analysis_options.yaml | ||
| LICENSE | ||
| pubspec.lock | ||
| pubspec.yaml | ||
| README.md | ||
proxmox_login_manager
A basic login management library which handles authentication in combination with the proxmox_dart_api_client library.
You need to build the model classes before using it, to do this use:
flutter packages pub run build_runner build
Basic usage:
ProxmoxLoginSelector(
onLogin: (ProxmoxApiClient client) => whatever you want to do with the client,
),
This will give you an authenticated ProxmoxApiClient for usage in your project.
The latest session will be saved and can be recovered.
loginStorage = await ProxmoxLoginStorage.fromLocalStorage();
final apiClient = await loginStorage.recoverLatestSession();
This will either return an authenticated ProxmoxApiClient or will result in an Exception (ProxmoxApiException).
To clear all session on logout you can use:
ProxmoxLoginStorage.fromLocalStorage()
.then((storage) => storage?.invalidateAllSessions());