Building a Flutter application for mobile and desktop - flutter

Recently I've found out about Flutter being able to support desktop applications as well. I'm just curious how far this technology is and if any of you had success porting your mobile apps to the desktop. If so, what was the experience like? Are desktop-specific features like windows, mouse interaction, desktop notifications, etc. supported?

It was demonstrated at the Flutter Live event in December, but nothing official has been released that I'm aware of.

Flutter for Desktop was launched as alpha build at flutter interact 2019.
The official documentation is available at https://flutter.dev/desktop
The following video describes how to run your flutter app on a MacOS
You can watch the following video is you don't wanna read the docs
https://www.youtube.com/watch?v=9tEdoVuC1uQ&t=23s
(Skip to 0:48 seconds, as slight noise occurs for few seconds)
A simple app is created using android studio and we can easily see the options available to port the code to all platforms. For example, if you create a default app using android studio, the mouse event will help you to tap on a button and increase the count.
Regarding the experience, it feels good to write a single code and port/deploy on any platform. Using VSCode or android studio, both are helpful.

Related

can i create android and ios applications with flutter without android emulator , with just flutter sdk and vscode and browser

I learned dart and I want to access flutter, but I was surprised by android studio because my computer is weak.so,can i create android and apple applications with flutter without android emulator , with just flutter pack and vs code and browser
If you only work with simple UI widgets yes you can use the embedded development tools within the browser to get the dimensions of the device you working on like so
But, most of the cases there are libraries work differently according to the platform so it might work with the web but not with android or iphone and you can not test it without the actual device.
And yes VS code is a very good with flutter and might be better than android studio but it won`t make the difference you expected, in my opinion what make it faster is to use an actual device for testing and not using the emulator, also don't use a lot of application along side with the IDE, like if you are using spotify, listening to youtube video or following a tutorial just use your phone because browsers as bad as emulator.
You can use a text editor and the command line tools to build flutter apps and test them on a real device.
I wouldn't recommend it though.
You could give VSCode a try as it is a more lightweight environment.
Your computer should handle testing on a real device, which requires only a USB cable. Accessing the application in the browser would probably eat a lot more memory. You can read about how to use the real device with flutter here.

Does Flutter 3 support Webview on Desktop?

Flutter 3 was released recently with Desktop platform support for Windows, Linux and macOS.
Can Flutter developers clarify if Flutter 3 also supports Webview on Windows, Linux and macOS? Flutter documentation seems to suggest Webview support exists only for Android and ios.
Would appreciate some insights as I have a project that requires Webview, and if Flutter 3 supports it on all platforms it would make my work a lot easier. (I am asking here before trying out Flutter myself as I am completely unfamiliar with Flutter, and need to know about Webview status before I invest my time to learn Flutter).
(Note: Please do not go on a tangent and focus on "why webview" or whether it is apt etc. as I have no choice in the matter - it's one of the stated requirement of the project and I cannot change it).
No Flutter 3 Does not support Webview on Desktop, however you can use a package -
https://pub.dev/packages/desktop_webview_window

Flutter Basics (write once, run anywhere?)

Hi stack overflow community,
I'm a novice programmer in high school and have never written an app for mobile devices before so please bear with me. If I was to write an app using Flutter, will I only be required to write the code once and then be able to distribute different versions of it (iOS, macOS, Windows, Linux, Android, etc)? Or will I need to make small changes for each version such as using XCode to create the iOS version and Android Studio for the Android version? I know this is such a basic question but I've spent a couple of hours looking this stuff up and I'm still confused. Any help would be nice.
Thanks,
Daniel
In a product development environment, after writing the cross-platform code with Flutter, there are some need-to-do tasks related to Native environment.
In the case of Android, there are several cases when you'll need to touch the Native level such as config Firestore settings, Social authentication (Login with Facebook for example), changing the launch icons/ splash screen of the app or publishing to app store, etc
For iOS, the same case apply as well. So I suggest you start with small steps to develop the app first, then when running into something that seems impossible with just Flutter code, there are tutorials and SO to guide you through. It might seem overwhelmed at first, but we are all on a journey, so no need to rush it ;)
You should make small changes too. For eg when adding launcher icons and splash screen you have to edit the respective native folders. When distributing for ios you need to manually customize its Runner from xcode. There are many library that support either android only or ios only. In that case if you need that feature you have to make changes in native code like java ans swift.
if you're creating your own native plugins, you will have unique code to write. But if you're just using things out of pub, almost nothing will require change (unless you are publishing to the store).

Making Apps using flutter

Is it possible to build a fully functioning application for iOS and Android using AndroidStudio + Flutter and FireBase alone? This is my first time trying to make a fully functioning mobile application which I want to use as I am constrained with my finances at the moment. I would appreciate the clarification.
Yes, it is possible to make both Android and IOS app using flutter and dart.
Flutter has many benefits. here some example :
Flutter hot reload helps you to build your app very fast.
User fluent. Can use app with excellent user interface design.
It's easy to use function like other OOP languages.
Update everyday with new features.
Flutter user community is increasing day by day .
Check the flutter docs for more info
Yes, Flutter can produce a fully functioning application for both iOS and Android platforms.
there are some apps built with Flutter. check them here
I am a native Android developer and I did some iOS as well. I started learning Flutter a couple of days ago and it seems promising.

Making Chrome web app standalone desktop program

Google announced that they drop support for web apps in Chrome.
Basically, web app is a local HTML/CSS/JS app that runs in a separated custom "standalone" Chrome window.
Is there any way (preferably easy), to convert this web app to a real desktop app that not depend on Chrome in anyway? Using maybe NodeJS? If yes what is the right way to do it?
Thanks.
You could try one of these tools:
https://applicationize.me/
https://www.bzgapps.com/coherence
https://fluidapp.com/ (for Mac only)
Don't know about "easy", but it seems to me that the natural evolution is to Electron or NW.js, and both of these are mentioned in the Google blog article on this subject. (I'm moving to Electron.) Both have advantages over Chrome Apps, mostly that they are true desktop applications. To cite one example, you can now manipulate the menu bar, something out-of-bounds for Chrome Apps.
Pure JavaScript code in your Chrome App, such as anything to access the internet, should move over directly. Same for much UI stuff, as you're still using a browser window for the UI. The app will, however, have to be restructured.
Added Note: Chrome Apps ran on 4 platforms: MacOS, Windows, Linux, ChromeOS. Electron and NW.js apps won't run on ChromeOS. So, the ability to write a four-platform completely binary-portable app is going away.