flet-dev / examples

Flet sample applications
MIT License
423 stars 172 forks source link

why can't I get the file path? #63

Open phoniexkent opened 1 year ago

phoniexkent commented 1 year ago

codes doesn't not work. always get a "None" value. environment:win11 desktop and pycharm

  def pick_files_result(e: FilePickerResultEvent):
        selected_files.value = (
            ", ".join(map(lambda f: f.name, e.files)) if e.files else "Cancelled!"
        )
        selected_files.update()

        selected_path.value = e.path
        selected_path.update()

    pick_files_dialog = FilePicker(on_result=pick_files_result)
    selected_files = Text()
    selected_path = flet.Text()