Add full app source

Adds the Flutter inventory app source, cleaned up for a shared repo:
generic package name, no hardcoded ERP endpoints (moved to gitignored
local config), no dead auth code, no debug logging of session data.
This commit is contained in:
BACHIR SOULDI
2026-07-16 14:37:28 +01:00
parent 37b0762921
commit 5a483da01d
110 changed files with 8081 additions and 0 deletions

View File

@@ -0,0 +1,25 @@
import 'package:get/get.dart';
import 'package:inventory_app/service/axelor_client.dart';
class UserController extends GetxController {
var isLoading = false.obs;
var user = Rx<Map<String, dynamic>?>(null);
Future<void> loadUser() async {
try {
isLoading.value = true;
final client = await AxelorClient.create();
final profile = await client.fetchUserProfile();
user.value = profile;
} catch (e) {
print("❌ Failed to load user: $e");
} finally {
isLoading.value = false;
}
}
// Optional: clear user when logging out
void clearUser() {
user.value = null;
}
}