Changing the content within the the composing region may cause the input method to behave strangely, and is therefore discouraged

Viewed 855

I have a problem with the Form & TextFormField Widgets. When I type an input on my emulator (both for Android and IOS) I'm getting errors. Here is a simple form with this issue:

import 'package:flutter/material.dart';

class EventDetails extends StatefulWidget {
  const EventDetails({Key? key}) : super(key: key);

  @override
  _EventDetailsState createState() => _EventDetailsState();
}

class _EventDetailsState extends State<EventDetails> {
  final eventNameCtrl = TextEditingController();
  final _formKey = GlobalKey<FormState>();

  @override
  Widget build(BuildContext context) {
    return Form(
      key: _formKey,
      child: Column(
        children: <Widget>[
          TextFormField(
            controller: eventNameCtrl,
          ),
        ],
      ),
    );
  }
}

Those are the errors:

Blockquote W/TextInputPlugin( 5008): Changing the content within the the composing region may cause the input method to behave strangely, and is therefore discouraged. See https://github.com/flutter/flutter/issues/78827 for more details W/IInputConnectionWrapper( 5008): getTextBeforeCursor on inactive InputConnection W/IInputConnectionWrapper( 5008): getSelectedText on inactive InputConnection W/IInputConnectionWrapper( 5008): getTextAfterCursor on inactive InputConnection W/IInputConnectionWrapper( 5008): beginBatchEdit on inactive InputConnection W/IInputConnectionWrapper( 5008): getTextBeforeCursor on inactive InputConnection W/IInputConnectionWrapper( 5008): endBatchEdit on inactive InputConnection

Why is this happening and how can I fix it? Thanks a lot.

0 Answers
Related