contentInsertionConfiguration property

ContentInsertionConfiguration? contentInsertionConfiguration
final

Configuration of handler for media content inserted via the system input method.

Defaults to null in which case media content insertion will be disabled, and the system will display a message informing the user that the text field does not support inserting media content.

Set ContentInsertionConfiguration.onContentInserted to provide a handler. Additionally, set ContentInsertionConfiguration.allowedMimeTypes to limit the allowable mime types for inserted content.

{@tool dartpad}

This example shows how to access the data for inserted content in your TextField.

** See code in examples/api/lib/widgets/editable_text/editable_text.on_content_inserted.0.dart ** {@end-tool}

If contentInsertionConfiguration is not provided, by default an empty list of mime types will be sent to the Flutter Engine. A handler function must be provided in order to customize the allowable mime types for inserted content.

If rich content is inserted without a handler, the system will display a message informing the user that the current text input does not support inserting rich content.

Implementation

final ContentInsertionConfiguration? contentInsertionConfiguration;