Fuchsia - How to set up Dart pkgs on Flutter? - flutter

When I install Fuchsia for Flutter development on VS Code, I have to set up Dart pkgs. I don't have any idea about it. I'm lost. Exactly, implementing this https://fuchsia.googlesource.com/fuchsia/+/master/docs/development/languages/dart/mods.md
Any tutorials?

There is no need to install Fuchsia at all given that you are trying to build Flutter apps. While Fuchsia uses Flutter in some areas, the opposite is not true. There is no need for or reliance on Fuchsia if you would like to build flutter apps.
Open up Flutter.dev and click the blue "Get Started" button in the top right. Then follow the steps and you should be on your way.
Good luck.

Related

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

Android Studio: errors in Dart are not showing on the screen

I created a new project in Android Studio Bumble Bee. However when I enter some code that has errors in it the error is not showing up.
For example if I enter the following:
import './screens/authorization/auth_root_screen.dart';
When this directory or screen doesn't exist no error is shown.
Or even if I enter some code with a typo...
iiiiiiiiiiiiiiiiiiiiimport './screens/authorization/auth_root_screen.dart';
No error is shown in the IDE.
I guess I am missing a setting somewhere but I havent been able to find it. This always worked fine before I installed BumbleBee.
Any help would be gratefully received.
Thanks so much.
Hi thanks for looking at this. I have solved it myself. I'll post the solution here in case anyone has a similar question.
Do the following:
At the bottom of the Android Studio IDE is a tab called: Dart Analysis. Click on it to open the tab.
On the left hand side of the Dart Analysis screen that opens is a settings Icon. Click on this.
On the settings screen, make sure that "Scope Analysis to the Current Package" is ticked on.
Here is a screen print:
Have you installed the Flutter extension for your Android Studio? You can find it in the Extensions section of your IDE.
Come do these things
First, run this Flutter Doctor code in the terminal, be sure to check all the options
Specify the second SDK FLutter for Android Studio
Third, install the Dart and Flutter plugins

Do iOS and Android Flutter widgets also work on Flutter Web(PWA)

I'm interested in using Flutter primarily for my startup MVP on Web and possibly Android. I see the flutter community has made a lot of widgets but a lot of them are tagged iOS or Android. Since Futter is all about using one codebase is it wrong to assume that these widgets would work on web too? I imagine the setup would be different but similar with a Flutter web app as opposed to a Flutter Android app.
I couldn't find a whole lot about this on the Flutter site. I also know that web is still beta but by the time I'm done with the MVP it'll probably be at stable release or close enough.
Well... It depends. If the widget has some sort of native code the answer is no. In Flutter there are two type of packages: the "normal" package, and the plugin.
The packages are made only of dart code, so there are no bounds to native, and you can use everywhere dart (and Flutter) can run.
The plugins are packages with native code and you can use only on the platform supported by that plugin.
For example the package provider, it's a package, and you can use in every supported platform where dart (and Flutter) can run. But url_launcher, it's a plugin, so you can run only on Android, iOS, and web, but for example on desktop, it will no work.
If the package if you found it's only a widget, you should be able to use on the web.
TLDR: No,a PWA it's a web app, so it can't run Android or iOS specific code.

having trouble setting up flutter in vs code

I have trouble in setting flutter and running an app on a real device in vs code. I want to run my apps on physical device and I do not want to use emulators. Is it going to be possible?
Yes, this is very possible. In fact, many flutter developers use physical devices in order to test features like Maps,Camera, etc. I always recommend following a video tutorial to set up environments for development. But you should try the following:
First of all, I recommend the flutter docs https://flutter.dev/docs/development/tools/vs-code to set up vscode.
After this, all you need does not have anything to do with VSCode any longer. You should check https://flutter.dev/docs/get-started/install/windows to connect a physical device.
Im not sure if you have already setup flutter on your machine to start with. If you haven't use this link how to install flutter
the next part is easy just install dart and flutter extensions in vscode.
walla!

How to set resource-id/content-desc in flutter app for automation using Appium?

To automate flutter app using Appium, we need to set the resource-id (for Android) and accessibility-Id/content-desc (for iOS) of any element/control in the flutter app. To get resource-id and accessibility-Id in the Appium tree view of flutter app, what should be done? Please help with possible solutions to achieve this.
Please refer below screenshot of Appium tree view which shows the missing resource-id.
Flutter version = 1.17.5
Please take a note that we have already tried "key" property of Widget for unique identification but it didn't work.
You can check this thread about Flutter support for Appium.
You can use semanticLabel field, but it still feels like Flutter driver for Appium is far from stable state.