mirror of
https://github.com/Iconica-Development/flutter_media_picker.git
synced 2025-05-19 00:43:45 +02:00
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:
commit
f2a3cf00b5
3 changed files with 8 additions and 1 deletions
|
@ -1,3 +1,7 @@
|
|||
## 0.3.1
|
||||
|
||||
- Added feature change the loading icon color.
|
||||
|
||||
## 0.3.0
|
||||
|
||||
- Added mimeType to MediaPickerResult.
|
||||
|
|
|
@ -61,6 +61,7 @@ class _MediaPickerExampleState extends ConsumerState<MediaPickerExample> {
|
|||
height: 15,
|
||||
),
|
||||
MediaPicker(
|
||||
loadingIconColor: Theme.of(context).colorScheme.secondary,
|
||||
mediaPickerInputs: [
|
||||
MediaPickerInputPhoto(
|
||||
label: 'Make photo',
|
||||
|
|
|
@ -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 ...[
|
||||
|
|
Loading…
Reference in a new issue