mirror of
https://github.com/Iconica-Development/flutter_image_picker.git
synced 2025-05-18 11:43:44 +02:00
Documentation updates
This commit is contained in:
parent
a05ede7793
commit
9ec7bd78ce
4 changed files with 44 additions and 14 deletions
23
README.md
23
README.md
|
@ -18,16 +18,19 @@ See the [Example Code](example/lib/main.dart) for an example on how to use this
|
|||
You can add optional parameters to the `showImagePickerDialog(context)` function call. These are:
|
||||
| Parameter | Explaination |
|
||||
|-------------------|----------------|
|
||||
| title | The title that's shown at the top of the Image Picker Dialog in the bottom of the screen |
|
||||
| titleTextSize | The font size of the title mentioned above |
|
||||
| iconSize | The size of the icons that are shown in the Image Picker Dialog |
|
||||
| iconTextSize | The font size of the text underneath the icons in the Image Picker Dialog |
|
||||
| spaceBetweenIcons | The space in pixels between the two icons in the Image Picker Dialog |
|
||||
| makePhotoIcon | The icon that is shown as the Make Photo button |
|
||||
| makePhotoText | The text that is shown underneath the Make Photo icon in the Image Picker Dialog |
|
||||
| selectImageIcon | The icon that is shown as the Select Image button |
|
||||
| selectImageText | The text that is shown underneath the Select Image icon in the Image Picker Dialog |
|
||||
| closeButtonText | The text that is visible on the button that is shown at the bottom of the Image Picker Dialog that closes the dialog |
|
||||
| title | The title displayed at the top of the Image Picker Dialog. |
|
||||
| titleTextSize | The font size of the title mentioned above. |
|
||||
| iconSize | The size of the icons that are visible in the Image Picker Dialog. |
|
||||
| iconTextSize | The font size of the text underneath the icon buttons. |
|
||||
| spaceBetweenIcons | The size of the space between the two icons in the Image Picker Dialog. |
|
||||
| makePhotoIcon | The icon that is displayed for the 'Make Photo' functionality of the Image Picker Dialog. |
|
||||
| makePhotoText | The text that is displayed underneath the 'Make Photo' icon. |
|
||||
| selectImageIcon | The icon that is displayed for the 'Select Image From Gallery' functionality of the Image Picker Dialog. |
|
||||
| selectImageText | The text that is displayed underneath the 'Select Image From Gallery' icon. |
|
||||
| closeButtonText | The text that is shown on the 'Close Dialog' button at the bottom of the Image Picker Dialog. |
|
||||
| closeButtonWidth | The width of the 'Close Dialog' button at the bottom of the Image Picker Dialog. |
|
||||
| closeButtonHeight | The height of the 'Close Dialog' button at the bottom of the Image Picker Dialog. |
|
||||
|
||||
|
||||
The `showImagePickerDialog(context)` function returns an `Uint8List` as value which you can use in your application.
|
||||
|
||||
|
|
|
@ -42,7 +42,7 @@ class _ImagePickerExampleHomePageState
|
|||
final double imageWidth = 300;
|
||||
final String placeholder = 'assets/images/placeholder.png';
|
||||
final String imageAlreadyDisplayedMessage =
|
||||
'Selected image is already being displayed!';
|
||||
'The selected image is already being displayed!';
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
|
|
|
@ -13,16 +13,43 @@ class ImagePickerTheme {
|
|||
this.makePhotoText = "Take a Picture",
|
||||
this.selectImageIcon = Icons.image,
|
||||
this.selectImageText = "Select File",
|
||||
this.closeButtonText = "Close"});
|
||||
this.closeButtonText = "Close",
|
||||
this.closeButtonWidth = 300,
|
||||
this.closeButtonHeight = 40});
|
||||
|
||||
/// The title displayed at the top of the Image Picker Dialog.
|
||||
final String title;
|
||||
|
||||
/// The font size of the title mentioned above.
|
||||
final double titleTextSize;
|
||||
|
||||
/// The size of the icons that are visible in the Image Picker Dialog.
|
||||
final double iconSize;
|
||||
|
||||
/// The font size of the text underneath the icon buttons.
|
||||
final double iconTextSize;
|
||||
|
||||
/// The size of the space between the two icons in the Image Picker Dialog.
|
||||
final double spaceBetweenIcons;
|
||||
|
||||
/// The icon that is displayed for the 'Make Photo' functionality of the Image Picker Dialog.
|
||||
final IconData makePhotoIcon;
|
||||
|
||||
/// The text that is displayed underneath the 'Make Photo' icon.
|
||||
final String makePhotoText;
|
||||
|
||||
/// The icon that is displayed for the 'Select Image From Gallery' functionality of the Image Picker Dialog.
|
||||
final IconData selectImageIcon;
|
||||
|
||||
/// The text that is displayed underneath the 'Select Image From Gallery' icon.
|
||||
final String selectImageText;
|
||||
|
||||
/// The text that is shown on the 'Close Dialog' button at the bottom of the Image Picker Dialog.
|
||||
final String closeButtonText;
|
||||
|
||||
/// The width of the 'Close Dialog' button at the bottom of the Image Picker Dialog.
|
||||
final double closeButtonWidth;
|
||||
|
||||
/// The height of the 'Close Dialog' button at the bottom of the Image Picker Dialog.
|
||||
final double closeButtonHeight;
|
||||
}
|
||||
|
|
|
@ -48,8 +48,8 @@ class ImagePicker extends StatelessWidget {
|
|||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
SizedBox(
|
||||
width: 300,
|
||||
height: 40,
|
||||
width: imagePickerTheme.closeButtonWidth,
|
||||
height: imagePickerTheme.closeButtonHeight,
|
||||
child: ElevatedButton(
|
||||
onPressed: () => Navigator.of(context).pop(),
|
||||
child: Text(imagePickerTheme.closeButtonText)),
|
||||
|
|
Loading…
Reference in a new issue