Done Category, Product Catalogue, Customer, Vendor, Purchase Invoice Module

This commit is contained in:
2026-08-28 11:30:18 +05:30
parent 0d13833679
commit 189f49ed07
118 changed files with 12624 additions and 4004 deletions

View File

@@ -17,7 +17,7 @@ class AuthController extends AsyncNotifier<void> {
state = const AsyncValue.loading();
try {
final data = await _repository.login(email, password);
await DioClient().storage.write(key: 'jwt_token', value: data['token']);
await DioClient().saveToken(data['token']);
state = const AsyncValue.data(null);
return true;
} catch (e, st) {
@@ -42,7 +42,7 @@ class AuthController extends AsyncNotifier<void> {
state = const AsyncValue.loading();
try {
final data = await _repository.verifyOtp(email, otp);
await DioClient().storage.write(key: 'jwt_token', value: data['token']);
await DioClient().saveToken(data['token']);
state = const AsyncValue.data(null);
return true;
} catch (e, st) {
@@ -63,7 +63,11 @@ class AuthController extends AsyncNotifier<void> {
}
}
Future<bool> resetPassword(String email, String otp, String newPassword) async {
Future<bool> resetPassword(
String email,
String otp,
String newPassword,
) async {
state = const AsyncValue.loading();
try {
await _repository.resetPassword(email, otp, newPassword);