Mobile Development 11 min read

Rebuilding Flutter Infrastructure at Xianyu: Challenges and Solutions

Xianyu tackled Flutter adoption by creating a private CocoaPods CI pipeline, a component‑based fishRedux architecture, and a shared‑GL engine modification that let native middleware run in Flutter, thereby unifying Android, iOS, and Flutter development, improving build speed, and contributing tools back to the community.

Xianyu Technology
Xianyu Technology
Xianyu Technology
Rebuilding Flutter Infrastructure at Xianyu: Challenges and Solutions

At the Flutter Live Beijing conference, Google announced the first stable Flutter release and invited the Xianyu team to share their half‑year experience with Flutter, including business outcomes and technical challenges.

The article summarizes the talk of Yu Jia (Zong Xin), who described the advantages of Flutter—high‑performance rendering with native ARM code, pixel‑perfect UI consistency across iOS and Android, and rapid development via hot‑reload—and why Xianyu chose Flutter as its primary cross‑platform solution.

Three major challenges were identified: integrating Flutter into the existing engineering system while keeping Android, iOS, and Flutter developers productive; defining a unified business architecture that promotes code reuse and isolation; and ensuring that shared middleware (image, audio‑video libraries) works consistently across native and Flutter stacks.

To address the engineering‑system challenge, Xianyu built a CI pipeline that packages Flutter frameworks (Flutter.framework and App.framework) and plugins into a private CocoaPods repository. Native developers can simply add the pod versions without installing the full Flutter SDK. The packaging process was accelerated by a custom backend.sh + insert script that builds Flutter artifacts without depending on the native host project, reducing CI time from 10‑20 minutes to about 2.5 minutes.

For the business‑architecture challenge, the team created a component‑based framework called fishRedux , inspired by Redux’s single‑source‑of‑truth principle. It separates view, reducer, middleware, and effect layers, allowing fine‑grained component reuse and isolation. The dependents field enables dynamic assembly of components, supporting multiple variants of a detail page while keeping code isolated.

The middleware challenge involved reusing existing Alibaba Group libraries (network, crash reporting, audio‑video, image processing) in Flutter. Since Flutter’s texture handling cannot share GL contexts, Xianyu modified the Flutter engine to expose a shared GL context group, enabling efficient reuse of native image and video pipelines.

Beyond internal work, Xianyu contributed back to the Flutter community by sharing their solutions, reporting issues to the Flutter team, and planning to open‑source fishRedux and other tools. They also provided demos and invited developers to submit issues on their GitHub repository.

In summary, Xianyu’s half‑year of Flutter adoption resulted in an isolated hybrid‑engine architecture, a unified business framework, and efficient reuse of foundational middleware, laying a solid foundation for future cross‑platform development.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

DARTFlutterMobile Developmentcross‑platformci/cdComponent ArchitectureInfrastructure
Xianyu Technology
Written by

Xianyu Technology

Official account of the Xianyu technology team

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.