You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm working on a package that allows users to pick files and show a list of selected files in a widget. I want that user should be able to access those files in the widget that File widget that my package provides.
The flow of package usage,
Create an instance of the controller case name 'FileController`.
final _firstController = FileController();
Add a File widget and a corresponding 'FileUploadIconButtonto you're widget tree and pass this controller toFile and 'FileUploadIconButtonwidget.
The file selection is working well and the two instances are separated as required.
Requirement
I want to use the controllers initiated inside the Home widget and passed to the package widgets and access the selected files, and currently, the _firstController.files in the Home is empty because it is not updated like the Obx widget inside the FileHolder widget. Since the user should be able to use the FileHolder widget without having to use the Get package, so please help me figure out a way to update the controller that was passed from outside the package.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi there,
I'm working on a package that allows users to pick files and show a list of selected files in a widget. I want that user should be able to access those files in the widget that
File
widget that my package provides.The flow of package usage,
final _firstController = FileController();
File
widget and a corresponding 'FileUploadIconButtonto you're widget tree and pass this controller to
Fileand 'FileUploadIconButton
widget.I'm using the
tag
to differentiate between multiple instances of the controller.The code for
File
widget.Code for 'FileUploadIconButton`
The file selection is working well and the two instances are separated as required.
Requirement
I want to use the controllers initiated inside the
Home
widget and passed to the package widgets and access the selected files, and currently, the_firstController.files
in theHome
is empty because it is not updated like theObx
widget inside theFileHolder
widget. Since the user should be able to use theFileHolder
widget without having to use theGet
package, so please help me figure out a way to update the controller that was passed from outside the package.Beta Was this translation helpful? Give feedback.
All reactions