pub struct DefaultProcessTextService;Expand description
The service used by default for the text processing feature.
Any widget may use this service to get a list of text processing actions and send requests to activate these text actions.
This is currently only supported on Android and it requires adding the
following ‘
<manifest ...>
<application ...>
...
</application>
<!-- Required to query activities that can process text, see:
https://developer.android.com/training/package-visibility and
https://developer.android.com/reference/android/content/Intent#ACTION_PROCESS_TEXT.
In particular, this is used by the Flutter engine in io.flutter.plugin.text.ProcessTextPlugin. -->
<queries>
<intent>
<action android:name="android.intent.action.PROCESS_TEXT"/>
<data android:mimeType="text/plain"/>
</intent>
</queries>
</manifest>The ‘
If the ‘query_text_actions will return an
empty list of ProcessTextAction.
See also:
ProcessTextService, the service that this implements.
Implementations§
Source§impl DefaultProcessTextService
impl DefaultProcessTextService
Sourcepub fn new() -> DefaultProcessTextService
pub fn new() -> DefaultProcessTextService
Creates the default service to interact with the platform text processing feature.
Trait Implementations§
Source§impl Clone for DefaultProcessTextService
impl Clone for DefaultProcessTextService
Source§impl Debug for DefaultProcessTextService
impl Debug for DefaultProcessTextService
Source§impl Default for DefaultProcessTextService
impl Default for DefaultProcessTextService
Source§impl ProcessTextService for DefaultProcessTextService
impl ProcessTextService for DefaultProcessTextService
Source§fn process_text_action(
&self,
app: &App,
id: &str,
text: &str,
read_only: bool,
) -> Option<String>
fn process_text_action( &self, app: &App, id: &str, text: &str, read_only: bool, ) -> Option<String>
On Android, the readOnly parameter might be used by the targeted activity, see: https://developer.android.com/reference/android/content/Intent#EXTRA_PROCESS_TEXT_READONLY.