@@ -219,38 +219,42 @@ class _ChatUITextFieldState extends State<ChatUITextField> {
219
219
return Row (
220
220
children: [
221
221
if (! isRecordingValue) ...[
222
- IconButton (
223
- constraints: const BoxConstraints (),
224
- onPressed: () => _onIconPressed (
225
- ImageSource .camera,
226
- config: widget
227
- .sendMessageConfig? .imagePickerConfiguration,
222
+ if (sendMessageConfig? .enableCameraImagePicker ??
223
+ true )
224
+ IconButton (
225
+ constraints: const BoxConstraints (),
226
+ onPressed: () => _onIconPressed (
227
+ ImageSource .camera,
228
+ config:
229
+ sendMessageConfig? .imagePickerConfiguration,
230
+ ),
231
+ icon: imagePickerIconsConfig
232
+ ? .cameraImagePickerIcon ??
233
+ Icon (
234
+ Icons .camera_alt_outlined,
235
+ color:
236
+ imagePickerIconsConfig? .cameraIconColor,
237
+ ),
228
238
),
229
- icon:
230
- imagePickerIconsConfig? .cameraImagePickerIcon ??
231
- Icon (
232
- Icons .camera_alt_outlined,
233
- color: imagePickerIconsConfig
234
- ? .cameraIconColor,
235
- ),
236
- ),
237
- IconButton (
238
- constraints: const BoxConstraints (),
239
- onPressed: () => _onIconPressed (
240
- ImageSource .gallery,
241
- config: widget
242
- .sendMessageConfig? .imagePickerConfiguration,
239
+ if (sendMessageConfig? .enableGalleryImagePicker ??
240
+ true )
241
+ IconButton (
242
+ constraints: const BoxConstraints (),
243
+ onPressed: () => _onIconPressed (
244
+ ImageSource .gallery,
245
+ config:
246
+ sendMessageConfig? .imagePickerConfiguration,
247
+ ),
248
+ icon: imagePickerIconsConfig
249
+ ? .galleryImagePickerIcon ??
250
+ Icon (
251
+ Icons .image,
252
+ color: imagePickerIconsConfig
253
+ ? .galleryIconColor,
254
+ ),
243
255
),
244
- icon: imagePickerIconsConfig
245
- ? .galleryImagePickerIcon ??
246
- Icon (
247
- Icons .image,
248
- color:
249
- imagePickerIconsConfig? .galleryIconColor,
250
- ),
251
- ),
252
256
],
253
- if (widget. sendMessageConfig? .allowRecordingVoice ??
257
+ if (sendMessageConfig? .allowRecordingVoice ??
254
258
true &&
255
259
Platform .isIOS &&
256
260
Platform .isAndroid &&
0 commit comments