@@ -176,52 +176,46 @@ class MessageSpeechToTextCardState extends State<MessageSpeechToTextCard> {
176
176
}
177
177
178
178
//TODO: find better icons
179
- return Padding (
180
- padding: const EdgeInsets .all (16 ),
181
- child: Column (
182
- mainAxisSize: MainAxisSize .min,
183
- children: [
184
- const SizedBox (height: 8 ),
185
- RichText (
186
- text: transcriptText! ,
187
- ),
188
- if (widget.messageEvent.senderId == Matrix .of (context).client.userID)
189
- Column (
190
- children: [
191
- const SizedBox (height: 6 ),
192
- Row (
193
- mainAxisSize: MainAxisSize .min,
179
+ return ConstrainedBox (
180
+ constraints: const BoxConstraints (
181
+ maxWidth: AppConfig .toolbarMinWidth,
182
+ maxHeight: AppConfig .toolbarMaxHeight,
183
+ ),
184
+ child: SingleChildScrollView (
185
+ child: Padding (
186
+ padding: const EdgeInsets .all (16 ),
187
+ child: Column (
188
+ mainAxisSize: MainAxisSize .min,
189
+ children: [
190
+ const SizedBox (height: 8 ),
191
+ RichText (
192
+ text: transcriptText! ,
193
+ ),
194
+ if (widget.messageEvent.senderId ==
195
+ Matrix .of (context).client.userID)
196
+ Column (
194
197
children: [
195
- // IconNumberWidget(
196
- // icon: Symbols.target,
197
- // number:
198
- // "${selectedToken?.confidence ?? speechToTextResponse!.transcript.confidence}%",
199
- // toolTip: L10n.of(context).accuracy,
200
- // ),
201
- // const SizedBox(width: 16),
202
- IconNumberWidget (
203
- icon: Icons .speed,
204
- number: wordsPerMinuteString != null
205
- ? "$wordsPerMinuteString "
206
- : "??" ,
207
- toolTip: L10n .of (context).wordsPerMinute,
198
+ const SizedBox (height: 16 ),
199
+ Row (
200
+ mainAxisSize: MainAxisSize .min,
201
+ children: [
202
+ IconNumberWidget (
203
+ icon: Icons .speed,
204
+ number: wordsPerMinuteString != null
205
+ ? "$wordsPerMinuteString "
206
+ : "??" ,
207
+ toolTip: L10n .of (context).wordsPerMinute,
208
+ ),
209
+ ],
208
210
),
209
- ],
210
- ),
211
- const Row (
212
- mainAxisSize: MainAxisSize .min,
213
- children: [
214
- Expanded (
215
- flex: 1 ,
216
- child: InstructionsInlineTooltip (
217
- instructionsEnum: InstructionsEnum .speechToText,
218
- ),
211
+ const InstructionsInlineTooltip (
212
+ instructionsEnum: InstructionsEnum .speechToText,
219
213
),
220
214
],
221
215
),
222
- ],
223
- ),
224
- ] ,
216
+ ],
217
+ ),
218
+ ) ,
225
219
),
226
220
);
227
221
}
0 commit comments