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

Additional parameter for picker #41

Open
philitell opened this issue Jul 18, 2024 · 0 comments
Open

Additional parameter for picker #41

philitell opened this issue Jul 18, 2024 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@philitell
Copy link

philitell commented Jul 18, 2024

It would be great to have the possibility to pass a custom dict (kwarg) to picker-method. Then we could implement an imageSource-selection-logic in onPressed-method of an addMoreButton and pass the argument to the picker-method to decide which picker to choose based on that argument.

  Future<bool> pickImages(params) async {  // additional params
    final pickedImages = await picker(maxImages > 1 ? true : false, params);  // pass params to picker
    if (pickedImages.isNotEmpty) {
      _addImages(pickedImages);
      notifyListeners();
      return true;
    }
    return false;
  }
@philitell philitell changed the title Include BuildContext to picker Additional parameter for picker Jul 18, 2024
@shubham16g shubham16g added the enhancement New feature or request label Jul 20, 2024
@shubham16g shubham16g self-assigned this Jul 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants