Unleash

Community-built: How Unleash’s open-source community coded its Flutter SDK, from the ground up

Arif Hidayat couldn’t find the front-end SDK he needed to develop mobile apps with Flutter. So he built it himself.

Arif is a software engineer at Bukalapak, an Indonesia-based e-commerce company. Its app is available in multiple app stores. The company recently transitioned to Flutter to develop its apps in tandem, and was looking into compatible feature flag solutions.

“We wanted to check for open source projects that we could use for feature flags,” says Arif. “At the same time we had just migrated to Flutter. We checked if Unleash had an official SDK for us to use.”

Arif’s search had limited success.  “There was a server-side Dart SDK that we could use, where we could see all our flags and manipulate them. This is great for our backend, but there wasn’t anything that we could use for our frontend side, on mobile. So we created it ourselves.”

A new library from scratch

Diving into building the app was a learning experience for Arif. “I built the code from scratch. It was a great experience for me, as it was the first time I created a library,” says Arif.

His approach was methodical. “We started out looking at the minimum requirements to implement our own SDK, including what would be needed using Unleash’s proxy with the different app stores. I checked with my engineering manager on where we would need more support, and what that would be. That list became the basis for our approach to coding the SDK,” says Arif.

The process has given Arif a new set of skills. “I think building libraries will be a lot easier for me in the future. I totally want to try again,” Arif laughs.

Throughout, Arif was in touch with the Unleash team. “I reached out to (Community Manager) Pranshu, then (Unleash CTO) Ivar, and we had a discussion about what I had built so far,” shares Arif. “We went over what needed to be implemented to go forward with the SDK. Eventually we passed the SDK to the Unleash team for its final polish.” 

Testing out the SDK in the Unleash community

“I searched in GitHub  and found that there was a package in development by a writing team. When the first version was published, I immediately jumped on to try it. It worked.”

This is Davide Campagnola, a full-stack developer at Tutored. His company’s main product is an app which helps students and graduates apply for job offers. The traditional way of developing  mobile apps was slowing Davide and his team down.

“Every feature was tied to when the app was published. If it didn’t work, it didn’t work,” Davide shares. “We found it difficult to analyze the results of feature changes. It was a problem.”

The team wanted a better understanding of its users. “If people stopped applying, it was difficult to see why. Even if we did know why and wanted to switch off a feature, it could take days to get approval from the app stores. This was painful.” 

Because Tutored’s app is available in both iOS and Google Play, the company uses Flutter to build its mobile app.

“We had seen earlier that feature flags were a good way to test new features,” Davide shares. “So we contacted Unleash about a Flutter SDK, and were one of the first users to try out the new SDK when it was published. This was two months ago.”

Davide was really happy with the results. “With the Flutter SDK, I can test new features. We can publish an app as soon as possible, even on Fridays!” Davide laughs.

With the ability to use Flutter with Unleash, Davide and his team can experience the full benefits of feature management, including experimentation.

“Once published, we can check if a feature is working, which is really cool,” says Davide. “We can also experiment because all our flags are sent to an analytics service. We’re now able to know what changes once a flag is active, and if our audience applies to more job postings as a result.” 

Through pairing Unleash with Flutter, Davide’s company found a new way of developing software. “This is an approach that we never did before,” says Davide.

Building on a strong base

The Flutter SDK is new, and Davide has ideas on how it could be even better.

“What we’d like from the Flutter SDK is a more reactive approach,” says Davide. “Right now you have a new widget that is built every time a flag changes. We know it’s possible to make it more synchronous because that’s how the JavaScript SDK functions. So there definitely are improvements, but we’re really happy with the Flutter SDK as it is today.” 

Arif agrees, and is eager to contribute to the future of Unleash’s Flutter SDK. He has ideas on where he’d like to start.

“The SDK is never done,” says Arif. “ We’re still improving it. One thing we’d like to do, for example, is create a widget so we don’t need to create a grid for another region to use the SDK. Or a builder that would synchronously update a flag. We also have some plans for implementing more analysis functions.” 

Now that the Flutter SDK is available, Davide’s team has seen tremendous results. “I don’t know if I can estimate how much time we’re saving, but it’s really a lot,’ Davide says. “Releasing in a more controlled way with rollouts and kill switches is a huge change. It transforms your entire development approach.” 

“For us, the Flutter SDK has saved us a lot of time because we can do partial releases of features,” says Arif. “We have a real store and we’re an eCommerce company. And it’s really helpful to test out a release with say, 100 people, before releasing it to everyone else. I could easily say this saves at least one or two months of work.”

Share this article