remove useless native code

This commit is contained in:
Salvatore Giordano
2020-10-29 10:02:22 +01:00
parent dcff11e188
commit 145351846d
+5 -1
View File
@@ -664,6 +664,7 @@ class MessageInputState extends State<MessageInput> {
Navigator.pop(context); Navigator.pop(context);
}, },
), ),
if (!kIsWeb)
ListTile( ListTile(
leading: Icon(Icons.camera_alt), leading: Icon(Icons.camera_alt),
title: Text('Photo from camera'), title: Text('Photo from camera'),
@@ -672,6 +673,7 @@ class MessageInputState extends State<MessageInput> {
Navigator.pop(context); Navigator.pop(context);
}, },
), ),
if (!kIsWeb)
ListTile( ListTile(
leading: Icon(Icons.videocam), leading: Icon(Icons.videocam),
title: Text('Video from camera'), title: Text('Video from camera'),
@@ -943,6 +945,7 @@ class MessageInputState extends State<MessageInput> {
void initState() { void initState() {
super.initState(); super.initState();
if (!kIsWeb) {
_keyboardListener = KeyboardVisibility.onChange.listen((visible) { _keyboardListener = KeyboardVisibility.onChange.listen((visible) {
if (visible) { if (visible) {
if (_commandsOverlay != null) { if (_commandsOverlay != null) {
@@ -971,6 +974,7 @@ class MessageInputState extends State<MessageInput> {
} }
} }
}); });
}
textEditingController = textEditingController =
widget.textEditingController ?? TextEditingController(); widget.textEditingController ?? TextEditingController();
@@ -997,7 +1001,7 @@ class MessageInputState extends State<MessageInput> {
void dispose() { void dispose() {
_commandsOverlay?.remove(); _commandsOverlay?.remove();
_mentionsOverlay?.remove(); _mentionsOverlay?.remove();
_keyboardListener.cancel(); _keyboardListener?.cancel();
super.dispose(); super.dispose();
} }