Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
71 commits
Select commit Hold shift + click to select a range
b32d40d
`OAuthProvider.authorization_params`
ndonkoHenri Feb 23, 2026
7812fb8
`Auth0OAuthProvider.audience`
ndonkoHenri Feb 23, 2026
904d507
Merge branch 'main' into auth-audience
ndonkoHenri Feb 24, 2026
3860a33
Update version.py to include tags in git describe command
ndonkoHenri Feb 24, 2026
69cc67d
add mouse cursor example
ndonkoHenri Feb 24, 2026
f847824
Fix link to `FilePickerFile.path` in filepicker.md
ndonkoHenri Feb 24, 2026
1bea77b
Improve Flutter dependency version handling in CI for best pub.dev co…
ndonkoHenri Feb 25, 2026
939dc34
Refactor video.dart to standardize property naming conventions and ev…
ndonkoHenri Feb 26, 2026
ac9b99b
move auth types in dedicated folder
ndonkoHenri Feb 26, 2026
b93da0f
add ClipBehavior showcase example and update documentation
ndonkoHenri Feb 26, 2026
01e064c
add TextAlign showcase example and update documentation
ndonkoHenri Feb 26, 2026
8d1debd
add StrokeCap showcase example and update documentation
ndonkoHenri Feb 26, 2026
d792182
add StrokeJoin showcase example and update documentation
ndonkoHenri Feb 26, 2026
62f40d2
add FloatingActionButtonLocation showcase example and update document…
ndonkoHenri Feb 26, 2026
f65dee2
add FontWeight showcase example and update documentation
ndonkoHenri Feb 26, 2026
c01d6f7
add BlendMode showcase example and update documentation
ndonkoHenri Feb 26, 2026
fea7253
add ImageRepeat showcase example and update documentation
ndonkoHenri Feb 26, 2026
7153278
add ScrollMode showcase example and update documentation
ndonkoHenri Feb 26, 2026
f921355
add VisualDensity showcase example and update documentation
ndonkoHenri Feb 26, 2026
70c69f3
add UrlTarget showcase example and update documentation
ndonkoHenri Feb 26, 2026
e0f5510
add ThemeMode showcase example and update documentation
ndonkoHenri Feb 26, 2026
6cb2fc5
add LabelPosition showcase example and update documentation
ndonkoHenri Feb 26, 2026
40dfde8
add Orientation showcase example and update documentation
ndonkoHenri Feb 26, 2026
8814439
add BoxFit showcase example and update documentation
ndonkoHenri Feb 26, 2026
b9fa352
add TextOverflow showcase example and update documentation
ndonkoHenri Feb 26, 2026
7e73c92
add AnimatedSwitcherTransition showcase example and update documentation
ndonkoHenri Feb 26, 2026
ee5884a
add MainAxisAlignment showcase example and update documentation
ndonkoHenri Feb 26, 2026
91f2636
add BlurTileMode showcase example and update documentation
ndonkoHenri Feb 26, 2026
7fffdec
add Axis showcase example and update documentation
ndonkoHenri Feb 26, 2026
3996634
add CardVariant showcase example and update documentation
ndonkoHenri Feb 26, 2026
e8ad3cd
add BoxShape showcase example and update documentation
ndonkoHenri Feb 26, 2026
5073481
add ContextMenuTrigger showcase example and update documentation
ndonkoHenri Feb 26, 2026
7f0775e
add TileAffinity showcase example and update documentation
ndonkoHenri Feb 26, 2026
4664630
add TextCapitalization showcase example and update documentation
ndonkoHenri Feb 26, 2026
1427029
add SliderInteraction showcase example and update documentation
ndonkoHenri Feb 26, 2026
fb4285e
add TabAlignment showcase example and update documentation
ndonkoHenri Feb 26, 2026
9152727
add TimePickerEntryMode showcase example and update documentation
ndonkoHenri Feb 26, 2026
0d5486f
add TimePickerHourFormat showcase example and update documentation
ndonkoHenri Feb 26, 2026
24b93cf
add BlurStyle showcase example and update documentation
ndonkoHenri Feb 26, 2026
7510c7f
add ListTileTitleAlignment showcase example and update documentation
ndonkoHenri Feb 26, 2026
829f142
add FilterQuality showcase example and update documentation
ndonkoHenri Feb 26, 2026
dce7829
add DismissDirection showcase example and update documentation
ndonkoHenri Feb 26, 2026
6085697
add SnackBarBehavior showcase example and update documentation
ndonkoHenri Feb 26, 2026
0b49c33
add ScrollDirection showcase example and update documentation
ndonkoHenri Feb 26, 2026
6799899
add PopupMenuPosition showcase example and update documentation
ndonkoHenri Feb 26, 2026
dff3b31
add GradientTileMode showcase example and update documentation
ndonkoHenri Feb 26, 2026
fb19ef9
add TabBarIndicatorSize showcase example and update documentation
ndonkoHenri Feb 26, 2026
5118078
add NavigationBarLabelBehavior showcase example and update documentation
ndonkoHenri Feb 26, 2026
2dfa203
add NavigationRailLabelType showcase example and update documentation
ndonkoHenri Feb 26, 2026
dd109a1
add OverlayVisibilityMode showcase example and update documentation
ndonkoHenri Feb 26, 2026
44706d2
add PaintingStyle showcase example and update documentation
ndonkoHenri Feb 26, 2026
a1dd3ba
add BorderStyle showcase example and update documentation
ndonkoHenri Feb 26, 2026
d286948
add DatePickerEntryMode showcase example and update documentation
ndonkoHenri Feb 26, 2026
142383c
add DatePickerMode showcase example and update documentation
ndonkoHenri Feb 26, 2026
864395a
add TextDecorationStyle showcase example and update documentation
ndonkoHenri Feb 26, 2026
c643cda
add BorderSideStrokeAlign showcase example and update documentation
ndonkoHenri Feb 26, 2026
f1f97ac
add PointMode showcase example and update documentation
ndonkoHenri Feb 26, 2026
5f028e2
add LaunchMode showcase example and update documentation
ndonkoHenri Feb 26, 2026
9b76f89
add CrossAxisAlignment showcase example and update documentation
ndonkoHenri Feb 26, 2026
f33a453
add ListTileStyle showcase example and update documentation
ndonkoHenri Feb 26, 2026
8e1b820
add ScrollType showcase example and update documentation
ndonkoHenri Feb 26, 2026
ec055c7
add AppLifecycleState showcase example and update documentation
ndonkoHenri Feb 26, 2026
9be9bc6
add WindowEventType showcase example and update documentation
ndonkoHenri Feb 26, 2026
1ed1262
add minimum and target SDK version documentation with examples
ndonkoHenri Feb 26, 2026
f4696bb
add assertiveness showcase example and update documentation
ndonkoHenri Feb 27, 2026
f749f2a
add CupertinoDatePickerDateOrder showcase example and update document…
ndonkoHenri Feb 27, 2026
40d0731
add CupertinoDatePickerMode showcase example and update documentation
ndonkoHenri Feb 27, 2026
87031e5
add CupertinoTimerPickerMode showcase example and update documentation
ndonkoHenri Feb 27, 2026
2623c49
add CupertinoButtonSize showcase example and update documentation
ndonkoHenri Feb 27, 2026
8eaff39
add AnimationCurve showcase example and update documentation
ndonkoHenri Feb 27, 2026
6aedd59
update packaging documentation with details on pure Python dependenci…
ndonkoHenri Feb 27, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 22 additions & 11 deletions .github/scripts/patch_pubspec_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,33 +4,43 @@

"""
Patches a Dart/Flutter `pubspec.yaml` file to:
- Set the `version:` field to a given value.
- Optionally set the `version:` field to a given value.
- Pin selected dependencies in the `dependencies:` section to the same version.

Dependencies patched:
- flet

Usage:
uv run patch_pubspec_version.py <pubspec> <version>
uv run patch_pubspec_version.py <pubspec> <version> [--dependencies-only]

Arguments:
pubspec Path to the pubspec.yaml file to patch.
version Version string to set.
pubspec Path to the pubspec.yaml file to patch.
version Version string to set.
--dependencies-only Patch only dependencies without changing package `version:`.
"""

import argparse
import sys
from pathlib import Path

import yaml


def main() -> None:
if not (len(sys.argv) >= 3):
print("Usage: uv run patch_pubspec_version.py <pubspec.yaml> <version>")
sys.exit(1)

pubspec_path = Path(sys.argv[1]).resolve()
version = sys.argv[2]
parser = argparse.ArgumentParser(
description="Patch pubspec version and/or selected dependencies."
)
parser.add_argument("pubspec", help="Path to pubspec.yaml")
parser.add_argument("version", help="Version string to apply")
parser.add_argument(
"--dependencies-only",
action="store_true",
help="Patch only dependencies without changing package version.",
)
args = parser.parse_args()

pubspec_path = Path(args.pubspec).resolve()
version = args.version

if not pubspec_path.exists():
print(f"Error: File not found: {pubspec_path}")
Expand All @@ -42,7 +52,8 @@ def main() -> None:
data = yaml.safe_load(f)

# patch version
data["version"] = version
if not args.dependencies_only:
data["version"] = version

# patch dependencies
for dep in ["flet"]:
Expand Down
21 changes: 21 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -700,9 +700,13 @@ jobs:
- build_flet_package
env:
PYPI_VER: ${{ needs.build_flet_package.outputs.PYPI_VER }}
PKG_VER: ${{ needs.build_flet_package.outputs.PKG_VER }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
fetch-tags: true

- name: Setup uv
uses: astral-sh/setup-uv@v6
Expand Down Expand Up @@ -741,12 +745,29 @@ jobs:

source "$SCRIPTS/common.sh"

# Keep Flutter extension dependencies resolvable on pub.dev:
# - tag build: use the just-released flet version for this release, PKG_VER
# - non-tag build: use latest released flet tag
if [[ "${GITHUB_REF_TYPE:-}" == "tag" ]]; then
FLET_PUB_VER="$PKG_VER"
else
LATEST_TAG="$(git tag --list 'v[0-9]*.[0-9]*.[0-9]*' --sort=-v:refname | head -n 1)"
if [[ -z "$LATEST_TAG" ]]; then
echo "ERROR: Could not determine latest release tag for flet."
exit 1
fi
FLET_PUB_VER="${LATEST_TAG#v}"
fi
echo "Using flet Flutter dependency version: $FLET_PUB_VER"

for PACKAGE in "${PACKAGES[@]}"; do
echo "::group::Processing ${PACKAGE}"
FLUTTER_PACKAGE="${PACKAGE//-/_}"
FLUTTER_DIR="${SDK_PYTHON}/packages/${PACKAGE}/src/flutter/${FLUTTER_PACKAGE}"

pushd "$FLUTTER_DIR"
# Patch only the flet dependency; keep extension package version unchanged.
patch_pubspec_version "${FLUTTER_DIR}/pubspec.yaml" "$FLET_PUB_VER" --dependencies-only
flutter pub get
dart analyze
popd
Expand Down
2 changes: 1 addition & 1 deletion sdk/python/examples/controls/types/alignment/container.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def main(page: ft.Page):
content=ft.Button("-0.5, -0.5"),
bgcolor=ft.Colors.AMBER,
padding=15,
alignment=ft.alignment.Alignment(-0.5, -0.5),
alignment=ft.Alignment(-0.5, -0.5),
width=150,
height=150,
),
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
import flet as ft


def showcase_card(transition: ft.AnimatedSwitcherTransition) -> ft.Container:
state = 0
values = ["A", "B"]

switcher = ft.AnimatedSwitcher(
duration=500,
reverse_duration=300,
transition=transition,
content=ft.Text(
values[0],
size=40,
weight=ft.FontWeight.BOLD,
),
)

def swap(_):
nonlocal state
state = 1 - state
switcher.content = ft.Text(
values[state],
size=40,
weight=ft.FontWeight.BOLD,
)
switcher.update()

return ft.Container(
width=320,
padding=12,
border=ft.Border.all(1, ft.Colors.RED),
border_radius=10,
bgcolor=ft.Colors.SURFACE_CONTAINER_LOW,
content=ft.Column(
spacing=8,
controls=[
ft.Text(transition.name, weight=ft.FontWeight.BOLD),
ft.Container(
width=240,
height=90,
border=ft.Border.all(1, ft.Colors.OUTLINE),
border_radius=8,
bgcolor=ft.Colors.SURFACE,
alignment=ft.Alignment.CENTER,
content=switcher,
),
ft.Button("Swap", on_click=swap),
],
),
)


def main(page: ft.Page):
page.theme_mode = ft.ThemeMode.DARK
page.horizontal_alignment = ft.CrossAxisAlignment.CENTER

page.appbar = ft.AppBar(title="AnimatedSwitcherTransition Showcase")
page.add(
ft.Text("Swap content to compare switcher transition effects."),
ft.Row(
wrap=True,
spacing=12,
expand=True,
scroll=ft.ScrollMode.AUTO,
alignment=ft.MainAxisAlignment.CENTER,
controls=[
showcase_card(transition)
for transition in ft.AnimatedSwitcherTransition
],
),
)


ft.run(main)
159 changes: 159 additions & 0 deletions sdk/python/examples/controls/types/animation_curve/showcase.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,159 @@
import asyncio

import flet as ft


def main(page: ft.Page):
page.theme_mode = ft.ThemeMode.DARK
page.horizontal_alignment = ft.CrossAxisAlignment.CENTER
duration_ms = 1200
track_width = 248
racer_size = 26
lane_padding = 10
lane_inner_width = track_width
lane_width = lane_inner_width + lane_padding * 2
travel_units = (lane_inner_width - racer_size) / racer_size
card_animations: list = []

def showcase_card(curve: ft.AnimationCurve) -> ft.Container:
state = {"forward": False}
progress = ft.Container(
width=0,
height=6,
border_radius=3,
bgcolor=ft.Colors.PRIMARY_CONTAINER,
animate=ft.Animation(duration_ms, curve=curve),
)
racer = ft.Container(
width=racer_size,
height=racer_size,
border_radius=13,
bgcolor=ft.Colors.PRIMARY,
shadow=ft.BoxShadow(
blur_radius=12, spread_radius=1, color=ft.Colors.PRIMARY
),
alignment=ft.Alignment.CENTER,
content=ft.Icon(ft.Icons.BOLT, size=14, color=ft.Colors.ON_PRIMARY),
offset=ft.Offset(0, 0),
rotate=0,
scale=1,
animate_offset=ft.Animation(duration_ms, curve=curve),
animate_rotation=ft.Animation(duration_ms, curve=curve),
animate_scale=ft.Animation(duration_ms, curve=curve),
)
status = ft.Text("idle", size=11, color=ft.Colors.ON_SURFACE_VARIANT)

def animate(forward: bool):
state["forward"] = forward
racer.offset = ft.Offset(travel_units if forward else 0, 0)
racer.rotate = 1 if forward else 0
racer.scale = 1.25 if forward else 1
progress.width = track_width if forward else 0
status.value = "forward" if forward else "reverse"
racer.update()
progress.update()
status.update()

def replay(e):
animate(not state["forward"])

card_animations.append(animate)

return ft.Container(
width=340,
padding=12,
border=ft.Border.all(1, ft.Colors.RED),
border_radius=10,
bgcolor=ft.Colors.SURFACE_CONTAINER_LOW,
content=ft.Column(
spacing=9,
controls=[
ft.Text(curve.name, weight=ft.FontWeight.BOLD),
ft.Container(
width=track_width,
height=6,
border_radius=3,
bgcolor=ft.Colors.SURFACE_CONTAINER_HIGH,
content=progress,
),
ft.Container(
width=lane_width,
height=48,
padding=lane_padding,
border=ft.Border.all(1, ft.Colors.OUTLINE),
border_radius=8,
clip_behavior=ft.ClipBehavior.HARD_EDGE,
bgcolor=ft.Colors.SURFACE,
content=ft.Stack(
controls=[
ft.Row(
spacing=0,
alignment=ft.MainAxisAlignment.SPACE_BETWEEN,
controls=[
ft.Container(
width=4,
height=22,
bgcolor=ft.Colors.OUTLINE,
),
ft.Container(
width=4,
height=22,
bgcolor=ft.Colors.OUTLINE,
),
],
),
racer,
],
),
),
ft.Row(
alignment=ft.MainAxisAlignment.SPACE_BETWEEN,
controls=[
status,
ft.Button("Replay", icon=ft.Icons.REPLAY, on_click=replay),
],
),
],
),
)

def play_all(e):
for animate in card_animations:
animate(True)

def reverse_all(e):
for animate in card_animations:
animate(False)

async def wave_all():
for animate in card_animations:
animate(True)
await asyncio.sleep(0.04)

page.appbar = ft.AppBar(title="AnimationCurve Showcase")
page.add(
ft.Text(
"Curve Lab: compare timing profiles across motion, progress, and spin."
),
ft.Row(
wrap=True,
spacing=8,
alignment=ft.MainAxisAlignment.CENTER,
controls=[
ft.Button("Play all", icon=ft.Icons.PLAY_ARROW, on_click=play_all),
ft.Button("Reverse all", icon=ft.Icons.REPLAY, on_click=reverse_all),
ft.Button("Wave", on_click=lambda e: page.run_task(wave_all)),
],
),
ft.Row(
wrap=True,
spacing=12,
expand=True,
scroll=ft.ScrollMode.AUTO,
alignment=ft.MainAxisAlignment.CENTER,
controls=[showcase_card(curve) for curve in ft.AnimationCurve],
),
)


ft.run(main)
Loading
Loading