nexus/lib/controllers/profile_controller.dart
2026-01-30 18:45:55 +01:00

17 lines
530 B
Dart

import "package:flutter_riverpod/flutter_riverpod.dart";
import "package:nexus/controllers/client_controller.dart";
import "package:nexus/models/profile.dart";
class ProfileController extends AsyncNotifier<Profile> {
final String userId;
ProfileController(this.userId);
@override
Future<Profile> build() =>
ref.watch(ClientController.provider.notifier).getProfile(userId);
static final provider =
AsyncNotifierProvider.family<ProfileController, Profile, String>(
ProfileController.new,
);
}