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