Skip to content

Commit 49bf2a1

Browse files
committed
update input change position
1 parent 5562d3a commit 49bf2a1

File tree

3 files changed

+35
-11
lines changed

3 files changed

+35
-11
lines changed
17 Bytes
Loading

packages/docs_screenshots/test/message_input/stream_message_input_test.dart

Lines changed: 33 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -102,11 +102,33 @@ void main() {
102102
channelState: channelState,
103103
);
104104

105-
return _buildMessageInputScaffold(
106-
client: client,
107-
channel: channel,
108-
messageInput: const StreamMessageInput(
109-
actionsLocation: ActionsLocation.right,
105+
final controller = StreamMessageInputController();
106+
107+
return MaterialApp(
108+
theme: docsScreenshotsTheme(),
109+
debugShowCheckedModeBanner: false,
110+
home: StreamChat(
111+
client: client,
112+
streamChatThemeData: docsStreamChatThemeData(),
113+
connectivityStream: Stream.value([ConnectivityResult.mobile]),
114+
componentBuilders: StreamComponentBuilders(
115+
extensions: streamChatComponentBuilders(
116+
messageComposerInputTrailing: (context, props) => const SizedBox.shrink(),
117+
messageComposerTrailing: (context, props) => DefaultStreamMessageComposerInputTrailing(props: props),
118+
),
119+
),
120+
child: StreamChannel(
121+
showLoading: false,
122+
channel: channel,
123+
child: Scaffold(
124+
body: Column(
125+
children: [
126+
const Expanded(child: SizedBox()),
127+
StreamMessageInput(messageInputController: controller),
128+
],
129+
),
130+
),
131+
),
110132
),
111133
);
112134
},
@@ -129,12 +151,12 @@ void main() {
129151
channelState: channelState,
130152
);
131153

132-
final controller = StreamMessageInputController();
133-
controller.quotedMessage = Message(
134-
id: 'quoted-msg',
135-
text: 'This is the original message',
136-
user: User(id: 'other-user', name: 'Alice'),
137-
);
154+
final controller = StreamMessageInputController()
155+
..quotedMessage = Message(
156+
id: 'quoted-msg',
157+
text: 'This is the original message',
158+
user: User(id: 'other-user', name: 'Alice'),
159+
);
138160

139161
return _buildMessageInputScaffold(
140162
client: client,
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
export 'message_composer_component_props.dart';
2+
export 'message_composer_input_trailing.dart'
3+
show DefaultStreamMessageComposerInputTrailing;
24
export 'stream_chat_message_composer.dart';

0 commit comments

Comments
 (0)