Skip to content

Commit e1031a0

Browse files
committed
update: added missing suffix icon
1 parent 550bf8b commit e1031a0

File tree

7 files changed

+84
-39
lines changed

7 files changed

+84
-39
lines changed

packages/stream_chat/example/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ dependencies:
2525
flutter:
2626
sdk: flutter
2727
stream_chat:
28-
path: ../stream_chat
28+
path: ../../stream_chat
2929

3030
flutter:
3131
uses-material-design: true

packages/stream_chat_flutter/example/pubspec.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,11 @@ dependencies:
2626
sdk: flutter
2727
responsive_builder: ^0.7.0
2828
stream_chat_flutter:
29-
path: ../stream_chat_flutter
29+
path: ../../stream_chat_flutter
3030
stream_chat_localizations:
31-
path: ../stream_chat_localizations
31+
path: ../../stream_chat_localizations
3232
stream_chat_persistence:
33-
path: ../stream_chat_persistence
33+
path: ../../stream_chat_persistence
3434

3535
flutter:
3636
uses-material-design: true

packages/stream_chat_flutter/lib/src/message_input/stream_message_input.dart

Lines changed: 72 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -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
),

packages/stream_chat_flutter_core/example/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ dependencies:
2525
sdk: flutter
2626

2727
stream_chat_flutter_core:
28-
path: ../stream_chat_flutter_core
28+
path: ../../stream_chat_flutter_core
2929

3030
flutter:
3131
uses-material-design: true

packages/stream_chat_localizations/example/pubspec.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ dependencies:
2525
flutter:
2626
sdk: flutter
2727
stream_chat_flutter:
28-
path: ../stream_chat_flutter
28+
path: ../../stream_chat_flutter
2929
stream_chat_localizations:
30-
path: ../stream_chat_localizations
30+
path: ../../stream_chat_localizations
3131

3232
flutter:
3333
uses-material-design: true

packages/stream_chat_persistence/example/pubspec.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ dependencies:
2424
flutter:
2525
sdk: flutter
2626
stream_chat:
27-
path: ../stream_chat
27+
path: ../../stream_chat
2828
stream_chat_persistence:
29-
path: ../stream_chat_persistence
29+
path: ../../stream_chat_persistence
3030

3131
flutter:
3232
uses-material-design: true

sample_app/pubspec.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,11 @@ dependencies:
4141
rxdart: ^0.28.0
4242
sentry_flutter: ^8.3.0
4343
stream_chat_flutter:
44-
path: ../stream_chat_flutter
44+
path: ../packages/stream_chat_flutter
4545
stream_chat_localizations:
46-
path: ../stream_chat_localizations
46+
path: ../packages/stream_chat_localizations
4747
stream_chat_persistence:
48-
path: ../stream_chat_persistence
48+
path: ../packages/stream_chat_persistence
4949
streaming_shared_preferences: ^2.0.0
5050
uuid: ^4.4.0
5151
video_player: ^2.8.7

0 commit comments

Comments
 (0)