From 817854fac2b631713bd1eeb9a4da88c8ca7aeae0 Mon Sep 17 00:00:00 2001 From: commitimpush Date: Wed, 31 Aug 2022 17:03:20 +0200 Subject: [PATCH] more documentation in the read me --- README.md | 24 +++++++++++------------ lib/image_picker.dart | 6 +++--- lib/src/models/image_picker_settings.dart | 4 ++-- lib/src/ui/image_picker_ui.dart | 4 ++-- 4 files changed, 19 insertions(+), 19 deletions(-) diff --git a/README.md b/README.md index 1031f43..0354124 100644 --- a/README.md +++ b/README.md @@ -27,18 +27,18 @@ To use this package, add `flutter_image_picker` as a [dependency in your pubspec See [Example Code](example/lib/main.dart) for an example on how to use this package. You can add optional parameters to the `showImagePickerDialog(context)` function call. These are: -| Parameter | Explaination | -|-------------------|---------------| -| title | left-aligned | -| titleTextSize | centered | -| iconSize | right-aligned | -| iconTextSize | right-aligned | -| spaceBetweenIcons | right-aligned | -| makePhotoText | right-aligned | -| makePhotoIcon | right-aligned | -| selectImageText | right-aligned | -| selectImageIcon | right-aligned | -| closeButtonText | right-aligned | +| 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 | ## Additional information diff --git a/lib/image_picker.dart b/lib/image_picker.dart index 93fa9bc..8e04686 100644 --- a/lib/image_picker.dart +++ b/lib/image_picker.dart @@ -13,8 +13,8 @@ class ImagePicker { double spaceBetweenIcons = ImagePickerDefaultParameters.spaceBetweenIcons, String makePhotoText = ImagePickerDefaultParameters.makePhotoText, IconData makePhotoIcon = ImagePickerDefaultParameters.makePhotoIcon, - String selectImageText = ImagePickerDefaultParameters.selectImageText, IconData selectImageIcon = ImagePickerDefaultParameters.selectImageIcon, + String selectImageText = ImagePickerDefaultParameters.selectImageText, String closeButtonText = ImagePickerDefaultParameters.closeButtonText}) { return ImagePickerUI().pickImageDialog( context, @@ -23,10 +23,10 @@ class ImagePicker { iconSize, iconTextSize, spaceBetweenIcons, - makePhotoText, makePhotoIcon, - selectImageText, + makePhotoText, selectImageIcon, + selectImageText, closeButtonText); } } diff --git a/lib/src/models/image_picker_settings.dart b/lib/src/models/image_picker_settings.dart index ef39cd9..d402b47 100644 --- a/lib/src/models/image_picker_settings.dart +++ b/lib/src/models/image_picker_settings.dart @@ -6,9 +6,9 @@ class ImagePickerDefaultParameters { static const double iconSize = 125; static const double iconTextSize = 15; static const double spaceBetweenIcons = 30; - static const String makePhotoText = "Take a Picture"; static const IconData makePhotoIcon = Icons.camera_alt_rounded; - static const String selectImageText = "Select File"; + static const String makePhotoText = "Take a Picture"; static const IconData selectImageIcon = Icons.image; + static const String selectImageText = "Select File"; static const String closeButtonText = "Close"; } diff --git a/lib/src/ui/image_picker_ui.dart b/lib/src/ui/image_picker_ui.dart index 1a24300..7abb08d 100644 --- a/lib/src/ui/image_picker_ui.dart +++ b/lib/src/ui/image_picker_ui.dart @@ -14,10 +14,10 @@ class ImagePickerUI { double iconSize, double iconTextSize, double spaceBetweenIcons, - String makePhotoText, IconData makePhotoIcon, - String selectImageText, + String makePhotoText, IconData selectImageIcon, + String selectImageText, String closeButtonText) async { return await showModalBottomSheet( context: context,