rename a widget contructor
This commit is contained in:
parent
dec2147b38
commit
347ba7aae5
|
@ -30,7 +30,7 @@ class UserPage extends HookWidget {
|
|||
|
||||
final body = () {
|
||||
if (userDetailsSnap.hasData) {
|
||||
return UserProfile.fromUserDetails(userDetailsSnap.data);
|
||||
return UserProfile.fromFullUserView(userDetailsSnap.data);
|
||||
} else if (userDetailsSnap.hasError) {
|
||||
return const Center(child: Text('Could not find that user.'));
|
||||
} else {
|
||||
|
|
|
@ -24,9 +24,9 @@ class UserProfile extends HookWidget {
|
|||
: _userDetails = LemmyApiV2(instanceHost).run(GetUserDetails(
|
||||
userId: userId, savedOnly: false, sort: SortType.active));
|
||||
|
||||
UserProfile.fromUserDetails(FullUserView userDetails)
|
||||
: _userDetails = Future.value(userDetails),
|
||||
instanceHost = userDetails.instanceHost;
|
||||
UserProfile.fromFullUserView(FullUserView fullUserView)
|
||||
: _userDetails = Future.value(fullUserView),
|
||||
instanceHost = fullUserView.instanceHost;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
|
|
Loading…
Reference in New Issue