Skip to content

What are the Problems with Flutter Web?

flutter web problems

As any other Platform, Flutter Web also has several problems. You can compare Flutter to a Swiss knife – that is hitting all places, but not always in a perfect way. It will minimize the work in some use cases, but it may increase or do not-optimally in another place.

VMs – Virtual Machine inside a virtual machine inside a virtual machine.

It is again a tendency copied from the backend. The browsers are incrementally getting more features. The latest thing that is hot on this topic is the WebAssembly. It is like a JavaScript virtual machine with optimal non-interpreted execution. In some way it is just again new target environment. Many Frameworks on the backend are actually trying to skip JavaScript and compile to ASM. So – again – the code goes through so many layers, that can make your head spin around.

The developers of Flutter have this as an option. The c/c++ code could be compiled to ASM. But, don’t look at the size of the application then.

SEO

In 2022 I am not sure that the old way of doing SEO is still totally valid. What is the old way of doing SEO? Rendering the content in HTML format with MicroData that describes it semantically. Big chunk or features of the modern websites are rendered at runtime with JavaScript.

SSR

To bridge between the New world and the old world, some Frameworks developed Server Side Rendering – generating the output of the JavaScript on the client, right away on the server, and getting the client side catch up the state after the page has completed loading and downloading.

Reimplement drawing

It will be hard to implement SSR with Flutter framework, because it mostly uses skia under the hood to draw. Skia is also used beneath chrome itself. The end result is drawing inside a drawing. And here is the big disadvantage. Only the reading human user will be able to comprehend what is drowned. When the content is painted , it makes it harder for a computer to understand it – Not with a simple crowder. All the search engines must reimplement everything. And this is not going to happen.

Some certain browsers could try to hack by executing the JavaScript on the plant side, but this will be probably an exception.

Text Selection

This is a feature that’s native to the browser Dom elements. I found many clients actually don’t want the user to be able to select text on the pages. This feature is disabled by default by flutter. This makes things a little bit mixed up.

There is a an API for this in flutter. But of course the developers must do the extra work to enable it.

Scroll lag

When the flutter framework reimplements everything, it is really everything. The control of the scroll behaviour is dependent on too many layers:

  • Browser speed and usage of native hardware
  • The exposed drawing to html canvas – APIs
  • The code generation of dart to JavaScript (flutter framework)
  • The Client developer Code

I don’t expect this to be resolved too easily.

Memory management

Another thing that could be a problem is Garbage collection. It does not run for free. You need to understand how memory works.

Garbage disposal in JavaScript is expensive.

I’ve seen this in similar frameworks like – GWT, Vaadin Framework, working with lot of objects in general.

Bloc helps minimize widget rebuild

Setting the state inside a Stateful Widget rebuilds the visual tree. So, the coder should minimize the number of nodes the functionality changes.

Client developer memory knowledge on optimizations are a plus

General purpose understanding how memory, variables, scope, the VM works key expertise. It is archived with a lot of years of practice, projects, profiling, encountered use cases and resolving problems.

Runtime UX performance

No matter how good a client developer is, it will not beat the tool developers. A lot of work must be done. In my experience – On more powerful devices and internet connection, it actually seems to work pruty well. Flutter web will not perform better than the more native to the web and optimized frameworks, but, it is a choice for all that want native applications/executables/ everywhere/ including a web app – with minimal work.

Leave a Reply

Your email address will not be published.