re factor rog
This commit is contained in:
14
lib/features/services/auth_repo.dart
Normal file
14
lib/features/services/auth_repo.dart
Normal 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);
|
||||
});
|
||||
Reference in New Issue
Block a user