Files
kulakpos_web/walkthroughs/2026-04-14_ebbd4f55_Changes_Made.md
eko54r 05fd3230b8
All checks were successful
Build, Push and Deploy / build-and-push (push) Successful in 5m14s
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 17s
Build, Push and Deploy / deploy-staging (push) Successful in 41s
Build, Push and Deploy / deploy-production (push) Has been skipped
update marketing
2026-05-14 11:55:22 +07:00

1.7 KiB

Changes Made

Authentication & Global State

  • auth_state.dart: Added accessToken, id1, id2, and id3 as global variables and updated the logout() function to clear them.
  • login_page.dart: Updated the login handler to capture these new credentials from the API response and store them in the global state.

API Layer

  • leave_api.dart: Refactored getDropdownBawahan to use the globally stored accessToken, id1, id2, and id3 as default values. This simplifies API calls from the UI layer as these parameters are now optional.

Verification Results

Static Analysis

Ran flutter analyze on the modified files. No errors were found; only minor styling/linting suggestions (like avoid_print and deprecated withOpacity) were noted, but they do not affect functionality.

Manual Code Verification

Confirmed that login_page.dart correctly parses the response:

accessToken = result['data']?['access_token'];
id1 = result['data']?['id1']?.toString();
// ... etc

And leave_api.dart correctly consumes them:

final String activeToken = token ?? accessToken ?? "";
// ... etc