Package io.flutter.plugin.editing

## Class TextInputPlugin

- java.lang.Object
- - io.flutter.plugin.editing.TextInputPlugin

-     public class TextInputPlugin
      extends Object

  Android implementation of the text input plugin.

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `TextInputPlugin​(View view, TextInputChannel textInputChannel, PlatformViewsController platformViewsController)` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `autofill​(SparseArray<AutofillValue> values)` |
    `void` | `clearPlatformViewClient​(int platformViewId)` | Clears a platform view text input client if it is the current input target.
    `InputConnection` | `createInputConnection​(View view, KeyboardManager keyboardManager, EditorInfo outAttrs)` |
    `void` | `destroy()` | Detaches the text input plugin from the platform views controller.
    `void` | `didChangeEditingState​(boolean textChanged, boolean selectionChanged, boolean composingRegionChanged)` |
    `InputMethodManager` | `getInputMethodManager()` |
    `InputConnection` | `getLastInputConnection()` |
    `boolean` | `handleKeyEvent​(KeyEvent keyEvent)` |
    `void` | `onProvideAutofillVirtualStructure​(ViewStructure structure, int flags)` |
    `void` | `sendTextInputAppPrivateCommand​(String action, Bundle data)` |

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### TextInputPlugin

          public TextInputPlugin​(@NonNull
                                 View view,
                                 @NonNull
                                 TextInputChannel textInputChannel,
                                 @NonNull
                                 PlatformViewsController platformViewsController)

  - ### Method Detail

    - #### getInputMethodManager

          @NonNull
          public InputMethodManager getInputMethodManager()

    - #### destroy

          public void destroy()

      Detaches the text input plugin from the platform views controller.

      The TextInputPlugin instance should not be used after calling this.

    - #### createInputConnection

          @Nullable
          public InputConnection createInputConnection​(@NonNull
                                                       View view,
                                                       @NonNull
                                                       KeyboardManager keyboardManager,
                                                       @NonNull
                                                       EditorInfo outAttrs)

    - #### getLastInputConnection

          @Nullable
          public InputConnection getLastInputConnection()

    - #### clearPlatformViewClient

          public void clearPlatformViewClient​(int platformViewId)

      Clears a platform view text input client if it is the current input target.

      This is called when a platform view is disposed to make sure we're not hanging to a stale input connection.

    - #### sendTextInputAppPrivateCommand

          public void sendTextInputAppPrivateCommand​(@NonNull
                                                     String action,
                                                     @NonNull
                                                     Bundle data)

    - #### handleKeyEvent

          public boolean handleKeyEvent​(@NonNull
                                        KeyEvent keyEvent)

    - #### didChangeEditingState

          public void didChangeEditingState​(boolean textChanged,
                                            boolean selectionChanged,
                                            boolean composingRegionChanged)

    - #### onProvideAutofillVirtualStructure

          public void onProvideAutofillVirtualStructure​(@NonNull
                                                        ViewStructure structure,
                                                        int flags)

    - #### autofill

          public void autofill​(@NonNull
                               SparseArray<AutofillValue> values)