From 8cf757f4e76aa3ae834598a629aa22811a7b6a2f Mon Sep 17 00:00:00 2001 From: commitimpush Date: Thu, 1 Sep 2022 17:07:53 +0200 Subject: [PATCH] documentation updates --- README.md | 7 +++---- example/lib/main.dart | 4 ++-- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 227d181..3b00829 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,9 @@ To use this package, add `flutter_image_picker` as a [dependency in your pubspec See the [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: +You can add an optional `ImagePickerTheme()` to the `ImagePicker()` to change the layout of the Image Picker Dialog. You can add the following parameters to the `ImagePickerTheme`: +An example on how to add a parameter to the `ImagePickerTheme()` is: `ImagePickerTheme(imagePickerTheme: const ImagePickerTheme(title: "Image Picker"))` + | Parameter | Explaination | |-------------------|----------------| | title | The title displayed at the top of the Image Picker Dialog. | @@ -31,9 +33,6 @@ You can add optional parameters to the `showImagePickerDialog(context)` function | 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. - ## Issues & Feedback Please file an [issue](https://github.com/Iconica-Development/flutter_image_picker/issues) to send feedback or report a bug. diff --git a/example/lib/main.dart b/example/lib/main.dart index d65c105..5e7f64c 100644 --- a/example/lib/main.dart +++ b/example/lib/main.dart @@ -89,8 +89,8 @@ class _ImagePickerExampleHomePageState /// The [pickImage] function is used to show the usage of the Image Picker Package. /// The most important part is the [ImagePicker] call. - /// You can add a custom [ImagePickerTheme] to it if you want to change some of the UI. - /// You can do that by adding [imagePickerTheme: const ImagePickerTheme()] in the [ImagePicker] in the builder. + /// You can add a custom [ImagePickerTheme] to the [ImagePicker] if you want to change some of the UI. + /// An example on how to do that is: ImagePickerTheme(imagePickerTheme: const ImagePickerTheme(title: "Image Picker")). /// Check the README for all possible parameters you can add in the [ImagePickerTheme]. /// This function saves the image in a variable and if it's different than the current image it will get displayed in the application. /// When the same image is chosen there will be a snackbar popping up to let you know it's already being displayed.