fix(ui): fix ios
This commit is contained in:
@@ -98,14 +98,22 @@ class _OverlayBuilderState extends State<OverlayBuilder>
|
||||
}
|
||||
}
|
||||
|
||||
EdgeInsets? _previousInsets;
|
||||
|
||||
@override
|
||||
void didChangeMetrics() {
|
||||
super.didChangeMetrics();
|
||||
|
||||
SchedulerBinding.instance!.addPostFrameCallback((_) {
|
||||
hideOverlay();
|
||||
syncWidgetAndOverlay();
|
||||
});
|
||||
final newInsets = MediaQuery.of(context).viewPadding;
|
||||
|
||||
if (newInsets.bottom != _previousInsets?.bottom) {
|
||||
WidgetsBinding.instance!.addPostFrameCallback((_) {
|
||||
hideOverlay();
|
||||
syncWidgetAndOverlay();
|
||||
});
|
||||
|
||||
_previousInsets = newInsets;
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
|
||||
@@ -470,7 +470,7 @@ class MessageInputState extends State<MessageInput> {
|
||||
overlayOptions: [
|
||||
OverlayOption(
|
||||
overlayBuilder: (context, offset) => CenterAbout(
|
||||
position: Offset(offset.dx, offset.dy),
|
||||
position: offset,
|
||||
child: _buildMentionsOverlayEntry(),
|
||||
),
|
||||
showOverlay: _showMentionsOverlay,
|
||||
@@ -478,7 +478,7 @@ class MessageInputState extends State<MessageInput> {
|
||||
OverlayOption(
|
||||
showOverlay: _showCommandsOverlay,
|
||||
overlayBuilder: (context, offset) => CenterAbout(
|
||||
position: Offset(offset.dx, offset.dy),
|
||||
position: offset,
|
||||
child: _buildCommandsOverlayEntry(),
|
||||
),
|
||||
),
|
||||
@@ -493,10 +493,11 @@ class MessageInputState extends State<MessageInput> {
|
||||
)
|
||||
.contains(':'),
|
||||
overlayBuilder: (context, offset) => CenterAbout(
|
||||
position: Offset(offset.dx, offset.dy),
|
||||
position: offset,
|
||||
child: _buildEmojiOverlay(),
|
||||
),
|
||||
),
|
||||
...widget.customOverlays,
|
||||
],
|
||||
child: child,
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user