♻️ Migrated to riverpod v3
This commit is contained in:
@@ -15,8 +15,16 @@ import 'package:styled_widget/styled_widget.dart';
|
||||
|
||||
part 'status.g.dart';
|
||||
|
||||
class CurrentAccountStatusNotifier extends StateNotifier<SnAccountStatus?> {
|
||||
CurrentAccountStatusNotifier() : super(null);
|
||||
final currentAccountStatusProvider =
|
||||
NotifierProvider<CurrentAccountStatusNotifier, SnAccountStatus?>(
|
||||
CurrentAccountStatusNotifier.new,
|
||||
);
|
||||
|
||||
class CurrentAccountStatusNotifier extends Notifier<SnAccountStatus?> {
|
||||
@override
|
||||
SnAccountStatus? build() {
|
||||
return null;
|
||||
}
|
||||
|
||||
void setStatus(SnAccountStatus status) {
|
||||
state = status;
|
||||
@@ -27,13 +35,6 @@ class CurrentAccountStatusNotifier extends StateNotifier<SnAccountStatus?> {
|
||||
}
|
||||
}
|
||||
|
||||
final currentAccountStatusProvider =
|
||||
StateNotifierProvider<CurrentAccountStatusNotifier, SnAccountStatus?>((
|
||||
ref,
|
||||
) {
|
||||
return CurrentAccountStatusNotifier();
|
||||
});
|
||||
|
||||
@riverpod
|
||||
Future<SnAccountStatus?> accountStatus(Ref ref, String uname) async {
|
||||
final userInfo = ref.watch(userInfoProvider);
|
||||
|
||||
Reference in New Issue
Block a user