All Questions
Tagged with dart visual-studio-code
921 questions
-1
votes
2
answers
40
views
My app in Dart is not able to select languages properly
I hope you can help me. I am developing an app in Dart with Flutter from Visual Studio.
I've added some languages and in one language I'm getting the following error, the rest works correctly. I have ...
1
vote
1
answer
73
views
VSCode Flutter disable auto remove trailing comma at format
I've changed my PC and install VSCode with Flutter and I found out that formatter is auto remove trailing comma and line break if that line is not over the rulers.
like:
Something( ...
-1
votes
1
answer
78
views
Why does vscode give me the following error even though I installed everything without any problems?
FAILURE: Build failed with an exception.
Where:
Build file 'C:\Users\asali\OneDrive\Masa�st�\flutter_application_1\flutter_application_1\flutter_application_2\android\app\build.gradle' line: 2
What ...
0
votes
1
answer
103
views
"Initializing the Flutter SDK. This may take a few minutes."on vs code
Whenever I am opening any project on VS Code. I am getting this message: "Initializing the Flutter SDK. This may take a few minutes." It's been 40 minutes but still I am getting the same ...
-1
votes
1
answer
74
views
quick fix in flutter not working for imports lines
when i press ctrl+. to show quick fix menu, it shows all widgets that i can wrap with my widget but not shows imports lines and to make import lines must write widget by me to call import line like ...
2
votes
3
answers
531
views
VS Code removes trailing commas when saving dart files for new projects
I created a new project and VS Code condenses any trailing commas unless line lengths are very long. This is a new behaviour. Have looked all over the internet, reinstalled, deleted cache files etc. ...
0
votes
1
answer
114
views
"Unsupported class file major version 65" After Android Studio Upgrade
I am trying to run my Flutter app on the Android emulator, but the Gradle build fails with the following error:
Launching lib/main.dart on sdk gphone64 x86 64 in debug mode...
FAILURE: Build failed ...
1
vote
3
answers
54
views
fix Flutter drawer items
I'm trying to have a footer Widget align to the bottom of the Drawer but still not working Drawer Header and a list at the top of the Drawer. Here's what I'm trying:
//drawer class
class ...
1
vote
1
answer
95
views
Version solving failed with running Dart commands using asdf in VSCode
I am needing to have multiple versions of Flutter installed so I switched from a regular installation of Flutter/Dart to having two versions of each with asdf. I am able to run Flutter commands ...
1
vote
0
answers
80
views
Warning: SDK processing. This version only understands SDK XML versions up to 3 but an SDK XML file of version 4 was encountered [duplicate]
When using flutter emulator, I get
Warning: SDK processing. This version only understands SDK XML versions up to 3 but an SDK XML file of version 4 was encountered. This can happen if you use ...
0
votes
2
answers
119
views
Flutter Development with VS Code Takes Too Long to Show Code Suggestions and Validate Code Changes
I know copying and pasting the code is commonly used, but sometimes writing from scratch offers more granular control over the program you're trying to develop.
The problem is when writing a built-in ...
1
vote
0
answers
31
views
VS Code autocomplete suggest indirect imports Flutter/Dart
vscode autocomplete suggests not only the source of the file, but all files where this import is used.
I have a GoalStatus type and use it in several files. When creating a new view, vscode confused ...
1
vote
1
answer
57
views
How to Make VSCode Autocomplete Future<void> onLoad() Instead of FutureOr<void> onLoad()
Related: What exactly is FutureOr<void> onLoad?
When I try to write onLoad in VSCode, it autocompletes as FutureOr<void> onLoad().
However, I want it to autocomplete as Future<void> ...
-2
votes
1
answer
69
views
What exactly is FutureOr<void> onLoad?
Related: How to Make VSCode Autocomplete Future<void> onLoad() Instead of FutureOr<void> onLoad()
When writing onLoad in VSCode, it auto-completes as FutureOr<void> onLoad().
However,...
1
vote
0
answers
82
views
Debuging Failed Flutter/Dart application
Good day all,
I'm pretty new to Android development. I'm trying to launch a Flutter app in debugging mode, but I'm getting lots of errors.
Background: I had a developer working on the app for me while ...
1
vote
0
answers
17
views
my polyline is not working need assistant in checking what exactly is wrong
i am working on a Flutter map-based application that handles user requests by allowing them to set pickup, destination, and optionally drop-off markers on the map. The app then draws a polyline route ...
1
vote
1
answer
37
views
Vscode shows explorer files red after running build runner
I'm using the build runner package in my Flutter project. But whenever I ran the following command
dart run build_runner build
Some of the bloc state files turn red in the vscode file explorer. I ...
1
vote
0
answers
21
views
VSCode Flutter auto-formatting else on the same line as closing bracket?
I am new to flutter and have recently installed VSCode + the official Flutter plugin and I want to turn off the part of the auto-formatter that reformats else clauses to be on the same line as the ...
1
vote
0
answers
50
views
VS Code doesn't pass arguments in Flutter?
Regarding to
I have created a configuration in launch.json
{
"name": "my_upp (debug mode command-line)",
"cwd": "my_upp",
...
1
vote
1
answer
187
views
vsCode Dart Analysis Server client: couldn't create connection to server
Below is the error message:
I am receiving a warning that VS Code can't connect to the Dart Analysis Server, and the results are as shown in the image below.
Trying:
I tried uninstalling and ...
0
votes
1
answer
46
views
Flutter android application will not connect to external url api. Connects to local internal ip api only- ios works
I am using vscode on a mac and have a Flutter app that needs to connect to a url api eg: www.test.com
When testing using an internal ip eg: 10.0.0.3:80/api/Values/ the app connects fine and posts and ...
0
votes
0
answers
103
views
Could not determine the dependencies of task ':flutter_plugin_android_lifecycle ' in Flutter Project
After upgrading my Android Studio to the latest version (Ladybug), I encountered the following error:
To resolve this, I updated my Gradle version and Android Gradle Plugin (AGP) version. However, ...
-1
votes
1
answer
39
views
VS Code only recognizes file when open
VS Code Screenshot
I am having issues getting VS Code to recognize my files. When home_page.dart and habit_box.dart is opened I am getting no errors or warning but as soon as I close habit_box.dart ...
0
votes
1
answer
43
views
Vs code auto pause running when calling any API [closed]
Every time any Flutter app is running in the Android Emulator (it doesn't happen in a real device) and it's calling any API of any type (get, post, put, etc), even when it has to load an Image.network ...
2
votes
2
answers
191
views
Flutter + VsCode: --dart-define is not (always) applied
Create a new demo 'counter' app (Flutter Demo Home Page), and change MyApp to this:
// ...
// This widget is the root of your application.
@override
Widget build(BuildContext context) {
...
0
votes
1
answer
59
views
Error installing git in vs code Dart & Flutter
I get this error on startup VS Code when i download Git:
The Flutter Daemon failed to start.
Before installing git, the whole project was working. I could choose the emulator I wanted to run the ...
-1
votes
1
answer
101
views
Invalid dart suggestions
I have got extensions on List
extension CustomListExtensions<TType> on List<TType> {
List<TOther> transform<TOther>(TOther Function(TType) fn) {
....
}
}
I have used ...
0
votes
0
answers
35
views
Don't have the option to start emulator from VS Code
While setting up the emulator with Android Studio Koala, I noticed that from VS Code I don't have the option to fire up the emulator so that it immediately turns on from VS Code. It doesn't show me ...
0
votes
0
answers
44
views
When I used Flutter for the first time in a while, I encountered an error in 'analysis_options.yaml' and was unable to resolve it
In the analysis_options.yaml file, the part
include: package:very_good_analysis/analysis_options.yaml
causes the following error:
Mapping values are not allowed here. Did you miss a colon earlier?...
0
votes
3
answers
248
views
Can't Install Flutter on Windows
I'm trying to install Flutter using VS code and it shows this error:
What happened:
Firstly, I had Flutter installed and worked fine. All projects build fine, and everything is going well. I tried to ...
0
votes
0
answers
38
views
Flutter with VS code: How can you get a stacktrace that includes the originating problem line in your own code?
I am using VS code for Flutter programming, and I have noted that I do not always get a useful stack trace when there is an exception.
Below is a description of how you can make the reproducable error ...
0
votes
1
answer
31
views
undetectable Dart-Input in Visual Code Studio
I made a script in in Visual Studio Code using Dart that grabs the user's input.
The problem is, that if I enter something in the input line in vscode, which is located below the debug console and ...
1
vote
1
answer
68
views
Wrap autocompleted arguments on a new line in Flutter in VS Code
Is there a way, in VS Code, to make the autocompleted widget arguments go on a new line?
Bad:
Column(children: [])
Good:
Column(
children: []
)
I guess it has something to do with the dart_style'...
-1
votes
1
answer
79
views
Program 'flutter.bat' failed to run
Iam trying to run any command of flutter in terminal of vscode it gives me this error and when i try to run in cmd then command prompt automatically closed.I have tried many things upto now.
I tried ...
1
vote
0
answers
67
views
"Connecting to VM Service at ws://127.0.0.1:50268/yZ6Ui9WuIGw=/ws "error
I am trying to run my flutter application on android virtual device using vs code but when I run the code it shows following error
I/xample.chalbha(11197): Waiting for a blocking GC ProfileSaver
and ...
-1
votes
1
answer
47
views
vs code issue flutter project
vs code issue not detect any error not wrap any widget not show widget suggestion when click ctrl + . in flutter project , please help me how fo fix
i try many thing but not fix please any one help ...
0
votes
0
answers
63
views
Visual Studio Code Not Recognizing Flutter Project: No Syntax Highlighting, No Run and Debug Buttons
Image I'm experiencing issues with my Flutter project in Visual Studio Code. The code editor is not providing syntax highlighting, and all the code appears in plain white. Additionally, the typical ...
0
votes
1
answer
236
views
Invalid context for 'super' invocation
I have a separate widget which I call dashboard, then when I want to do initstate an error like this appears.
Invalid context for 'super' invocation.
this is an example of some of my code
@override
...
2
votes
0
answers
281
views
Why do I get an error associated with native assets in flutter?
I am getting the following error when I run the flutter app or flutter pub get:
Macmohan-MacBook-Air facilify % flutter pub get
Building flutter tool...
Resolving dependencies... (6.7s)
Downloading ...
1
vote
1
answer
70
views
Awesome_Snackbar_Content Swipe to dismis
How to swipe Awesome_Snackbar_Content to dismis
enter image description here
final snackBar = SnackBar(
/// need to set following properties for best effect of ...
0
votes
1
answer
299
views
Why is my dart data class generator extension not working?
I have installed Dart data class generator for flutter. It was working fine when I first installed it - While I click on a class and and click on right click button, I used to get various options of ...
-1
votes
1
answer
136
views
How to adjust the formatter in VSCode to avoid unnecessary line breaks? [duplicate]
I think 'Visual Studio Code' is applying too strict formatting rules that sometimes lines are moved even if there is enough space on the right side.
For starters, if you look at 'ProfileImage', you ...
0
votes
0
answers
20
views
Flutter project opens the emulator, but it doesn't load the application; instead, it opens a new device
I created a project with Flutter, but when I 'run,' it opens the device without loading the app. I've tried with other devices, but it never opens the application. I don't understand what's causing ...
0
votes
1
answer
158
views
could not find package final_project at https://pub.dev
enter image description here
enter image description here
name: opticalcircuit
description: "A new Flutter project."
# The following line prevents the package from being accidentally published to
#...
0
votes
1
answer
178
views
Can't "Select Flutter: New Project" on visual studio code using ubuntu "No matching results" message appears
following the link
https://code.visualstudio.com/docs/setup/linux
I installed visual studio code on ubuntu 22.04.4 LTS
then i Install Flutter following
https://docs.flutter.dev/get-started/install/...
-2
votes
1
answer
296
views
Vs code is not showing the suggestion and errors are not showing in flutter
I was working perfectly fine yesterday without any issues. However, when I started working today, I noticed that the errors that usually appear when the import of a class or object is not written ...
0
votes
0
answers
29
views
LinkageError occurred while loading main class com.android.sdklib.tool.sdkmanager.SdkManagerCli in Flutter
I recently updated my MacOS to Sonoma 14.4.1. I am using Flutter in Visual Studio Code. However, after updating I started getting errors when I ran the "flutter doctor" command in the ...
0
votes
1
answer
40
views
Why is my Visual Studio Code terminal not working
I can't write anything on the terminal of VS Code v1.88.0. This problem is from the v1.87.2 Windows 11
I am using Dart/Flutter.
I try to do everything as reinstall all SDKs and VS Code and nothing ...
0
votes
2
answers
431
views
Generating apk by command "flutter build apk" in vs code
I want to generate apk in vs code by command flutter build apk, So :
I install Android Studio and Android SDK in path C:\Android_SDK.
I execute command flutter config --android-sdk "c:\...
-1
votes
1
answer
330
views
The Flutter Daemon failed to start
I was working in VS Code and accidentally rolled back the Flutter repository, which has caused Flutter to become unusable in my development environment. Now, when I try to use Flutter commands or run ...