forked from Nexus/nexus
bump gomuks, fix profile issues caused by this
This commit is contained in:
parent
1621e917c0
commit
ae5b6e2b40
8 changed files with 50 additions and 30 deletions
|
|
@ -1,17 +1,19 @@
|
|||
import "package:flutter_riverpod/flutter_riverpod.dart";
|
||||
import "package:nexus/controllers/client.dart";
|
||||
import "package:nexus/models/profile.dart";
|
||||
import "package:nexus/models/profile_response.dart";
|
||||
|
||||
class ProfileController extends AsyncNotifier<Profile> {
|
||||
class ProfileController extends AsyncNotifier<ProfileResponse> {
|
||||
final String userId;
|
||||
ProfileController(this.userId);
|
||||
|
||||
@override
|
||||
Future<Profile> build() {
|
||||
Future<ProfileResponse> build() {
|
||||
final client = ref.watch(ClientController.provider.notifier);
|
||||
return client.getProfile(userId);
|
||||
}
|
||||
|
||||
static final provider = AsyncNotifierProvider.family
|
||||
.autoDispose<ProfileController, Profile, String>(ProfileController.new);
|
||||
.autoDispose<ProfileController, ProfileResponse, String>(
|
||||
ProfileController.new,
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue