redesign user popover
This commit is contained in:
parent
e15d947fac
commit
d46646d781
9 changed files with 302 additions and 272 deletions
|
|
@ -1,25 +1,18 @@
|
|||
import "package:flutter/material.dart";
|
||||
import "package:nexus/helpers/extensions/show_context_menu.dart";
|
||||
import "package:nexus/models/content/membership.dart";
|
||||
import "package:nexus/widgets/user_popover.dart";
|
||||
import "package:nexus/widgets/user_bottom_sheet.dart";
|
||||
|
||||
extension ShowUserPopover on BuildContext {
|
||||
void showUserPopover(
|
||||
MembershipContent member,
|
||||
String userId, {
|
||||
String? roomId,
|
||||
required Offset globalPosition,
|
||||
}) => showContextMenu(
|
||||
globalPosition: globalPosition,
|
||||
children: [
|
||||
PopupMenuItem(
|
||||
enabled: false,
|
||||
padding: .symmetric(horizontal: 16, vertical: 8),
|
||||
child: IconTheme(
|
||||
data: .new(),
|
||||
child: UserPopover(member, userId, roomId: roomId),
|
||||
),
|
||||
),
|
||||
],
|
||||
}) => showModalBottomSheet(
|
||||
constraints: BoxConstraints.loose(
|
||||
Size(500, View.of(this).physicalSize.height - 80),
|
||||
),
|
||||
isScrollControlled: true,
|
||||
context: this,
|
||||
builder: (context) => UserBottomSheet(member, userId, roomId: roomId),
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue