mirror of
https://gitlab.com/famedly/fluffychat.git
synced 2024-11-06 20:19:30 +01:00
fix: Make sure the textfield is unfocused before opening the camera
This commit is contained in:
parent
605327bc05
commit
6821a421b6
@ -290,7 +290,8 @@ class ChatController extends State<Chat> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void openCameraAction() async {
|
void openCameraAction() async {
|
||||||
inputFocus.unfocus();
|
// Make sure the textfield is unfocused before opening the camera
|
||||||
|
FocusScope.of(context).requestFocus(FocusNode());
|
||||||
final file = await ImagePicker().getImage(source: ImageSource.camera);
|
final file = await ImagePicker().getImage(source: ImageSource.camera);
|
||||||
if (file == null) return;
|
if (file == null) return;
|
||||||
final bytes = await file.readAsBytes();
|
final bytes = await file.readAsBytes();
|
||||||
|
Loading…
Reference in New Issue
Block a user