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,18 @@
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:rogapp/features/data/user.dart';
class UserNotifier extends StateNotifier<User?> {
UserNotifier() : super(null);
void setUser(User? user) {
state = user;
}
void clearUser() {
state = null;
}
}
final userNotifierProvider = StateNotifierProvider<UserNotifier, User?>((ref) {
return UserNotifier();
});