implementAsBlocking static method
NSTextInputTraits
implementAsBlocking({
- NSTextInputTraitType autocorrectionType()?,
- void setAutocorrectionType_()?,
- NSTextInputTraitType spellCheckingType()?,
- void setSpellCheckingType_()?,
- NSTextInputTraitType grammarCheckingType()?,
- void setGrammarCheckingType_()?,
- NSTextInputTraitType smartQuotesType()?,
- void setSmartQuotesType_()?,
- NSTextInputTraitType smartDashesType()?,
- void setSmartDashesType_()?,
- NSTextInputTraitType smartInsertDeleteType()?,
- void setSmartInsertDeleteType_()?,
- NSTextInputTraitType textReplacementType()?,
- void setTextReplacementType_()?,
- NSTextInputTraitType dataDetectionType()?,
- void setDataDetectionType_()?,
- NSTextInputTraitType linkDetectionType()?,
- void setLinkDetectionType_()?,
- NSTextInputTraitType textCompletionType()?,
- void setTextCompletionType_()?,
- NSTextInputTraitType inlinePredictionType()?,
- void setInlinePredictionType_()?,
- NSTextInputTraitType mathExpressionCompletionType()?,
- void setMathExpressionCompletionType_()?,
- NSWritingToolsBehavior writingToolsBehavior()?,
- void setWritingToolsBehavior_()?,
- NSWritingToolsResultOptions allowedWritingToolsResultOptions()?,
- void setAllowedWritingToolsResultOptions_()?,
- bool $keepIsolateAlive = true,
Builds an object that implements the NSTextInputTraits protocol. To implement
multiple protocols, use addToBuilder or objc.ObjCProtocolBuilder directly. All
methods that can be implemented as blocking listeners will be.
If $keepIsolateAlive is true, this protocol will keep this isolate
alive until it is garbage collected by both Dart and ObjC.
Implementation
static NSTextInputTraits implementAsBlocking({
NSTextInputTraitType Function()? autocorrectionType,
void Function(NSTextInputTraitType)? setAutocorrectionType_,
NSTextInputTraitType Function()? spellCheckingType,
void Function(NSTextInputTraitType)? setSpellCheckingType_,
NSTextInputTraitType Function()? grammarCheckingType,
void Function(NSTextInputTraitType)? setGrammarCheckingType_,
NSTextInputTraitType Function()? smartQuotesType,
void Function(NSTextInputTraitType)? setSmartQuotesType_,
NSTextInputTraitType Function()? smartDashesType,
void Function(NSTextInputTraitType)? setSmartDashesType_,
NSTextInputTraitType Function()? smartInsertDeleteType,
void Function(NSTextInputTraitType)? setSmartInsertDeleteType_,
NSTextInputTraitType Function()? textReplacementType,
void Function(NSTextInputTraitType)? setTextReplacementType_,
NSTextInputTraitType Function()? dataDetectionType,
void Function(NSTextInputTraitType)? setDataDetectionType_,
NSTextInputTraitType Function()? linkDetectionType,
void Function(NSTextInputTraitType)? setLinkDetectionType_,
NSTextInputTraitType Function()? textCompletionType,
void Function(NSTextInputTraitType)? setTextCompletionType_,
NSTextInputTraitType Function()? inlinePredictionType,
void Function(NSTextInputTraitType)? setInlinePredictionType_,
NSTextInputTraitType Function()? mathExpressionCompletionType,
void Function(NSTextInputTraitType)? setMathExpressionCompletionType_,
NSWritingToolsBehavior Function()? writingToolsBehavior,
void Function(NSWritingToolsBehavior)? setWritingToolsBehavior_,
NSWritingToolsResultOptions Function()? allowedWritingToolsResultOptions,
void Function(NSWritingToolsResultOptions)?
setAllowedWritingToolsResultOptions_,
bool $keepIsolateAlive = true,
}) {
final builder = objc.ObjCProtocolBuilder(debugName: 'NSTextInputTraits');
NSTextInputTraits.autocorrectionType.implement(builder, autocorrectionType);
NSTextInputTraits.setAutocorrectionType_.implementAsBlocking(
builder,
setAutocorrectionType_,
);
NSTextInputTraits.spellCheckingType.implement(builder, spellCheckingType);
NSTextInputTraits.setSpellCheckingType_.implementAsBlocking(
builder,
setSpellCheckingType_,
);
NSTextInputTraits.grammarCheckingType.implement(
builder,
grammarCheckingType,
);
NSTextInputTraits.setGrammarCheckingType_.implementAsBlocking(
builder,
setGrammarCheckingType_,
);
NSTextInputTraits.smartQuotesType.implement(builder, smartQuotesType);
NSTextInputTraits.setSmartQuotesType_.implementAsBlocking(
builder,
setSmartQuotesType_,
);
NSTextInputTraits.smartDashesType.implement(builder, smartDashesType);
NSTextInputTraits.setSmartDashesType_.implementAsBlocking(
builder,
setSmartDashesType_,
);
NSTextInputTraits.smartInsertDeleteType.implement(
builder,
smartInsertDeleteType,
);
NSTextInputTraits.setSmartInsertDeleteType_.implementAsBlocking(
builder,
setSmartInsertDeleteType_,
);
NSTextInputTraits.textReplacementType.implement(
builder,
textReplacementType,
);
NSTextInputTraits.setTextReplacementType_.implementAsBlocking(
builder,
setTextReplacementType_,
);
NSTextInputTraits.dataDetectionType.implement(builder, dataDetectionType);
NSTextInputTraits.setDataDetectionType_.implementAsBlocking(
builder,
setDataDetectionType_,
);
NSTextInputTraits.linkDetectionType.implement(builder, linkDetectionType);
NSTextInputTraits.setLinkDetectionType_.implementAsBlocking(
builder,
setLinkDetectionType_,
);
NSTextInputTraits.textCompletionType.implement(builder, textCompletionType);
NSTextInputTraits.setTextCompletionType_.implementAsBlocking(
builder,
setTextCompletionType_,
);
NSTextInputTraits.inlinePredictionType.implement(
builder,
inlinePredictionType,
);
NSTextInputTraits.setInlinePredictionType_.implementAsBlocking(
builder,
setInlinePredictionType_,
);
NSTextInputTraits.mathExpressionCompletionType.implement(
builder,
mathExpressionCompletionType,
);
NSTextInputTraits.setMathExpressionCompletionType_.implementAsBlocking(
builder,
setMathExpressionCompletionType_,
);
NSTextInputTraits.writingToolsBehavior.implement(
builder,
writingToolsBehavior,
);
NSTextInputTraits.setWritingToolsBehavior_.implementAsBlocking(
builder,
setWritingToolsBehavior_,
);
NSTextInputTraits.allowedWritingToolsResultOptions.implement(
builder,
allowedWritingToolsResultOptions,
);
NSTextInputTraits.setAllowedWritingToolsResultOptions_.implementAsBlocking(
builder,
setAllowedWritingToolsResultOptions_,
);
builder.addProtocol($protocol);
return NSTextInputTraits.castFrom(
builder.build(keepIsolateAlive: $keepIsolateAlive),
);
}