fix(color-picker): get icon color from theme

This commit is contained in:
Kiril Tijsma 2025-01-30 14:00:05 +01:00 committed by Freek van de Ven
parent 91420fde78
commit 7a30621ab9
2 changed files with 7 additions and 1 deletions

View file

@ -1,3 +1,6 @@
## 5.0.0 - WIP
- Get the color for the imagepicker from the Theme's primaryColor
## 4.0.0 ## 4.0.0
- Move to the new user story architecture - Move to the new user story architecture

View file

@ -24,12 +24,15 @@ Future<void> onPressSelectImage(
color: Colors.white, color: Colors.white,
child: ImagePicker( child: ImagePicker(
theme: ImagePickerTheme( theme: ImagePickerTheme(
spaceBetweenIcons: 32.0,
iconColor: Theme.of(context).primaryColor,
title: options.translations.imagePickerTitle, title: options.translations.imagePickerTitle,
titleStyle: Theme.of(context).textTheme.titleMedium, titleStyle: Theme.of(context).textTheme.titleMedium,
iconSize: 60.0, iconSize: 60.0,
makePhotoText: options.translations.takePicture, makePhotoText: options.translations.takePicture,
selectImageText: options.translations.uploadFile, selectImageText: options.translations.uploadFile,
selectImageIcon: const Icon( selectImageIcon: Icon(
color: Theme.of(context).primaryColor,
Icons.insert_drive_file_rounded, Icons.insert_drive_file_rounded,
size: 60, size: 60,
), ),