Flusmic 2.0.0 released

Pablo
Pixela
Published in
3 min readJun 12, 2020

--

Hello everybody, today I’m excited to share with you some news about Flusmic. For those who don’t know, Flusmic is a little package to integrate Prismic.io into any Flutter app. If you want to know more, you can check our previous post about this powerful combination.

I know that we haven’t been able to continue the Prismic.io + Flutter series, but there are plenty of good reasons. I’m proud to present to you a new Flusmic version, with tons of new features, thanks to the hard work of all member of the Pixela team.

What’s new on 2.0.0?

The first (and major) change is the support for Dart-only. 🎉 The old structure didn’t let us integrate Flusmic into Dart projects but now we can easily add it to both Dart and Flutter.

After that clarification, here are a couple of other new things in 2.0.0:

Wiki and documentation:

A brand new wiki, with (a lot) of info of how to use Flusmic: https://github.com/PixelaGt/flusmic/wiki

Predefined models

We now have a couple of type models that let you create a custom class to handle your data in a better way.

Getting started with this new models is easy with the help of json_serializable and freezed packages.

Example of a Data class

Rich Text support:

Full Rich Text support by using our new Richable data class:

//Can be an Embed Text, Embed Image or Web Embed.
List<Richable> richTextField;

Multiple link type support:

There are many types of links in Prismic.io, but we now have a proper way to handle them.

//Can be a Media, DocumentReference or Weblink.
List<Linkable> linkField;

If you want to know more about about Rich Text, Links and new model structure, check the custom data wiki section.

Flusmic UI

Another big change. In addition to the Flusmic package, we’ve created a brand new flusmic_ui package to use Flusmic more easily in Flutter apps specifically.

What does Flusmic UI do? Well, besides including all Flusmic features, we can expect to find some interesting widgets to build our apps:

FlusmicRichText

2.0.0 introduces Rich text support, it was more than sure that we were going to create a widget for this.

Example of FlusmicRichText widget

By default, FlusmicRichText makes use of TextTheme in your app, but you can customize each text style individually.

FlusmicRichText(richFields, 
paragraphStyle: TextStyle(...),
headline1Style: TextStyle(...)
);

Currently,FlusmicRichText only handles Text and Image, in further updates we will add support for lists and embedded items.

FlusmicBuilder

This widget was already in the original Flusmic package, its main gold is to build widgets depending on Flusmic fetching status.

We made some improvements in this widgets and fixed some issues.

Here’s how you can use it in combination with FlusmicRichText:

You can check the available widget section in our wiki to know more about this new Flusmic widgets.

And that’s it, we’ll be working on new and exciting features to add in the future and if you have any trouble or want to help grow Flusmic, here is the repo:

See you soon.

--

--

Pablo
Pixela

Flutter | Android | Ruby | NodeJS developer / @PixelaGT Co-Founder