Development¶
Project layout¶
flet-review/
├── pyproject.toml # package metadata, setuptools build
├── zensical.toml # this documentation site
├── docs/ # documentation pages
└── src/
├── flet_review/
│ ├── __init__.py # exports InAppReview
│ └── flet_review.py # Python service
└── flutter/flet_review/
├── pubspec.yaml # Dart package
└── lib/
├── flet_review.dart # exports Extension
└── src/
├── extension.dart # creates the service
└── flet_review.dart # InAppReviewService
setuptools bundles everything under src/flutter/flet_review as package
data, so the Flutter code travels with the wheel.
Testing changes¶
flet run doesn't include native extensions, so test on a real device:
Building the package¶
Documentation¶
The docs are built with Zensical. The API reference is generated from the docstrings via mkdocstrings.
pip install --group dev # or: uv sync --group dev
zensical serve # live preview at http://localhost:8000
zensical build # static site in ./site
Releasing¶
Releases are automated with GitHub Actions:
| Workflow | Trigger | What it does |
|---|---|---|
docs.yml |
Push to main touching docs, source or zensical.toml |
Builds the site and deploys it to GitHub Pages |
release.yml |
Push of a v* tag |
Checks versions, builds the package, publishes it to PyPI, creates a GitHub release |
To publish a new version:
- Bump
versionin bothpyproject.tomlandsrc/flutter/flet_review/pubspec.yaml. - Commit and push to
main. -
Tag and push:
Versions must match
The release fails if the tag, pyproject.toml and pubspec.yaml disagree.