Does Flutter have a good way to share code between mobile and web applications?

658

That's the whole propaganda of flutter. The framework is made to write one code and run everywhere (android, ios, web, desktop). So you definitely are on the right path.

Unfortunately flutter web is a bit unstable right now and maybe you can face some difficulty.

Share:
658
Beto Salvador
Author by

Beto Salvador

Updated on December 14, 2022

Comments

  • Beto Salvador
    Beto Salvador over 1 year

    I'm looking for a good tool to develop to Web and Mobile.

    A friend of mine recommended me to learn NativeScript/Angular because with that tool is possible to write the services, models, and controllers only one time and create specific views for Mobile and Web platform, sharing almost 100% the business logic code.

    But I think that native script is not so hyped as flutter and maybe flutter could be more used in the next days, so I'm searching for this type of tutorial (sharing logic between Mobile and Web) in a flutter, but I'm not sure if this is really possible.

    I saw something about BLOC pattern, but I am not sure if this is the correct solution for this type of project, or even if it is possible to write logic code only one time and specific "views" for Mobile and Web in a flutter.

    Can anybody help me with this issue?

    Thanks in advance (and sorry about my English, I'm not fluent yet)

    • Rémi Rousselet
      Rémi Rousselet almost 5 years
      Flutter apps can be deployed to the web directly
  • Beto Salvador
    Beto Salvador almost 5 years
    Hi, thanks for response. Can you share with me a good tutorial about this??
  • Rodrigo Bastos
    Rodrigo Bastos almost 5 years
    No problem. You can start reading the documentation. It's a good place to start IMO