Is there a way to import and run a Flutter app as a dependency of another package? - flutter

So, I'm thinking of creating a CLI application that could also be used with UI, developed in Flutter.
The idea is that there would be 3 different packages, one for the business logic, one for the CLI and one for the Flutter app. Is there a way to import the Flutter app as a dependency in my CLI package, so I could open the Flutter app from the CLI? If so, how would I do it?

Seems like you want to use 1 library containing the business logic for 2 different applications: Desktop CLI app and mobile app (android/iOS).
It's very much possible with flutter. By default flutter installs only the android and iOS platform supports but by changing few configurations in installed flutter SDK we can extend the same setup to Web and Desktop apps (Windows, MacOS or linux) as well.
Check this official doc for enabling desktop support
Check this official doc for enabling Web support
You can enable these settings in your existing application only.

Related

Is there any possibility in flutter integration_test to pre install the application and use this version for the test?

I need the flutter test engine to use a regular installed running app. In this app a deep linked url should be opened, which checks if the app is already installed.
Is there any known way to run the integration test of the testWigets on this app?

New Flutter Project on Android Studio

Can you guys tell me what all these different projects means?
New Flutter Project
Because I can't find the documentation anywhere
So if you can find the reference it will help me
Flutter Application: A fully-functional standalone Flutter application.
Flutter Plugin: A plugin is a kind of bridge that you develop between a native feature like camera API in Android and iOS.
Flutter Package: A package is a flutter application written solely using Dart. It doesn't have much to do with the Native functionalities.
Flutter Module: A module is a set of functionalities that you want to use in your app. It is a custom code that does a specific task but can be used for other apps in the future. So, you keep it handy. In other words, this module can be integrated in other apps too.

flutter web app without html, css and javascript

I want to know that if it is possible to make flutter app for web without using HTML, css or javascript and only using flutter and dart
Yes, it is absolutely possible to create a web app using flutter and dart.
To add web support in the existing flutter project you can run the command flutter create . and to release it run the command flutter build web
For testing your app in chrome you can use command flutter run -d chrome
You can disable android support using command flutter config --no-enable-android and disable ios support using command flutter config --no-enable-ios
Yeah, it is not need to build web app with HTML,CSS & JS, your flutter code alone will work.
Note: try flutter upgrade bcs v-2.0.0 stable release for web got released
Yes, you can use Dart/Flutter exclusively to build web apps. You don't need to write any HTML/CSS/Javascript.
You can setup your project from the terminal (like previous comments suggests), or you can use an IDE such Android Studio, or you can use Visual Studio.
If you use Android Studio, you can create a new Flutter Project, and select the 'web' platform only, and de-select Android and IOS.
I am currently using Dart/Flutter to build web apps only. Android Studio builds the HTML/CSS/Javascript for you. Then you just have to publish it into a web server (online or local).
Yes you can use Flutter for web apps but though it is in early stage of development about how the web app will be stable or not

Create a flutter project without a web dependence

I want to create a new project in flutter using VS, but I want this project without the web dependence just a mobile app dependence but each time I create a project it gives me the dependence of the web, not a mobile app
For Example, this what I get:
This what I want
You can generate a flutter app for only mobile platforms with flutter create tool by specifying platforms.
flutter create <app_name> --platforms=android,ios
In the same way you enabled flutter web support, disable it.
flutter config --no-enable-web
This removes web support so that future created projects will not generate a web folder. You may need to restart any open editors for the changes to take place.

Flutter Without Emulator

I cannot install the Android Emulator in my working environment, therefore I wondered whether it is possible to code/learn Flutter without any mobile device (or emulator). For example, is it possible to run/test the code by using the browser?
There are two non-mobile options, both of which are currently in development stages but could be used for learning Flutter:
flutter-desktop-embedding, particularly the example which you can check out and flutter run with minimal setup, and then modify.
The Flutter for web technical preview.
Flutter Desktop Launcher for Mac OS/Linux, support hot reload via VS Code
GitHub Link: https://github.com/putraxor/flutter_desktop_launcher