@@ -1016,7 +1016,7 @@ class StreamMessageInputState extends State<StreamMessageInput>
10161016 },
10171017 onDragExited: (details) {},
10181018 child: Container (
1019- margin: widget.textInputMargin ?? margin,
1019+ margin: margin,
10201020 clipBehavior: Clip .hardEdge,
10211021 decoration: BoxDecoration (
10221022 borderRadius: _messageInputTheme.borderRadius,
@@ -1035,25 +1035,46 @@ class StreamMessageInputState extends State<StreamMessageInput>
10351035 _buildAttachments (),
10361036 LimitedBox (
10371037 maxHeight: widget.maxHeight,
1038- child: Focus (
1039- skipTraversal: true ,
1040- onKeyEvent: _handleKeyPressed,
1041- child: StreamMessageTextField (
1042- key: const Key ('messageInputText' ),
1043- maxLines: widget.maxLines,
1044- minLines: widget.minLines,
1045- textInputAction: widget.textInputAction,
1046- onSubmitted: (_) => sendMessage (),
1047- keyboardType: widget.keyboardType,
1048- controller: _effectiveController,
1049- focusNode: _effectiveFocusNode,
1050- style: _messageInputTheme.inputTextStyle,
1051- autofocus: widget.autofocus,
1052- textAlignVertical: TextAlignVertical .center,
1053- decoration: _getInputDecoration (context),
1054- textCapitalization: widget.textCapitalization,
1055- autocorrect: widget.autoCorrect,
1056- contentInsertionConfiguration: widget.contentInsertionConfiguration,
1038+ child: PlatformWidgetBuilder (
1039+ web: (context, child) => Focus (
1040+ skipTraversal: true ,
1041+ onKeyEvent: _handleKeyPressed,
1042+ child: child! ,
1043+ ),
1044+ desktop: (context, child) => Focus (
1045+ skipTraversal: true ,
1046+ onKeyEvent: _handleKeyPressed,
1047+ child: child! ,
1048+ ),
1049+ mobile: (context, child) => Focus (
1050+ skipTraversal: true ,
1051+ onKeyEvent: _handleKeyPressed,
1052+ child: child! ,
1053+ ),
1054+ child: Row (
1055+ children: [
1056+ Flexible (
1057+ child: StreamMessageTextField (
1058+ key: const Key ('messageInputText' ),
1059+ maxLines: widget.maxLines,
1060+ minLines: widget.minLines,
1061+ textInputAction: widget.textInputAction,
1062+ onSubmitted: (_) => sendMessage (),
1063+ keyboardType: widget.keyboardType,
1064+ controller: _effectiveController,
1065+ focusNode: _effectiveFocusNode,
1066+ style: _messageInputTheme.inputTextStyle,
1067+ autofocus: widget.autofocus,
1068+ textAlignVertical: TextAlignVertical .center,
1069+ decoration: _getInputDecoration (context),
1070+ textCapitalization: widget.textCapitalization,
1071+ autocorrect: widget.autoCorrect,
1072+ contentInsertionConfiguration: widget.contentInsertionConfiguration,
1073+ onTextChange: widget.onTextChanged,
1074+ ),
1075+ ),
1076+ if (widget.suffix != null ) widget.suffix! ,
1077+ ],
10571078 ),
10581079 ),
10591080 ),
@@ -1091,11 +1112,31 @@ class StreamMessageInputState extends State<StreamMessageInput>
10911112 _messageInputTheme.inputTextStyle! .copyWith (
10921113 color: _streamChatTheme.colorTheme.textLowEmphasis,
10931114 ),
1094- border: const OutlineInputBorder (borderSide: BorderSide (color: Colors .transparent)),
1095- focusedBorder: const OutlineInputBorder (borderSide: BorderSide (color: Colors .transparent)),
1096- enabledBorder: const OutlineInputBorder (borderSide: BorderSide (color: Colors .transparent)),
1097- errorBorder: const OutlineInputBorder (borderSide: BorderSide (color: Colors .transparent)),
1098- disabledBorder: const OutlineInputBorder (borderSide: BorderSide (color: Colors .transparent)),
1115+ border: const OutlineInputBorder (
1116+ borderSide: BorderSide (
1117+ color: Colors .transparent,
1118+ ),
1119+ ),
1120+ focusedBorder: const OutlineInputBorder (
1121+ borderSide: BorderSide (
1122+ color: Colors .transparent,
1123+ ),
1124+ ),
1125+ enabledBorder: const OutlineInputBorder (
1126+ borderSide: BorderSide (
1127+ color: Colors .transparent,
1128+ ),
1129+ ),
1130+ errorBorder: const OutlineInputBorder (
1131+ borderSide: BorderSide (
1132+ color: Colors .transparent,
1133+ ),
1134+ ),
1135+ disabledBorder: const OutlineInputBorder (
1136+ borderSide: BorderSide (
1137+ color: Colors .transparent,
1138+ ),
1139+ ),
10991140 contentPadding: const EdgeInsets .symmetric (vertical: 6 , horizontal: 16 ),
11001141 prefixIcon: Padding (
11011142 padding: const EdgeInsets .all (8 ),
@@ -1106,7 +1147,9 @@ class StreamMessageInputState extends State<StreamMessageInput>
11061147 Container (
11071148 constraints: BoxConstraints .tight (const Size (64 , 24 )),
11081149 decoration: BoxDecoration (
1109- borderRadius: _messageInputTheme.borderRadius? .add (BorderRadius .circular (6 )),
1150+ borderRadius: _messageInputTheme.borderRadius? .add (
1151+ BorderRadius .circular (6 ),
1152+ ),
11101153 color: _streamChatTheme.colorTheme.accentPrimary,
11111154 ),
11121155 margin: const EdgeInsets .all (6 ),
@@ -1122,7 +1165,9 @@ class StreamMessageInputState extends State<StreamMessageInput>
11221165 ),
11231166 Text (
11241167 _effectiveController.message.command! .toUpperCase (),
1125- style: _streamChatTheme.textTheme.footnoteBold.copyWith (color: Colors .white),
1168+ style: _streamChatTheme.textTheme.footnoteBold.copyWith (
1169+ color: Colors .white,
1170+ ),
11261171 ),
11271172 ],
11281173 ),
0 commit comments