re factor rog

This commit is contained in:
2024-04-01 09:26:56 +05:30
parent dd36ab8399
commit edbf52825b
54 changed files with 2597 additions and 435 deletions

View File

@ -0,0 +1,14 @@
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:rogapp/features/data/user.dart';
import 'package:rogapp/features/services/auth_service.dart';
final authProvider =
FutureProvider.family<User?, String>((ref, credentials) async {
// Assuming credentials is a combined string of "email|password"
List<String> parts = credentials.split('|');
String email = parts[0];
String password = parts[1];
AuthService authService = AuthService();
return await authService.userLogin(email, password);
});