feat(ui): add support for StreamMessageInput.contentInsertionConfiguration.
Signed-off-by: xsahil03x <[email protected]>
(cherry picked from commit bdc85b4873)
This commit is contained in:
@@ -147,6 +147,7 @@ class StreamMessageInput extends StatefulWidget {
|
|||||||
_defaultClearQuotedMessageKeyPredicate,
|
_defaultClearQuotedMessageKeyPredicate,
|
||||||
this.ogPreviewFilter = _defaultOgPreviewFilter,
|
this.ogPreviewFilter = _defaultOgPreviewFilter,
|
||||||
this.hintGetter = _defaultHintGetter,
|
this.hintGetter = _defaultHintGetter,
|
||||||
|
this.contentInsertionConfiguration,
|
||||||
});
|
});
|
||||||
|
|
||||||
/// The predicate used to send a message on desktop/web
|
/// The predicate used to send a message on desktop/web
|
||||||
@@ -340,6 +341,9 @@ class StreamMessageInput extends StatefulWidget {
|
|||||||
/// Returns the hint text for the message input.
|
/// Returns the hint text for the message input.
|
||||||
final HintGetter hintGetter;
|
final HintGetter hintGetter;
|
||||||
|
|
||||||
|
/// {@macro flutter.widgets.editableText.contentInsertionConfiguration}
|
||||||
|
final ContentInsertionConfiguration? contentInsertionConfiguration;
|
||||||
|
|
||||||
static String? _defaultHintGetter(
|
static String? _defaultHintGetter(
|
||||||
BuildContext context,
|
BuildContext context,
|
||||||
HintType type,
|
HintType type,
|
||||||
@@ -904,6 +908,8 @@ class StreamMessageInputState extends State<StreamMessageInput>
|
|||||||
decoration: _getInputDecoration(context),
|
decoration: _getInputDecoration(context),
|
||||||
textCapitalization: widget.textCapitalization,
|
textCapitalization: widget.textCapitalization,
|
||||||
autocorrect: widget.autoCorrect,
|
autocorrect: widget.autoCorrect,
|
||||||
|
contentInsertionConfiguration:
|
||||||
|
widget.contentInsertionConfiguration,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -120,6 +120,7 @@ class StreamMessageTextField extends StatefulWidget {
|
|||||||
this.restorationId,
|
this.restorationId,
|
||||||
this.scribbleEnabled = true,
|
this.scribbleEnabled = true,
|
||||||
this.enableIMEPersonalizedLearning = true,
|
this.enableIMEPersonalizedLearning = true,
|
||||||
|
this.contentInsertionConfiguration,
|
||||||
}) : assert(obscuringCharacter.length == 1, ''),
|
}) : assert(obscuringCharacter.length == 1, ''),
|
||||||
smartDashesType = smartDashesType ??
|
smartDashesType = smartDashesType ??
|
||||||
(obscureText ? SmartDashesType.disabled : SmartDashesType.enabled),
|
(obscureText ? SmartDashesType.disabled : SmartDashesType.enabled),
|
||||||
@@ -526,6 +527,9 @@ class StreamMessageTextField extends StatefulWidget {
|
|||||||
/// {@macro flutter.services.TextInputConfiguration.enableIMEPersonalizedLearning}
|
/// {@macro flutter.services.TextInputConfiguration.enableIMEPersonalizedLearning}
|
||||||
final bool enableIMEPersonalizedLearning;
|
final bool enableIMEPersonalizedLearning;
|
||||||
|
|
||||||
|
/// {@macro flutter.widgets.editableText.contentInsertionConfiguration}
|
||||||
|
final ContentInsertionConfiguration? contentInsertionConfiguration;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
_StreamMessageTextFieldState createState() => _StreamMessageTextFieldState();
|
_StreamMessageTextFieldState createState() => _StreamMessageTextFieldState();
|
||||||
|
|
||||||
@@ -622,6 +626,9 @@ class StreamMessageTextField extends StatefulWidget {
|
|||||||
properties.add(DiagnosticsProperty<bool>(
|
properties.add(DiagnosticsProperty<bool>(
|
||||||
'enableIMEPersonalizedLearning', enableIMEPersonalizedLearning,
|
'enableIMEPersonalizedLearning', enableIMEPersonalizedLearning,
|
||||||
defaultValue: true));
|
defaultValue: true));
|
||||||
|
properties.add(DiagnosticsProperty<ContentInsertionConfiguration>(
|
||||||
|
'contentInsertionConfiguration', contentInsertionConfiguration,
|
||||||
|
defaultValue: null));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -727,6 +734,7 @@ class _StreamMessageTextFieldState extends State<StreamMessageTextField>
|
|||||||
restorationId: widget.restorationId,
|
restorationId: widget.restorationId,
|
||||||
scribbleEnabled: widget.scribbleEnabled,
|
scribbleEnabled: widget.scribbleEnabled,
|
||||||
enableIMEPersonalizedLearning: widget.enableIMEPersonalizedLearning,
|
enableIMEPersonalizedLearning: widget.enableIMEPersonalizedLearning,
|
||||||
|
contentInsertionConfiguration: widget.contentInsertionConfiguration,
|
||||||
);
|
);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
|||||||
Reference in New Issue
Block a user