makePicker method
Creates the picker widget with optional theme and modal configuration.
This method builds the actual picker widget that can be embedded in your UI or displayed in dialogs/modals.
Parameters:
themeData
- Optional theme to override default stylingisModal
- Whether the picker is displayed in a modal contextkey
- Optional widget key for the picker
Returns the constructed picker widget.
Example:
Widget pickerWidget = picker.makePicker();
Implementation
Widget makePicker(
[material.ThemeData? themeData, bool isModal = false, Key? key]) {
_maxLevel = adapter.maxLevel;
adapter.picker = this;
adapter.initSelects();
_widget = PickerWidget(
key: key ?? ValueKey(this),
data: this,
child:
_PickerWidget(picker: this, themeData: themeData, isModal: isModal),
);
return _widget!;
}