✨ Almost everywhere click avatar can open popup profile
This commit is contained in:
parent
f239fbbed6
commit
e84bca8948
@ -3,6 +3,7 @@ import 'package:get/get.dart';
|
|||||||
import 'package:solian/models/friendship.dart';
|
import 'package:solian/models/friendship.dart';
|
||||||
import 'package:solian/providers/friend.dart';
|
import 'package:solian/providers/friend.dart';
|
||||||
import 'package:solian/widgets/account/account_avatar.dart';
|
import 'package:solian/widgets/account/account_avatar.dart';
|
||||||
|
import 'package:solian/widgets/account/account_profile_popup.dart';
|
||||||
|
|
||||||
class SliverFriendList extends StatelessWidget {
|
class SliverFriendList extends StatelessWidget {
|
||||||
final int accountId;
|
final int accountId;
|
||||||
@ -49,7 +50,20 @@ class SliverFriendList extends StatelessWidget {
|
|||||||
child: ListTile(
|
child: ListTile(
|
||||||
title: Text(otherside.nick),
|
title: Text(otherside.nick),
|
||||||
subtitle: Text(otherside.name),
|
subtitle: Text(otherside.name),
|
||||||
leading: AccountAvatar(content: otherside.avatar),
|
leading: GestureDetector(
|
||||||
|
child: AccountAvatar(content: otherside.avatar),
|
||||||
|
onTap: () {
|
||||||
|
showModalBottomSheet(
|
||||||
|
useRootNavigator: true,
|
||||||
|
isScrollControlled: true,
|
||||||
|
backgroundColor: Theme.of(context).colorScheme.surface,
|
||||||
|
context: context,
|
||||||
|
builder: (context) => AccountProfilePopup(
|
||||||
|
account: otherside,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
},
|
||||||
|
),
|
||||||
),
|
),
|
||||||
onDismissed: (direction) {
|
onDismissed: (direction) {
|
||||||
final FriendProvider provider = Get.find();
|
final FriendProvider provider = Get.find();
|
||||||
|
@ -6,6 +6,7 @@ import 'package:solian/models/channel.dart';
|
|||||||
import 'package:solian/providers/auth.dart';
|
import 'package:solian/providers/auth.dart';
|
||||||
import 'package:solian/services.dart';
|
import 'package:solian/services.dart';
|
||||||
import 'package:solian/widgets/account/account_avatar.dart';
|
import 'package:solian/widgets/account/account_avatar.dart';
|
||||||
|
import 'package:solian/widgets/account/account_profile_popup.dart';
|
||||||
import 'package:solian/widgets/account/friend_select.dart';
|
import 'package:solian/widgets/account/friend_select.dart';
|
||||||
|
|
||||||
class ChannelMemberListPopup extends StatefulWidget {
|
class ChannelMemberListPopup extends StatefulWidget {
|
||||||
@ -151,7 +152,20 @@ class _ChannelMemberListPopupState extends State<ChannelMemberListPopup> {
|
|||||||
return ListTile(
|
return ListTile(
|
||||||
title: Text(element.account.nick),
|
title: Text(element.account.nick),
|
||||||
subtitle: Text(element.account.name),
|
subtitle: Text(element.account.name),
|
||||||
leading: AccountAvatar(content: element.account.avatar),
|
leading: GestureDetector(
|
||||||
|
child: AccountAvatar(content: element.account.avatar),
|
||||||
|
onTap: () {
|
||||||
|
showModalBottomSheet(
|
||||||
|
useRootNavigator: true,
|
||||||
|
isScrollControlled: true,
|
||||||
|
backgroundColor: Theme.of(context).colorScheme.surface,
|
||||||
|
context: context,
|
||||||
|
builder: (context) => AccountProfilePopup(
|
||||||
|
account: element.account,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
},
|
||||||
|
),
|
||||||
trailing: Row(
|
trailing: Row(
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
children: [
|
children: [
|
||||||
|
@ -7,6 +7,7 @@ import 'package:font_awesome_flutter/font_awesome_flutter.dart';
|
|||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
import 'package:solian/models/message.dart';
|
import 'package:solian/models/message.dart';
|
||||||
import 'package:solian/widgets/account/account_avatar.dart';
|
import 'package:solian/widgets/account/account_avatar.dart';
|
||||||
|
import 'package:solian/widgets/account/account_profile_popup.dart';
|
||||||
import 'package:solian/widgets/attachments/attachment_list.dart';
|
import 'package:solian/widgets/attachments/attachment_list.dart';
|
||||||
import 'package:timeago/timeago.dart' show format;
|
import 'package:timeago/timeago.dart' show format;
|
||||||
import 'package:url_launcher/url_launcher_string.dart';
|
import 'package:url_launcher/url_launcher_string.dart';
|
||||||
@ -140,7 +141,20 @@ class ChatMessage extends StatelessWidget {
|
|||||||
Row(
|
Row(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
AccountAvatar(content: item.sender.account.avatar),
|
GestureDetector(
|
||||||
|
child: AccountAvatar(content: item.sender.account.avatar),
|
||||||
|
onTap: () {
|
||||||
|
showModalBottomSheet(
|
||||||
|
useRootNavigator: true,
|
||||||
|
isScrollControlled: true,
|
||||||
|
backgroundColor: Theme.of(context).colorScheme.surface,
|
||||||
|
context: context,
|
||||||
|
builder: (context) => AccountProfilePopup(
|
||||||
|
account: item.sender.account,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
},
|
||||||
|
),
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Column(
|
child: Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
@ -6,6 +6,7 @@ import 'package:solian/models/realm.dart';
|
|||||||
import 'package:solian/providers/auth.dart';
|
import 'package:solian/providers/auth.dart';
|
||||||
import 'package:solian/services.dart';
|
import 'package:solian/services.dart';
|
||||||
import 'package:solian/widgets/account/account_avatar.dart';
|
import 'package:solian/widgets/account/account_avatar.dart';
|
||||||
|
import 'package:solian/widgets/account/account_profile_popup.dart';
|
||||||
import 'package:solian/widgets/account/friend_select.dart';
|
import 'package:solian/widgets/account/friend_select.dart';
|
||||||
|
|
||||||
class RealmMemberListPopup extends StatefulWidget {
|
class RealmMemberListPopup extends StatefulWidget {
|
||||||
@ -148,7 +149,20 @@ class _RealmMemberListPopupState extends State<RealmMemberListPopup> {
|
|||||||
return ListTile(
|
return ListTile(
|
||||||
title: Text(element.account.nick),
|
title: Text(element.account.nick),
|
||||||
subtitle: Text(element.account.name),
|
subtitle: Text(element.account.name),
|
||||||
leading: AccountAvatar(content: element.account.avatar),
|
leading: GestureDetector(
|
||||||
|
child: AccountAvatar(content: element.account.avatar),
|
||||||
|
onTap: () {
|
||||||
|
showModalBottomSheet(
|
||||||
|
useRootNavigator: true,
|
||||||
|
isScrollControlled: true,
|
||||||
|
backgroundColor: Theme.of(context).colorScheme.surface,
|
||||||
|
context: context,
|
||||||
|
builder: (context) => AccountProfilePopup(
|
||||||
|
account: element.account,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
},
|
||||||
|
),
|
||||||
trailing: Row(
|
trailing: Row(
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
children: [
|
children: [
|
||||||
|
Loading…
Reference in New Issue
Block a user