MGMLaboratory
Back

Menu

01Home
02About Us
03Projects
04Publications
05Member
06Articles
07Contact

Let's Talk

Open in Mail app

Socials

Malang (ID) --:--Privacy PolicyTerms of Service

January 1, 20232 min read

Choosing a State Manager for a Flutter Marketplace AppChoosing a State Manager for a Flutter Marketplace App

A benchmark on a real shopping app turns a heated library debate into a countable question.

  • Journal
  • Publications

Written by

  • SRShirasaka RenIT & Infrastructure · Student Member

In this article

  1. 01Why the two libraries differ
  2. 02What the benchmark found

Ask five Flutter developers which state library to use and you will get five confident answers. The arguments are real, but they are rarely backed by numbers from an application like the one you are building.

State handling shows up as responsiveness on the device. Image: Kskhh, CC BY-SA 4.0, via Wikimedia Commons.
Fig. 01State handling shows up as responsiveness on the device. Image: Kskhh, CC BY-SA 4.0, via Wikimedia Commons.

A 2023 study picked a harder test case than usual. The authors benchmarked GetX and Riverpod on Flutter ecommerce, an open source marketplace app from GitHub, rather than on a minimal demo. Marketplace apps stress a state manager in specific ways: long product lists, image loading, filters, and a cart that several screens depend on.

01/02

Why the two libraries differ

GetX is deliberately all in one. State, routing and dependency injection live in the same package, and the library tends to rebuild only the widgets that asked for a value. Riverpod takes the opposite route, building from composable providers that give finer control at the cost of more wiring.

Choosing libraries is an early project decision. Image: Thamizhpparithi Maari, CC BY-SA 4.0, via Wikimedia Commons.
Fig. 02Choosing libraries is an early project decision. Image: Thamizhpparithi Maari, CC BY-SA 4.0, via Wikimedia Commons.

02/02

What the benchmark found

The team measured three features under both libraries: loading the home screen, running a search, and adding an item. For each one they recorded memory usage, execution time and processor utilisation.

  • GetX used less memory across the features and scenarios tested.
  • GetX also completed execution faster than Riverpod.
  • Processor utilisation showed no clear difference between the two.

For a developer, those three lines map onto things users notice. Memory and execution time shape how quickly a screen appears and how smoothly scrolling feels on a mid range phone. Processor load shapes battery drain and heat, and there the two came out level.

It is worth keeping the scope in view. This is one application, one platform and three features, so it does not settle the argument in general. What it does is replace opinion with a measurement on a workload closer to production than most comparisons use.

Source

  1. Jatnika, Akbar and Pinandito (2023). Comparative Analysis of the Use of State Management in E-commerce Marketplace Applications Using the Flutter Framework. Journal of Information Technology and Computer Science.

    DOI10.25126/jitecs.202382557 (opens in a new tab)

Next articleVisits and Ties with NTU's Centre for Augmented and Virtual Reality(Keep scrolling)(Read it next)(Loading)