Skip to content

feat: add flet-spinkit extension package wrapping flutter_spinkit ^5.2.2 - #6596

Merged
FeodorFitsner merged 19 commits into
mainfrom
inesa/flet-spinkit
Jun 18, 2026
Merged

feat: add flet-spinkit extension package wrapping flutter_spinkit ^5.2.2#6596
FeodorFitsner merged 19 commits into
mainfrom
inesa/flet-spinkit

Conversation

@InesaFitsner

@InesaFitsner InesaFitsner commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

Description

Summary

  • Adds flet-spinkit, a new Flet extension package wrapping the Flutter flutter_spinkit ^5.2.2 package
  • Exposes all 30 spinner widgets as individual Flet controls (RotatingCircle, Wave, Ring, etc.) with color, size, duration properties and widget-specific extras (wave_type, item_count, line_width, border_width)
  • Registers the extension in the desktop client runner (client/lib/main.dart)
  • Adds two examples: a full 30-spinner grid showcase and a properties demo showing color, size, duration, and widget-specific props
  • Adds a single-page docs entry at /docs/controls/spinkit with install instructions, both examples, and per-control ClassMembers sections
  • Registers flet_spinkit in the crocodocs API extraction pipeline
  • Adds flet-spinkit to the CI build and publish pipeline
  • Adds unit tests covering instantiation, property values, and all 30 control types (screenshot tests are not applicable — spinkit controls are continuous animations)

Test plan

  • Run flet run on sdk/python/examples/extensions/spinkit/spinkit_showcase/ — all 30 spinners should animate
  • Run flet run on sdk/python/examples/extensions/spinkit/spinkit_props/ — property variations (color, size, duration, wave_type, line_width, etc.) should be visible
  • Run pytest sdk/python/packages/flet/integration_tests/extensions/spinkit/ — 10 unit tests should pass
  • Run fvm flutter build macos from client/ — should compile cleanly with flet_spinkit included

Test code

# Minimal test/reproduction code for reviewers, if applicable.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Checklist

  • I signed the CLA.
  • I have performed a self-review of my own code.
  • My code follows the style guidelines of this project.
  • I have commented my code, particularly in hard-to-understand areas.
  • My changes generate no new warnings.
  • New and existing tests pass locally with my changes.
  • I have made corresponding documentation changes, if applicable.
  • I have added changelog entries for user-facing changes, if applicable.
  • I have updated release guide pages and website/sidebars.yml for breaking changes, removals, and deprecations, if applicable.

Screenshots

Additional details

Summary by Sourcery

Add a new flet-spinkit extension package that exposes Flutter SpinKit loading animations as Flet controls, wires it into the Flutter client and extension system, and documents and demonstrates its usage.

New Features:

  • Introduce the flet-spinkit Python package providing 30 SpinKit-based loading spinner controls for Flet.
  • Add a Flutter-side flet_spinkit package and extension to render SpinKit controls using flutter_spinkit.

Enhancements:

  • Register the flet_spinkit extension in the desktop client so SpinKit controls are available at runtime.
  • Integrate flet_spinkit into the crocodocs API extraction pipeline for automatic control reference generation.

Build:

  • Include flet_spinkit in the Flutter client pubspec so it is built with the desktop client.
  • Add flet-spinkit to CI build and publish workflows so the package is produced and released with other extensions.

Documentation:

  • Document the SpinKit controls in a new docs page with installation guidance, shared properties, and per-control API sections.

Tests:

  • Add integration tests validating SpinKit control instantiation and properties.
  • Add two example apps demonstrating all SpinKit spinners and their configurable properties for manual verification and gallery usage.

…er_spinkit ^5.2.2

Adds 31 separate spinner animation controls (SpinKitRotatingCircle,
SpinKitWave, SpinKitRipple, etc.) following the same structure as
flet-color-pickers. Includes a spinkit_showcase example.
Python API is now fsk.RotatingCircle, fsk.Wave, fsk.WaveType etc.
Flutter control type strings (@ft.control decorator values) are unchanged.
…ove local path source overrides from examples

@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.

We've reviewed this pull request using the Sourcery rules engine

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jun 17, 2026

Copy link
Copy Markdown

Deploying flet-website-v2 with  Cloudflare Pages  Cloudflare Pages

Latest commit: 78bcbf7
Status: ✅  Deploy successful!
Preview URL: https://2d3de54d.flet-website-v2.pages.dev
Branch Preview URL: https://inesa-flet-spinkit.flet-website-v2.pages.dev

View logs

Comment thread website/docs/controls/spinkit/index.md Outdated
- Register flet-spinkit in sdk/python/pyproject.toml (dependencies + uv.sources)
- Register flet-spinkit in sdk/python/packages/flet/pyproject.toml (extensions group)
- Register flet-spinkit in flet_build_test/pyproject.toml (dependencies, uv.sources, dev_packages)
- Replace custom _parseWaveType() helper with parseEnum() in spinkit.dart
- Update implement-flet-extension SKILL.md with lessons learned from this implementation
Comment thread sdk/python/packages/flet-spinkit/README.md
Replace single-page spinkit docs with individual pages per control,
consistent with flet-color-pickers and other extensions. Add WaveType
enum page to fix unresolved reST cross-reference on the Wave page.
…tTestApp

Replace pure Python unit tests with integration tests that render each
control in a real Flutter app. Use tester.pump() instead of
pump_and_settle() to advance animation clock without waiting for
continuous animations to settle. Assert finder.count == 1 to verify
each control is mounted in the Flutter widget tree.
@FeodorFitsner
FeodorFitsner merged commit c2b5ba8 into main Jun 18, 2026
8 of 76 checks passed
@FeodorFitsner
FeodorFitsner deleted the inesa/flet-spinkit branch June 18, 2026 15:21
FeodorFitsner added a commit that referenced this pull request Jun 22, 2026
…#6608)

* Update CONTRIBUTING.md hello.py example to use modern `ft.run()` and `ft.Page`/`ft.Text` instead of deprecated `flet.app (#6582)

* Fix issue #6579

* docs: use fvm for Flutter commands

* feat: add flet-spinkit extension package wrapping flutter_spinkit ^5.2.2 (#6596)

* feat(flet-spinkit): add flet-spinkit extension package wrapping flutter_spinkit ^5.2.2

Adds 31 separate spinner animation controls (SpinKitRotatingCircle,
SpinKitWave, SpinKitRipple, etc.) following the same structure as
flet-color-pickers. Includes a spinkit_showcase example.

* fix(flet-spinkit): use local path source for flet-spinkit in example

* fix(flet-spinkit): use ft.Alignment.CENTER instead of ft.alignment.center

* fix(flet-spinkit): use ft.Border.all instead of ft.border.all

* refactor(flet-spinkit): simplify example to a single SpinKitRotatingCircle

* feat(flet-spinkit): register flet_spinkit extension in client runner

* fix(flet-spinkit): remove SpinKitPumpCurve/RingCurve (Curve helpers, not widgets), add SpinKitWaveSpinner

* refactor(flet-spinkit): strip SpinKit prefix from all Python class names

Python API is now fsk.RotatingCircle, fsk.Wave, fsk.WaveType etc.
Flutter control type strings (@ft.control decorator values) are unchanged.

* feat(flet-spinkit): expand example to a full 30-spinner grid showcase

* feat(flet-spinkit): add spinkit_props example; use system theme in both examples

* docs(flet-spinkit): add single-page SpinKit docs and sidebar entry

* docs(flet-spinkit): register flet_spinkit in crocodocs; remove image refs from docs

* ci(flet-spinkit): add flet-spinkit to build and publish pipeline; remove local path source overrides from examples

* test(flet-spinkit): add unit tests; fix stale showcase description

* refactor(flet-spinkit): rename import alias from fsk to spins in examples and tests

* feat(flet-spinkit): complete integration and cleanup

- Register flet-spinkit in sdk/python/pyproject.toml (dependencies + uv.sources)
- Register flet-spinkit in sdk/python/packages/flet/pyproject.toml (extensions group)
- Register flet-spinkit in flet_build_test/pyproject.toml (dependencies, uv.sources, dev_packages)
- Replace custom _parseWaveType() helper with parseEnum() in spinkit.dart
- Update implement-flet-extension SKILL.md with lessons learned from this implementation

* docs(flet-spinkit): split into per-control pages, add WaveType page

Replace single-page spinkit docs with individual pages per control,
consistent with flet-color-pickers and other extensions. Add WaveType
enum page to fix unresolved reST cross-reference on the Wave page.

* test(flet-spinkit): rewrite as proper integration tests using ftt.FletTestApp

Replace pure Python unit tests with integration tests that render each
control in a real Flutter app. Use tester.pump() instead of
pump_and_settle() to advance animation clock without waiting for
continuous animations to settle. Assert finder.count == 1 to verify
each control is mounted in the Flutter widget tree.

* docs(flet-spinkit): reformat README to match other extension packages

* Lift app packaging into serious_python: unpacked bundle + reworked storage dirs

App Python sources now ship unpacked inside the app bundle (next to
stdlib/site-packages) on macOS/iOS/Windows/Linux instead of being extracted
from app.zip on first launch; Android ships a stored app.zip asset unpacked
once. The app dir is read-only, so the process cwd moves to a writable,
app-private data dir.

- build_base.py: stage the app via SERIOUS_PYTHON_APP for native platforms;
  gate the app.zip existence check to Emscripten/web.
- templates main.dart / native_runtime.dart: ask serious_python for the app
  dir (prepareApp/getAppDir) instead of extracting app.zip; set cwd +
  FLET_APP_STORAGE_DATA to <support>/data, add FLET_APP_STORAGE_CACHE, repoint
  FLET_APP_STORAGE_TEMP to the OS temp dir; pubspec pins serious_python 4.0.0
  and makes app.zip a web-only asset.
- run.py: dev-mode storage under a hidden, self-gitignored <project>/.flet/;
  cwd = .flet/storage/data, redirect TMPDIR, set the three FLET_APP_STORAGE_*
  vars; hide .flet/ on Windows; write a README explaining the dirs.
- docs: new breaking-change guide + updated environment-variables,
  read-and-write-files, storagepaths, sidebars.

* Bump pasteboard to ^0.5.0 (and refresh transitive deps in client lockfile)

* flet build: Swift Package Manager by default for iOS/macOS (#6607)

* flet build: use Swift Package Manager for iOS/macOS by default

Drives the new serious_python_darwin SPM build path. SPM is Flet's default
darwin integration (CocoaPods remains the fallback); Flet auto-enables it only
on its own managed Flutter, never a Flutter found on PATH.

- flutter_base.py: install_flutter() now enables Swift Package Manager on the
  Flet-managed Flutter (`flutter config --enable-swift-package-manager`) and sets
  flutter_installed_by_flet.
- build_base.py: _darwin_spm_active() reports whether the darwin build uses SPM
  (true on Flet's managed Flutter; otherwise honors the user's flutter config via
  `flutter config --machine`). When active, the package step gets
  SERIOUS_PYTHON_DARWIN_SPM (so serious_python does the host-side SPM staging the
  podspec prepare_command can't) + SERIOUS_PYTHON_SPM_KEY_FILE, and the flutter
  build env gets SP_NATIVE_SET read back from that key file so SwiftPM re-resolves
  when the staged native set changes.

Requires serious_python >= the SPM-capable release.

* flet build: SPM-by-default plumbing + client plugin migration + stale flutter-packages fix

- build_base.py: set SERIOUS_PYTHON_DARWIN_SPM explicitly (true/false) and
  pass SP_NATIVE_SET key file through to serious_python's package step;
  --swift-package-manager / pyproject opt-out with flet-video auto-fallback.
- build_base.py: register_flutter_extensions now always clears the permanent
  flutter-packages dir before staging this build's set, so an extension
  removed since the previous build (e.g. dropping flet-video) no longer
  lingers in the built app.
- flutter_base.py: drop the global 'flutter config' SPM toggle (flet must not
  mutate Flutter's machine-wide config).
- client: migrate off non-SPM plugins for the default desktop client —
  window_to_front -> windowManager.show(); pin screen_retriever 0.2.1 (SPM);
  regenerate plugin registrants + Runner SPM project wiring.
- typos: exclude generated *.pbxproj (pre-commit hook + _typos.toml).
- templates/build pubspec + CHANGELOG.

* flet build: always stage serious_python for SPM (drop flet-video CocoaPods fallback)

The flet-video auto-fallback assumed that an app with a non-SPM plugin builds
entirely with CocoaPods, so serious_python was staged for CocoaPods. That's
wrong for Flutter 3.44+ (SPM on by default): Flutter builds hybrid — plugins
with a Package.swift (incl. serious_python_darwin) use SPM while non-SPM plugins
(media_kit/flet-video, torch_light) use CocoaPods in the same build. Staging
serious_python for CocoaPods while Flutter linked it via its Package.swift left
dart_bridge unlinked -> 'Undefined symbol: _DartBridge_*/_serious_python_run' on
macOS and iOS.

Always stage for SPM (Flutter's default); other non-SPM plugins ride CocoaPods
via Flutter's hybrid mode independently. Keep --no-swift-package-manager /
swift_package_manager=false only for when SPM is disabled in Flutter itself.
Removes _references_non_spm_plugins/_NON_SPM_PLUGINS/_app_uses_non_spm_plugin
(and the now-unused canonicalize_name/contextlib imports).

* Add example deps and modernize typing imports

Add flet-code-editor and flet-color-pickers to the flet_build_test example (pyproject and example imports) and register flet_spinkit import in main.py. Modernize typing usage across packages: add conditional typing-extensions dependency for flet-webview, use typing.Self on Python >=3.11 with a fallback to typing_extensions.Self, and simplify/remove try/except fallbacks by importing Protocol, TypeVar and ParamSpec directly from typing. These changes simplify type annotations and ensure compatibility with older Python via typing-extensions.

* Pin serious_python to 4.0.0

Commented out the Shizuku Android provider entries in sdk/python/examples/apps/flet_build_test/pyproject.toml to disable that provider by default. Replaced the git-based serious_python dependency in sdk/python/templates/build/{{cookiecutter.out_dir}}/pubspec.yaml with a pinned version (4.0.0) to stop tracking the main branch and use the published package.

---------

Co-authored-by: Federico Rao <157750791+Federicorao@users.noreply.github.com>
Co-authored-by: InesaFitsner <inesa@appveyor.com>
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.

3 participants