Merge pull request #6 from Iconica-Development/feature/loading-icon-color

feat: added option to change color of loading icon
This commit is contained in:
Tim 2023-01-05 15:38:49 +01:00 committed by GitHub
commit f2a3cf00b5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 1 deletions

View file

@ -1,3 +1,7 @@
## 0.3.1
- Added feature change the loading icon color.
## 0.3.0
- Added mimeType to MediaPickerResult.

View file

@ -61,6 +61,7 @@ class _MediaPickerExampleState extends ConsumerState<MediaPickerExample> {
height: 15,
),
MediaPicker(
loadingIconColor: Theme.of(context).colorScheme.secondary,
mediaPickerInputs: [
MediaPickerInputPhoto(
label: 'Make photo',

View file

@ -109,6 +109,7 @@ class MediaPicker extends ConsumerStatefulWidget {
this.mediaCheckPage,
this.horizontalSpacing = 0,
this.verticalSpacing = 0,
this.loadingIconColor,
Key? key,
}) : super(key: key);
@ -117,6 +118,7 @@ class MediaPicker extends ConsumerStatefulWidget {
final Axis inputsDirection;
final double horizontalSpacing;
final double verticalSpacing;
final Color? loadingIconColor;
final Widget Function(
Widget displayResult,
Map<String, dynamic>? inputSettings,
@ -159,7 +161,7 @@ class _MediaPickerState extends ConsumerState<MediaPicker> {
height: 150,
width: 150,
child: CircularProgressIndicator(
color: theme.primaryColor,
color: widget.loadingIconColor ?? theme.primaryColor,
),
),
] else ...[