fix: removed customButton

This commit is contained in:
mike doornenbal 2024-02-28 12:00:33 +01:00
parent 9131a82501
commit b3aa961e92
3 changed files with 17 additions and 18 deletions

View file

@ -36,3 +36,7 @@
## 2.0.0 - February 22nd 2024
- Simplified the ImagePickerTheme
# 3.0.0 - February 22nd 2024
- Removed customButton from ImagePicker.

View file

@ -21,7 +21,6 @@ class ImagePicker extends StatelessWidget {
this.theme = const ImagePickerTheme(),
this.config = const ImagePickerConfig(),
this.service,
this.customButton,
super.key,
});
@ -32,9 +31,6 @@ class ImagePicker extends StatelessWidget {
/// uploaded image.
final ImagePickerConfig config;
/// The Image Picker Dialog can have a custom button if you want to.
final Widget? customButton;
/// The ImagePickerService can be used if you want to use your own
/// implementation of the Image Service if you want to use it for testing or
/// add more features. If null the current implementation will be used.
@ -80,20 +76,19 @@ class ImagePicker extends StatelessWidget {
child: SizedBox(
width: 300,
height: 40,
child: customButton ??
ElevatedButton(
style: ElevatedButton.styleFrom(
backgroundColor: Colors.black,
),
onPressed: () => Navigator.of(context).pop(),
child: const Text(
'Close',
style: TextStyle(
fontSize: 15,
color: Colors.white,
),
),
child: ElevatedButton(
style: ElevatedButton.styleFrom(
backgroundColor: Colors.black,
),
onPressed: () => Navigator.of(context).pop(),
child: const Text(
'Close',
style: TextStyle(
fontSize: 15,
color: Colors.white,
),
),
),
),
),
const SizedBox(height: 30),

View file

@ -1,6 +1,6 @@
name: flutter_image_picker
description: A Flutter Image Picking package.
version: 2.0.0
version: 3.0.0
repository: https://github.com/Iconica-Development/flutter_image_picker
environment: