Modather
Modather

Reputation: 1

visual studio code keeps display an error after updating flutter to v 2.10.3

after upgrading my old flutter with latest version of flutter 2.10.3 vs code keeps display the errors down below :

/C:/flutter2/packages/flutter/lib/src/material/animated_icons.dart:9:8:

Error: Not found: 'dart:ui' import 'dart:ui' as ui show Paint, Path, Canvas; ^ /C:/flutter2/packages/flutter/lib/src/material/animated_icons.dart:10:8: Error: Not found: 'dart:ui' import 'dart:ui' show lerpDouble; ^ /C:/flutter2/packages/flutter/lib/src/material/app.dart:5:8: Error: Not found: 'dart:ui' import 'dart:ui' as ui; ^ /C:/flutter2/packages/flutter/lib/src/material/app_bar_theme.dart:5:8: Error: Not found: 'dart:ui' import 'dart:ui' show lerpDouble; ^ /C:/flutter2/packages/flutter/lib/src/material/arc.dart:6:8: Error: Not found: 'dart:ui' import 'dart:ui' show lerpDouble; ^ /C:/flutter2/packages/flutter/lib/src/material/banner_theme.dart:5:8: Error: Not found: 'dart:ui' import 'dart:ui' show lerpDouble; ^ /C:/flutter2/packages/flutter/lib/src/material/bottom_app_bar_theme.dart:5:8: Error: Not found: 'dart:ui' import 'dart:ui' show lerpDouble; ^ /C:/flutter2/packages/flutter/lib/src/material/bottom_navigation_bar_theme.dart:5:8: Error: Not found: 'dart:ui' import 'dart:ui' show lerpDouble; ^ /C:/flutter2/packages/flutter/lib/src/material/bottom_sheet.dart:5:8: Error: Not found: 'dart:ui' import 'dart:ui' show lerpDouble; ^ /C:/flutter2/packages/flutter/lib/src/material/bottom_sheet_theme.dart:5:8: Error: Not found: 'dart:ui' import 'dart:ui' show lerpDouble;

[Done] exited with code=254 in 102.936 seconds

here is result of flutter doctor command

Doctor summary (to see all details, run flutter doctor -v): [√] Flutter (Channel stable, 2.10.3, on Microsoft Windows [Version 10.0.19042.1526], locale en-US) [√] Android toolchain - develop for Android devices (Android SDK version 31.0.0) [√] Chrome - develop for the web [!] Visual Studio - develop for Windows (Visual Studio Build Tools 2019 16.11.10) X The current Visual Studio installation is incomplete. Please reinstall Visual Studio. [√] Android Studio (version 2021.1) [√] IntelliJ IDEA Community Edition (version 2021.2) [√] VS Code (version 1.65.2) [√] Connected device (4 available) [√] HTTP Host Availability

! Doctor found issues in 1 category.

NOTE : even Android studio displays such error , both of Android studio and VS code don't connect to the emulator properly (Pixel XL API 30)

Upvotes: 0

Views: 1110

Answers (2)

Aimal Khan
Aimal Khan

Reputation: 1

I was also facing the same problem in vs code. instead of clicking "run the project" in vs code i clicked "start debugging" and it woreked for me.

Upvotes: 0

Mohammed Qaid
Mohammed Qaid

Reputation: 21

I was getting the same error when I try to run it from the run button at the top right corner 1

But I notice there are three options above the main method there are three options I selected Debug and it successfully worked!

2

Upvotes: 2

Related Questions