attach method
- TextInputClient trigger,
- TextInputConfiguration configuration
override
Allows a TextInputClient to attach to this scope. This method should be called in lieu of TextInput.attach, when the TextInputClient wishes to participate in autofill.
Implementation
@override
TextInputConnection attach(TextInputClient trigger, TextInputConfiguration configuration) {
assert(
!autofillClients.any((AutofillClient client) => !client.textInputConfiguration.autofillConfiguration.enabled),
'Every client in AutofillScope.autofillClients must enable autofill',
);
final TextInputConfiguration inputConfiguration = _AutofillScopeTextInputConfiguration(
allConfigurations: autofillClients.map((AutofillClient client) => client.textInputConfiguration),
currentClientConfiguration: configuration,
);
return TextInput.attach(trigger, inputConfiguration);
}