https://github.com/shiena/flet-dropzone
a DropZone control that accepts dropped files
https://github.com/shiena/flet-dropzone
flet python
Last synced: 5 months ago
JSON representation
a DropZone control that accepts dropped files
- Host: GitHub
- URL: https://github.com/shiena/flet-dropzone
- Owner: shiena
- License: apache-2.0
- Created: 2025-02-24T02:28:09.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2026-01-19T20:30:32.000Z (5 months ago)
- Last Synced: 2026-01-20T02:16:25.902Z (5 months ago)
- Topics: flet, python
- Language: Dart
- Homepage: https://pypi.org/project/flet-dropzone/
- Size: 35.2 KB
- Stars: 14
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-flet - flet-dropzone - a DropZone control that accepts dropped files. (Uncategorized / Uncategorized)
README
# Flet Dropzone control
Dropzone control for [Flet](https://flet.dev/) integrating [desktop_drop](https://pub.dev/packages/desktop_drop)
## Installation
```bash
pip install flet-dropzone
```
Please build once before running.
for windows user:
```bash
flet build windows -v
```
for macOS user:
```bash
flet build macos -v
```
for linux user:
```bash
flet build linux -v
```
for web user:
```bash
flet build web -v
```
## Example
```py
import flet as ft
import flet_dropzone as ftd
def main(page: ft.Page):
page.vertical_alignment = ft.MainAxisAlignment.CENTER
page.horizontal_alignment = ft.CrossAxisAlignment.CENTER
page.add(
ftd.Dropzone(
content=ft.Container(
ft.Text("Drop here!"),
width=500,
height=500,
alignment=ft.Alignment.CENTER,
bgcolor="red",
),
on_dropped=lambda e: print(f"Dropped: {e.files}"),
on_entered=lambda e: print("Entered"),
on_exited=lambda e: print("Exited"),
)
)
ft.run(main)
```
## References
- https://github.com/flet-dev/flet/pull/4441