setUser method
Pushes the identity the host app knows to the community profile.
Implementation
@override
Future<AppwinCommunityUser?> setUser({
String? nickname,
String? avatarUrl,
String? bio,
}) async {
// `null` fields are stripped: natively, absent means "do not touch", while
// an explicit `null` would mean "clear".
final attributes = <String, dynamic>{
'nickname': ?nickname,
'avatarUrl': ?avatarUrl,
'bio': ?bio,
};
final raw = await methodChannel.invokeMethod<Map<dynamic, dynamic>>(
'setUser',
attributes,
);
if (raw == null) return null;
return AppwinCommunityUser.fromMap(raw);
}