wp_pivot_flutter 是一個 Flutter 套件,實現了類似 Windows Phone 的 pivot 標籤欄,提供一種流暢的滑動介面,用於在多個標籤頁之間導航。此元件設計現代,靈感來自微軟 Windows Phone 的使用者介面,提供平滑的過渡效果與直覺的導航體驗。該套件支援所有主要平台,包括 Android、iOS、Web、macOS、Windows 與 Linux,非常適合需要獨特標籤頁體驗的跨平台應用。它能輕鬆整合至 Flutter 應用中,設定簡單,並提供多種可自訂的樣式選項。
適用情境
跨平台移動和桌面應用
受Windows Phone啟發的使用者介面設計
基於滑動的標籤頁導航
儀表板中的內容組織
透過視覺反饋增強使用者參與度
主要特色
Windows Phone 風格的旋轉動畫
平滑的水平滑動
可自訂的標籤指示器
對多個平台的支援
內建過渡動畫
與現有 Flutter 專案的輕鬆整合
適合對象
尋求獨特使用者介面元件的開發人員
需要直覺的標籤導航的應用程式
追求復古現代風格的設計師
針對多個操作系統的專案
希望在各種設備上實現一致使用者體驗的團隊
使用建議
限制為樞軸式標籤佈局
可能需要額外的樣式來處理複雜用例
最適合具有3-5個標籤頁的應用程式
不太適合高度動態或嵌套的導航
效能可能在舊裝置上有所差異
原始 README
以下為關聯原始碼儲存庫的 README 原文快照,最新內容請造訪原始碼儲存庫。
wp_pivot_flutter
A Flutter package inspired from Windows Phone Style Pivot Tabs
2026 Update: This project is evolving beyond the Pivot control into a systematic,
research-driven recreation of the Windows Phone UI in Flutter. The first published
Pivot study uses the WP8.1 emulator; Lumia 1020 validation remains pending. See
docs/ROADMAP.md for the vision and methodology,
and the research site at chinmaykabi.com/wp_pivot_flutter
for the study, project status, and source material.
Requirements
Version 2.3.0 requires Flutter 3.22.0+ and Dart 3.4.0+. See the
changelog for release details and pub.dev
for registry availability. A merged version is not automatically published.
The repository's example app uses Flutter 3.44+ for its current Android
toolchain; the package library itself retains the 3.22 minimum.
Full Pivot: native layout and motion
WpPivotView owns both the headers and page content. It follows measurements from
Microsoft's real Pivot control running on the WP8.1 emulator: cyclic headers,
drag tracking, release-time selection, and separate outgoing/incoming content
animations. See the evidence study for recordings,
methodology and known limits. Emulator evidence is not labeled as Lumia evidence.
An optional PivotController drives selection; dispose controllers you create.
onChanged reports committed selections. Pages keep their state while hidden.
Arrow keys navigate, headers support keyboard focus and semantic selection, and
the system reduced-animation setting removes the spatial transitions. wrap: false disables cycling at the ends. Give the view a bounded width and height.
Geometry scales from a 480-unit reference viewport. Header and title font families,
weights, colors, and PivotMotion parameters can be customized. The package bundles
unmodified Selawik 1.01 under the SIL Open Font License;
no proprietary Segoe font files are redistributed. Selawik is a fallback, not an
identical copy of Segoe WP. Source and hashes are in assets/fonts/SOURCE.json.
Migrating the example
Replace the WpPivot app bar plus external PageView with one WpPivotView, move
the page widgets into children, and remove the two-controller synchronization.
The full view reproduces native content phases that a stock PageView does not.
The existing WpPivot header-only API and PivotController remain available.
Current fidelity limits
The native font and rasterizer differ from Flutter's. Capture timing is too coarse
to establish physical display latency; flick parameters remain provisional beyond
the recorded inputs. The regression suite replays 21 native core, 21 confirmation
and nine header/title input traces, including successful flicks, cancellations,
reversal, wrapping and ignored gestures during transitions. Header and title swipes
share the content gesture surface. A separate release-web runtime probe measures
real engine frame timing, not physical display latency or Lumia performance.
Independent hardware validation and broader gesture sampling remain separate work.
Launcher UI primitives
The experimental wp_components.dart entrypoint now contains the reusable UI
layer needed to compose a Windows Phone-style launcher without putting launcher
policy into this package:
WpPhoneTheme, WpTile, and WpTileGrid provide the palette, touch tilt,
controlled edit affordances, and explicit four-column layout.
WpAppListView, WpAppListHeader, WpAppListRow, and WpAlphabetGrid
reproduce the measured list and jump-grid geometry while leaving app data,
sorting, and selection destinations with the caller.
WpSplitSurfaceView provides the two-surface commit/cancel drag between Start
and the app list.
WpStaggeredSceneTransition applies a caller-driven perspective entry/exit
to one item. The caller supplies scene ordering and transform origin and still
decides when navigation happens.
Run flutter run -t lib/launcher_components.dart from example/ for a complete
composition using placeholder content. The package deliberately does not request
the Android home role, enumerate installed packages, launch intents, persist pins,
order apps, or schedule live data.
At the 480 x 800 evidence viewport, held-out comparisons found zero edge error
for 11 tile surfaces, 10 app-list slots, and 28 alphabet cells. Four held-out
lateral commit/cancel replays in both directions ended on the correct page with
zero final/separation error; presentation-registered tracking p95 ranged from
3.4 to 22.5 px within the 36 px host-capture uncertainty bound. Raw host timing
error is retained separately because emulator timestamps do not identify guest
presentation. The staggered scene pose is evidence-informed and visually
inspected, but exact native timing and transformed polygons are not claimed.
See the component contract and
runtime report.
Legacy header-only example
Selection state is managed by a PivotController - pass your own to drive the
pivot from the outside, or let the widget create one internally.
Application Bar, Panorama, ToggleSwitch, Slider, ProgressBar, TiltEffect, and the launcher UI primitives are available through the separate
package:wp_pivot_flutter/wp_components.dart import. From example/, run
flutter run -d chrome -t lib/components.dart to try them together.
They are experimental. The three micro controls have repeated WP8.1 emulator
measurements and held-out comparisons; the earlier component batch remains pilot
evidence. See the component studies for evidence,
known differences, and the reusable capture/replay workflow. Emulator results do
not establish Lumia hardware fidelity. The existing Pivot API is unchanged.
Contributors ✨
Thanks goes to these wonderful people (emoji key):
This project follows the all-contributors specification. Contributions of any kind welcome!
Starware
wp_pivot_flutter is Starware.
This means you're free to use the project, as long as you star its GitHub repository.
Your appreciation makes us grow and glow up. ⭐