How to create single backend website, iOS app and android app using flutter?

632

Solution 1

As a learning path to building cross-platform apps, I would start with the Flutter codelabs, in this order:

  1. Write your first Flutter app, part 1
  2. Write Your First Flutter App, part 2
  3. Write your first Flutter app on the web
  4. Then I would look at Firebase for the backend: Add Firebase to your Flutter app and Firebase for Flutter.

For a nice introductory code example of a multi-platform app (Android, iOS, web, but without backend added) see the Provider Shopper sample.

Lastly, I find the Flutter Widget of the Week series very useful for learning about the purpose and capabilities of each widget.

Solution 2

You can Create a Powerful Backend Using Firebase as a Backend service https://firebase.google.com/

As I'm Doing this for my Client it's very easy with Firebase.

In Firebase Settings Tab

  • Click on Add App

Adding App option in Firebase Setting

you Can connect all the Service and access Database from any platform you just need link Them in Firebase.

  • Firebase Provide Option to Add All Three Platforms

Firebase Provide Option to Add All Three Platforms

    1. Connect Android App

Connect you Android App

    1. Connect IOS App

Connecting IOS App

    1. Connect Web Version

Connecting Web Version

Solution 3

You have to take care of few things:

  1. Your UI must be responsive in nature, for that use MediaQuery
  2. Render your UI based on the Platform.
  3. Always check the packages you are using must support flutter web too, because there are a lot of plugins that don't supports flutter web yet.
Share:
632
Nischay Namdev
Author by

Nischay Namdev

I love data and I think data is defining the next industrial revolution. I started my data science journey back in 2018. My first course on data science was Andrew Ng’s machine learning course on Coursera. It gave me insights into how data is changing our contemporary world. I was determined that I need to pursue the field of Data Science. I delved deep into the field. I learned Octave and MatLab in the beginning but as I gained more knowledge I started learning python. Python unlocked a plethora of opportunities. It gave me the environment to experiment with newly acquired data science knowledge. Libraries like Sci-kit Learn, MatplotLib, Jupyter lab (environment), Pandas, NumPy etc. made the data science operations easier than ever. I started gaining interest in Natural Language Processing (NLP). I explored courses and books related to NLP and observed that there were many real-world problems which NLP can solve efficiently. The world is full of unstructured data ready to be extracted for knowledge. I started working on a classifying problem. As most of us know that the Indian Judicial system is exhausted and cases took years to came into a final decision. I decided to create a system which will predict the articles/ sections violated, of a particular act/law, based on case facts. This system can act along with side judges to give better and faster decisions.

Updated on December 22, 2022

Comments

  • Nischay Namdev
    Nischay Namdev over 1 year

    I'm new to dart and flutter.

    And I want to know how to create a website, iOS app and Android app with same backend/business logic using flutter.

    Little guidance will be appreciable.

    Thanks!

  • Nischay Namdev
    Nischay Namdev almost 4 years
    so instead of opting for flutter web how about I make api in other framework like flask or rails and them use that api in flutter to make apps ?
  • Aditya Joshi
    Aditya Joshi almost 4 years
    See both the things are different, flutter is used as a client application, while you can create backend in any framework of your choice.
  • Nischay Namdev
    Nischay Namdev almost 4 years
    For a cross platfrom app, i would have to write different apps? like different app for ios and diff. for android?
  • Nischay Namdev
    Nischay Namdev almost 4 years
    So firebase as a single backend can handle all three : web,ios and android? Also, I have to write three different apps , right?
  • Nischay Namdev
    Nischay Namdev almost 4 years
    so for example I have to write three different apps in flutter ios, web and android and then connect to a back end .. right?
  • rsDhirendra
    rsDhirendra almost 4 years
    With Flutter you have to write only once, and Optimize for Each Platform.
  • Nischay Namdev
    Nischay Namdev almost 4 years
    I have machine learning code which is in python, so I was thinking of making flask API connected to my backend which I want to create in rails, And then the ios and android apps in flutter while backend as rails. how does it sound to you?
  • rsDhirendra
    rsDhirendra almost 4 years
    @nnd Well I don't much idea about that :D, but firebase as backend works fine :D
  • jurgenizer
    jurgenizer almost 4 years
    Hi ndd, you would only write one Flutter app, but you would deploy 3 versions: Android, iOS and web. What I meant by the steps 1, 2, 3, 4 above is that that is a learning path to understanding how to build cross-platform Flutter apps. I will edit my answer for clarity.
  • Aditya Joshi
    Aditya Joshi almost 4 years
    since you are using flutter you can use single codebase with few configurations you can create ios, web, and android and since they are generated from single code base they will be having the same backend
  • Aditya Joshi
    Aditya Joshi almost 4 years
    @nnd you are correct you can use your flask API with flutter.
  • Aditya Joshi
    Aditya Joshi almost 4 years
    I won't recommend firebase to anyone for production application.