mirror of
https://github.com/Iconica-Development/flutter_media_picker.git
synced 2025-05-19 08:53: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
|
## 0.3.0
|
||||||
|
|
||||||
- Added mimeType to MediaPickerResult.
|
- Added mimeType to MediaPickerResult.
|
||||||
|
|
|
@ -61,6 +61,7 @@ class _MediaPickerExampleState extends ConsumerState<MediaPickerExample> {
|
||||||
height: 15,
|
height: 15,
|
||||||
),
|
),
|
||||||
MediaPicker(
|
MediaPicker(
|
||||||
|
loadingIconColor: Theme.of(context).colorScheme.secondary,
|
||||||
mediaPickerInputs: [
|
mediaPickerInputs: [
|
||||||
MediaPickerInputPhoto(
|
MediaPickerInputPhoto(
|
||||||
label: 'Make photo',
|
label: 'Make photo',
|
||||||
|
|
|
@ -109,6 +109,7 @@ class MediaPicker extends ConsumerStatefulWidget {
|
||||||
this.mediaCheckPage,
|
this.mediaCheckPage,
|
||||||
this.horizontalSpacing = 0,
|
this.horizontalSpacing = 0,
|
||||||
this.verticalSpacing = 0,
|
this.verticalSpacing = 0,
|
||||||
|
this.loadingIconColor,
|
||||||
Key? key,
|
Key? key,
|
||||||
}) : super(key: key);
|
}) : super(key: key);
|
||||||
|
|
||||||
|
@ -117,6 +118,7 @@ class MediaPicker extends ConsumerStatefulWidget {
|
||||||
final Axis inputsDirection;
|
final Axis inputsDirection;
|
||||||
final double horizontalSpacing;
|
final double horizontalSpacing;
|
||||||
final double verticalSpacing;
|
final double verticalSpacing;
|
||||||
|
final Color? loadingIconColor;
|
||||||
final Widget Function(
|
final Widget Function(
|
||||||
Widget displayResult,
|
Widget displayResult,
|
||||||
Map<String, dynamic>? inputSettings,
|
Map<String, dynamic>? inputSettings,
|
||||||
|
@ -159,7 +161,7 @@ class _MediaPickerState extends ConsumerState<MediaPicker> {
|
||||||
height: 150,
|
height: 150,
|
||||||
width: 150,
|
width: 150,
|
||||||
child: CircularProgressIndicator(
|
child: CircularProgressIndicator(
|
||||||
color: theme.primaryColor,
|
color: widget.loadingIconColor ?? theme.primaryColor,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
] else ...[
|
] else ...[
|
||||||
|
|
Loading…
Reference in a new issue