How to run Flutter Official Samples in Visual Studio Code - flutter

I am new to Flutter, and want to run the Flutter Official Samples in Visual Studio Code, but didn't prevail. For example, I managed to copy paste the banner codes into VS code, but it shows error in the second import statement:
import 'package:flutter/material.dart';
import 'package:gallery/l10n/gallery_localizations.dart';
I even tried to copy-paste the whole gallery directory from the GitHub samples to the .pub-cache, but still cannot compile the codes properly.
Does anyone know how to solve my problem?
Really appreciate.
Best Regards,
Brad

I posted the question on github flutter as a feedback, and a gentleman called VladyslavBondarenko gave me a hint, and finally I figured out how to run the samples: just download the whole official samples from https://github.com/flutter/samples/blob/master/INDEX.md, and then open some of the folders in VS code, and you will be able to compile and run the samples.
However, the compiler complains that there are lots of deprecated APIs used in the codes, which means some of the codes are not updated to the latest version.

Related

Is there a way to compare usage of VS Code extensions similar to npmtrends.com?

Often when researching an npm package, I view it on npmtrends. This gives me a decent idea as to how widely-used the package is. More importantly, it also lists other similar packages and shows a chart comparing their use. Here's an example comparing Angular/React/Vue.
I'm wondering if a similar tool exists for Visual Studio Code extensions. The Marketplace give download count but doesn't show similar extensions. Is there another tool/site that offers this?
Thanks in advance.

Is there any way to see the dataset and its content in Visual studio code?

In Visual studio we have option to see the dataset using Dataset Visualizer as below image.
But in VS code, do we have anything like this? Any plug-in I can install to get this in VS code?
Currently in VS code I am getting as like this below image. Please help.
Although C# support is not great yet, but the Debug Visualizer extension for VS Code might be exactly thing you are looking for.
There is no proper table visualizer yet and you would need to return JSON in your C# code, but feel free to contribute or to get in contact and share ideas!

Visual Studio Code adding 'prefix0' in Flutter

I have recently switch from Android Studio to VS Code to work on my Flutter projects but I have an issue with it.
VS Code keeps adding "prefix0." before all classes as soon as I am using auto-completion and I didn't find a way to get rid of it.
I have seen that some VS extensions for CSS can auto-prefix some parts of code but I do not have any CSS extensions.
Thanks
It's a bug in Dart Code that happened because it failed to understand another import already exported the class used.
A typical example is, flutter/material.dart was already imported. But by typing Widget, it'd import flutter/widget.dart and with a prefix.
https://github.com/Dart-Code/Dart-Code/issues/1847
This has been fixed. Upgrading your Dart Code and flutter SDK should fix the issue.
The issue is caused by there being one or more duplicates of class names. Check that you do not have classes with the same name imported that may conflict with each other.

The facebook lib react-native-fbsdk doesn't work

I tried to change the version of react, but I did not succeed. I already followed several tutorials but I have not been able to solve them yet. Can anybody help me ?
The only files I modified were MainApplication.java and MainActivity.java
Please update your question by pasting a formatted error instead of screenshots. Regarding your errors, they seem related to Android X.
Make sure you followed all the steps to migrate to 0.60.0. You can't just change the versions of a lib. You need to read the changelogs and adapt your whole source code.
You can find everything you need to change using the upgrade-helper.
See
android.useAndroidX=true
android.enableJetifier=true
and the usage of jetify.

Is it possible to navigate to assemblies definitions inside Visual Studio Code

I'm using VS Code several days as MonoDevelop replacement in Unity3D on Mac OS. I installed mono via homebrew as suggested to let VS Code to parse system assemblies. Everything works almost great, but I can't navigate definitions that are not part of my code. For example I can't go to definition of System.String or UnityEngine.Vector3 to see methods signatures. MonoDevelop has Assembly browser but I miss it in VS Code. Does anybody know if VS Code has such feature? Maybe I need to setup something for that?
PS: I've posted feature request. If you're interested in this feature vote for it, please.
https://visualstudio.uservoice.com/forums/293070-visual-studio-code/suggestions/14698887-implement-net-assembly-browser
It seems VS Code now can do that with the new extension ms-vscode for C# support. Previously it was recommended to use Legacy C# Support for Unity3D. I don't know exactly if this recommendation is still valid, but I tried to uninstall legacy and to install normal one. After some background work OmniSharp parsed my files and now it can open classes from assemblies! Look at this picture, it has open AnimationCurve class as [metadata]!
I'm trying it with Unity3D 5.5.0b2 beta now, so I'm not sure if this will work with production release of Unity3D. By the way I also removed VSCode plugin from dotBunny out of project as Unity3D 5.5 supports Visual Studio Code self.