Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: fix onChange function signature #158

Closed
wants to merge 1 commit into from

Conversation

UsamaKarim
Copy link
Contributor

fixes #157

Copy link

@qwezey qwezey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this fix won't fix the issue in #157 (allowing users to add new files)

to fix the issue in #157, the logic in _handleChange must also change to adding new files If oldFile is null. or another approach must be taken

@@ -3,7 +3,7 @@ import 'package:reactive_image_picker/src/image_file.dart';
import 'package:reactive_image_picker/src/image_view.dart';
import 'package:reactive_image_picker/src/video_view.dart';

typedef OnChange = void Function(BuildContext context, SelectedFile file);
typedef OnChange = void Function(BuildContext context, SelectedFile? file);
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

simply allowing users to pass null to _handleChange will not allow users to add new files, rather it would replace all currently selected files

@UsamaKarim UsamaKarim closed this by deleting the head repository Oct 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[ReactiveImagePicker] selectedValueBuilder can't take input of new files
2 participants