Skip to content

Commit f05d5f4

Browse files
v1: Migrate Flet extensions to a main repo (#5690)
* Update links and metadata for flet-ads package Corrected URLs in README, pyproject.toml, and pubspec.yaml to point to the main flet repository and documentation. Removed outdated repository and issue tracker fields from pubspec.yaml for consistency. * Add flet-audio extension package and docs Introduces the flet-audio extension for audio playback in Flet apps, including Python and Flutter source code, documentation, and example usage. Updates dependency configuration to use the local flet-audio package and integrates audio control documentation into the Flet docs and mkdocs navigation. * Add flet-audio-recorder package and example Introduces the flet-audio-recorder Python and Flutter package, including source code, documentation, and licensing. Updates client dependencies to use the local path for flet_audio_recorder. Adds an example usage in Python and documentation for new types and configuration options. * Add flet-charts package and chart examples Introduces the new flet-charts package with Python and Flutter implementations, including source code, documentation, and assets. Adds multiple chart examples (bar, line, pie, scatter, matplotlib, plotly) with sample code and media files, and updates client dependencies to use the local flet-charts path instead of a git reference. * Add example image to scatter chart documentation Introduced example_1.png and updated scatter_chart.md to display the image, enhancing the documentation with a visual example of the scatter chart. * Add flet-video package and update video dependencies Introduced the new flet-video package with Python and Flutter source, documentation, and example usage. Updated client and Python package dependencies to use the local flet-video path instead of the git source. * Fix Video example * Add flet-lottie package and update dependencies Introduced the flet-lottie package with initial source, documentation, and assets. Updated client and SDK dependencies to use the local path for flet-lottie instead of the git repository. Added Lottie example and sample asset, and made minor updates to other package configurations. * Add flet-map package and example integration Introduced the flet-map Python package with interactive map controls, including layers for markers, circles, polygons, polylines, and attribution. Updated client dependencies to use local flet-map path. Added a comprehensive example demonstrating map usage and updated documentation and licensing files for the new package. * Add flet-rive extension for Rive animation support Introduces the flet-rive extension to enable Rive animation rendering in Flet apps. Adds Python and Flutter package files, example usage, documentation, and updates dependency references to include flet-rive in the project. * Add flet-permission-handler extension and docs Introduced the flet-permission-handler extension for managing runtime permissions in Flet apps, including Python and Flutter source, documentation, and example usage. Updated workspace configuration and dependencies to include the new extension, switched client dependency from git to local path, and added documentation references and navigation. Also removed unused README and CHANGELOG files from flet-charts and flet-video. * Add flet-geolocator package and example Introduced the flet-geolocator Python package with initial implementation, documentation, and licensing. Updated client dependencies to use local path for flet-geolocator and flet-permission-handler. Added example usage and integrated geolocator documentation into the Flet docs. * Refactor text style and value handling in DropdownM2 Improves text style logic by separating font size, color, and focused color handling for clarity and correctness. Replaces 'value' with 'initialValue' in DropdownButtonFormField to match updated API usage. * Add flet-datatable2, flet-flashlight, flet-webview packages Added new Python packages for flet-datatable2, flet-flashlight, and flet-webview, including their Flutter implementations, documentation, and example usage. Updated client dependencies to use local paths for these packages instead of git sources. Also added example code for datatable2, flashlight, and webview controls, and updated dropdown_m2 example for improved usage. * Add CI workflow for building Flet extension packages Introduces a new GitHub Actions job to build and analyze multiple Flet extension Python packages. Updates the publish step to include these extensions, ensuring they are built and published alongside core packages. * Remove pubspec.lock after Flutter analysis Adds a step to delete pubspec.lock after running 'dart analyze' in the CI workflow. This helps ensure a clean state for subsequent steps and avoids potential issues with stale lock files. * Add manual notify method to Observable and task status callback Introduces a notify() method to Observable for manual listener notification. TaskItem now supports an on_status_changed callback, allowing TodoAppState to trigger UI updates when a task's status changes. * Improve alt text generation in image macro The image macro now generates alt text from the image filename if no alt is provided, using urlparse and os.path.basename. This enhances accessibility and provides more descriptive default alt text for images. * Update CI workflow and README build badge Added Python 3.14 to the CI test matrix for broader version support. Updated the README to use the GitHub Actions build status badge instead of AppVeyor. * Expand supported Python versions to <3.15 Updated 'requires-python' in pyproject.toml files to allow Python versions up to 3.14, expanding compatibility for both the main SDK and examples. * Update Flutter version and dependencies Bump Flutter to 3.35.5 and update various Dart/Flutter package dependencies across multiple pubspec files for compatibility and latest features. Refactor code in bar_chart.dart for improved readability and update usage of tile providers in flet_map. Remove unused dependencies and ensure all packages use consistent versioning. * Make chart axis properties optional in chart classes Changed axis properties (left, top, right, bottom) in BarChart, LineChart, and ScatterChart to be Optional and default to None instead of instantiating ChartAxis by default. Also updated SectionBadge icon type in pie chart example for consistency. This allows for more flexible chart configuration and avoids unnecessary default axis creation. * Add CandlestickChart control and documentation Introduces the CandlestickChart control to flet-charts, including Python and Flutter implementations, example usage, and documentation. Updates README, CHANGELOG, and mkdocs navigation to reflect the new chart type and its related event and tooltip types. * Remove timeout parameters from service methods Eliminated the 'timeout' argument from async service methods in audio, geolocator, browser context menu, and clipboard modules for API simplification. Also deleted outdated documentation files for geolocator and permission handler. * Add and improve docstrings for map and video modules Added detailed docstrings to polygon_layer.py, polyline_layer.py, __init__.py, types.py, and video.py to clarify configuration options and public exports. Expanded attribute documentation in VideoSubtitleTrack for better developer understanding of media metadata fields.
1 parent e4b928c commit f05d5f4

File tree

442 files changed

+24126
-391
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

442 files changed

+24126
-391
lines changed

.fvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
"flutter": "3.35.1"
2+
"flutter": "3.35.5"
33
}

.github/workflows/ci.yml

Lines changed: 105 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ jobs:
4848
strategy:
4949
fail-fast: false
5050
matrix:
51-
python-version: [ "3.10", "3.11", "3.12", "3.13" ]
51+
python-version: [ "3.10", "3.11", "3.12", "3.13", "3.14" ]
5252
steps:
5353
- name: Checkout repository
5454
uses: actions/checkout@v4
@@ -547,6 +547,90 @@ jobs:
547547
sdk/python/dist/*.whl
548548
sdk/python/dist/*.tar.gz
549549
550+
# ============================================
551+
# Build Flet extension Python packages
552+
# ============================================
553+
build_flet_extensions:
554+
name: Build ${{ matrix.package }} extension
555+
runs-on: ubuntu-latest
556+
needs:
557+
- python_tests
558+
- build_flet_package
559+
env:
560+
PYPI_VER: ${{ needs.build_flet_package.outputs.PYPI_VER }}
561+
strategy:
562+
fail-fast: false
563+
matrix:
564+
package:
565+
- flet-ads
566+
- flet-audio
567+
- flet-audio-recorder
568+
- flet-charts
569+
- flet-datatable2
570+
- flet-flashlight
571+
- flet-geolocator
572+
- flet-lottie
573+
- flet-map
574+
- flet-permission-handler
575+
- flet-rive
576+
- flet-video
577+
- flet-webview
578+
steps:
579+
- name: Checkout repository
580+
uses: actions/checkout@v4
581+
582+
- name: Setup uv
583+
uses: astral-sh/setup-uv@v6
584+
585+
- name: Setup Flutter
586+
uses: kuhnroyal/flutter-fvm-config-action/setup@v3
587+
with:
588+
path: '.fvmrc'
589+
cache: true
590+
591+
- name: Analyze Flutter package with dart analyze
592+
shell: bash
593+
run: |
594+
set -euo pipefail
595+
PACKAGE="${{ matrix.package }}"
596+
FLUTTER_PACKAGE="${PACKAGE//-/_}"
597+
FLUTTER_DIR="${SDK_PYTHON}/packages/${PACKAGE}/src/flutter/${FLUTTER_PACKAGE}"
598+
599+
if [[ ! -d "$FLUTTER_DIR" ]]; then
600+
echo "Flutter directory $FLUTTER_DIR not found"
601+
exit 1
602+
fi
603+
604+
pushd "$FLUTTER_DIR"
605+
flutter pub get
606+
dart analyze
607+
rm -f pubspec.lock
608+
popd
609+
610+
- name: Build Python package
611+
shell: bash
612+
working-directory: ${{ env.SDK_PYTHON }}
613+
run: |
614+
set -euo pipefail
615+
PACKAGE="${{ matrix.package }}"
616+
PYPROJECT="packages/${PACKAGE}/pyproject.toml"
617+
618+
source "$SCRIPTS/common.sh"
619+
patch_toml_versions "$PYPROJECT" "$PYPI_VER"
620+
621+
rm -rf dist
622+
uv build --package "$PACKAGE" --wheel
623+
uv build --package "$PACKAGE" --sdist
624+
625+
- name: Upload artifacts
626+
uses: actions/upload-artifact@v4
627+
with:
628+
name: python-extension-${{ matrix.package }}
629+
if-no-files-found: error
630+
path: |
631+
sdk/python/dist/*.whl
632+
sdk/python/dist/*.tar.gz
633+
550634
# =====================================
551635
# Build flet, flet-cli and flet-desktop
552636
# =====================================
@@ -598,6 +682,7 @@ jobs:
598682
- build_macos
599683
- build_linux
600684
- build_web
685+
- build_flet_extensions
601686
steps:
602687
- name: Setup uv
603688
uses: astral-sh/setup-uv@v6
@@ -613,7 +698,25 @@ jobs:
613698
# remove client to avoid glob conflicts with its contents
614699
rm -rf dist/client
615700
616-
for pkg in flet flet_cli flet_desktop flet_desktop_light flet_web; do
701+
for pkg in \
702+
flet \
703+
flet_cli \
704+
flet_desktop \
705+
flet_desktop_light \
706+
flet_web \
707+
flet_ads \
708+
flet_audio \
709+
flet_audio_recorder \
710+
flet_charts \
711+
flet_datatable2 \
712+
flet_flashlight \
713+
flet_geolocator \
714+
flet_lottie \
715+
flet_map \
716+
flet_permission_handler \
717+
flet_rive \
718+
flet_video \
719+
flet_webview; do
617720
uv publish dist/**/${pkg}-*
618721
done
619722

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@
1919
<a href="https://pypi.org/project/flet" target="_blank">
2020
<img src="https://img.shields.io/pypi/pyversions/flet.svg?color=%2334D058" alt="Supported Python versions">
2121
</a>
22-
<a href="https://ci.appveyor.com/project/flet-dev/flet/branch/main" target="_blank">
23-
<img src="https://ci.appveyor.com/api/projects/status/xwablctxslvey576/branch/main?svg=true" alt="Build status">
22+
<a href="https://github.com/flet-dev/flet/actions/workflows/ci.yml" target="_blank">
23+
<img src="https://github.com/flet-dev/flet/actions/workflows/ci.yml/badge.svg" alt="Build status">
2424
</a>
2525
</p>
2626

@@ -51,7 +51,7 @@ with assets hosting and desktop clients.
5151

5252
Flet UI is built with [Flutter](https://flutter.dev/), so your app looks professional and could be delivered to any platform.
5353
Flet simplifies the Flutter model by combining smaller "widgets" to ready-to-use "controls"
54-
with an imperative programming model.
54+
with an imperative programming model.
5555

5656
### 📱 Deliver to any device or platform
5757

0 commit comments

Comments
 (0)