GoodMan
GoodMan

Reputation: 650

What is the difference between a Flutter Mobile or Web app?

Are there any specific configuration in Flutter platform that should be changed for Mobile or Web apps before deployment? Or it's just about defining different size screens and make it more responsive in our flutter code, not more?

I like to know what is the difference to write a mobile Flutter code or web Flutter code?

Upvotes: -1

Views: 1595

Answers (1)

david dagan
david dagan

Reputation: 161

First of all, Flutter supports web but only from version 2.x.x. you don't need any specific configuration but you do need to customize it to PC and phone sizes. for this, you can build a class and check in runtime if the platform is mobile or web like this:

import 'package:flutter/foundation.dart' show kIsWeb;

if (kIsWeb) {
  // running on the web!
} else {
  // NOT running on the web! You can check for additional platforms here.
}

If you are considering building a web app, consider the time it will take for the site to load because flutter draws on canvas and it weighs 2MB. Or it is possible to run on an HTML engine but it sucks for now

Upvotes: 2

Related Questions