Skip to content

fix: preserve CupertinoBottomSheet content transparency - #6780

Open
ndonkoHenri wants to merge 4 commits into
mainfrom
fix/cupertino-bottom-sheet-background
Open

fix: preserve CupertinoBottomSheet content transparency#6780
ndonkoHenri wants to merge 4 commits into
mainfrom
fix/cupertino-bottom-sheet-background

Conversation

@ndonkoHenri

@ndonkoHenri ndonkoHenri commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

The Material wrapper added to fix text styling used the default canvas material type. It painted an opaque rectangular background behind custom sheet content, obscuring rounded corners and transparent padding.

Using MaterialType.transparency retains Material text behavior without painting that background.

Fixes #4761

Summary by Sourcery

Preserve CupertinoBottomSheet content transparency and improve generated Python project test imports.

Bug Fixes:

  • Preserve transparent content and rounded corners in CupertinoBottomSheet while retaining Material text styling.
  • Configure generated Python app projects to include their src directory in the test import path.

The app template ships a `tests/` directory, but nothing placed the app's
`src/` on `sys.path`: the `flet` pytest plugin only inserts it when
`FLET_TEST_APP_PATH` is set, which nothing sets. The generated test passed
regardless, because it drives the app on-device through the `flet_app`
fixture and never imports app code — so the gap surfaced only once a module
was added next to `main.py` and given a plain unit test, which failed
collection with `ModuleNotFoundError`.

Set `pythonpath = ["src"]` in the generated `[tool.pytest.ini_options]`,
matching `[tool.flet.app].path`, so tests import app modules the same way
the app itself does — no `conftest.py`, no editable install, and no
`[build-system]` in an app that is not a distributable package.

Also drop the stale `storage/` entry from the generated `.gitignore`:
dev-mode app storage has lived in `.flet/storage/{data,cache,temp}` since
0.86, covered by the `.flet/` entry above it and by the `.gitignore` that
`flet run` writes inside `.flet/` itself.

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Aug 18, 2026

Copy link
Copy Markdown

Deploying flet-website-v2 with  Cloudflare Pages  Cloudflare Pages

Latest commit: f74830b
Status: ✅  Deploy successful!
Preview URL: https://d2228860.flet-website-v2.pages.dev
Branch Preview URL: https://fix-cupertino-bottom-sheet-b.flet-website-v2.pages.dev

View logs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

the border radius and the centering of the cupertino bottom sheet is not working in flet v0.26

1 participant