The copy/paste functionalities don't work only on iOS in the Flutter app

19 views Asked by At

I am using reactive_forms for handling user input in my flutter project. Once double click ReactiveTextField copy/paste functionalities don't work only on iOS (working on android). What is the problem? Here is my code:

Widget _buildTextField() {
    return Padding(
      padding: const EdgeInsets.symmetric(vertical: 4.0),
      child: ReactiveTextField<String>(
        formControl: formControl as FormControl<String>?,
        formControlName: name,
        autofocus: autoFocus,
        textAlign: TextAlign.start,
        textAlignVertical: TextAlignVertical.top,
        inputFormatters: [
          LengthLimitingTextInputFormatter(maxLength),
          ...(formatters ?? []),
        ],
        keyboardType: inputType,
        obscureText: obscureText,
        maxLines: maxLines,
        style: size14weight400.copyWith(color: secondaryTextColor),
        decoration: InputDecoration(
          prefix: prefix,
          suffixIcon: suffix,
          labelText: style == CustomTextFieldStyle.withHint ? name.tr() : null,
          labelStyle: size14weight400.copyWith(color: brandBlack60Color),
          hintStyle: size14weight400.copyWith(color: secondaryTextColor),
          floatingLabelBehavior: FloatingLabelBehavior.always,
          fillColor: textFieldBackgroundColor,
          filled: true,
          focusedBorder: OutlineInputBorder(
            borderRadius: BorderRadius.circular(4.0),
            borderSide: BorderSide(color: primaryColor, width: 1.5),
          ),
          errorBorder: OutlineInputBorder(
            borderRadius: BorderRadius.circular(4.0),
            borderSide: BorderSide(color: errorColor, width: 1.5),
          ),
          enabledBorder: OutlineInputBorder(
            borderRadius: BorderRadius.circular(4.0),
            borderSide: BorderSide(color: textFieldBorderColor, width: 1.5),
          ),
          contentPadding:
              EdgeInsets.symmetric(vertical: 15.5, horizontal: 16.0),
          border: OutlineInputBorder(
            borderRadius: BorderRadius.circular(4.0),
            borderSide: BorderSide(color: textFieldBorderColor, width: 1.5),
          ),
        ),
      ),
    );
  }

I am expecting to use default copy/paste funcs.

0

There are 0 answers