Merge pull request #29 from Iconica-Development/bugfix/customButton

fix: removed customButton
This commit is contained in:
Jacques Doeleman 2024-02-28 13:09:46 +01:00 committed by GitHub
commit a80bf1fb87
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 17 additions and 18 deletions

View file

@ -36,3 +36,7 @@
## 2.0.0 - February 22nd 2024 ## 2.0.0 - February 22nd 2024
- Simplified the ImagePickerTheme - 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.theme = const ImagePickerTheme(),
this.config = const ImagePickerConfig(), this.config = const ImagePickerConfig(),
this.service, this.service,
this.customButton,
super.key, super.key,
}); });
@ -32,9 +31,6 @@ class ImagePicker extends StatelessWidget {
/// uploaded image. /// uploaded image.
final ImagePickerConfig config; 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 /// 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 /// 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. /// add more features. If null the current implementation will be used.
@ -80,20 +76,19 @@ class ImagePicker extends StatelessWidget {
child: SizedBox( child: SizedBox(
width: 300, width: 300,
height: 40, height: 40,
child: customButton ?? child: ElevatedButton(
ElevatedButton( style: ElevatedButton.styleFrom(
style: ElevatedButton.styleFrom( backgroundColor: Colors.black,
backgroundColor: Colors.black, ),
), onPressed: () => Navigator.of(context).pop(),
onPressed: () => Navigator.of(context).pop(), child: const Text(
child: const Text( 'Close',
'Close', style: TextStyle(
style: TextStyle( fontSize: 15,
fontSize: 15, color: Colors.white,
color: Colors.white,
),
),
), ),
),
),
), ),
), ),
const SizedBox(height: 30), const SizedBox(height: 30),

View file

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