-
Notifications
You must be signed in to change notification settings - Fork 340
Closed
Labels
Description
I pasted the demo code from google, it was ok. And several times later, the following appeared:
the code has nothing wrong. I put it in Android Studio and the right info appeared in the phone. I reinstalled vs code, started a new project. But the problem is still there. Anyone can help?
The following is the demo code from google flutter website:
import 'package:flutter/material.dart';
void main() => runApp(new MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return new MaterialApp(
title: 'Welcome to Flutter',
home: new Scaffold(
appBar: new AppBar(
title: new Text('Welcome to Flutter'),
),
body: new Center(
child: new Text("what's wrong?"),
),
),
);
}
}
The following is the wrong info:
PS D:\app\flutter_app\aaa\sss> dart "d:\app\flutter_app\aaa\sss\lib\main.dart"
file:///d:/app/flutter_app/aaa/sss/lib/main.dart:1: Warning: Interpreting this as package URI, 'package:sss/main.dart'.
file:///C:/flutter/packages/flutter/lib/src/material/animated_icons.dart:9:8: Error: Not found: 'dart:ui'
import 'dart:ui' as ui show Paint, Path, Canvas;
^
file:///C:/flutter/packages/flutter/lib/src/material/animated_icons.dart:10:8: Error: Not found: 'dart:ui'
import 'dart:ui' show lerpDouble;
^
file:///C:/flutter/packages/flutter/lib/src/material/app.dart:5:8: Error: Not found: 'dart:ui'
import 'dart:ui' as ui;
^
file:///C:/flutter/packages/flutter/lib/src/material/app_bar_theme.dart:5:8: Error: Not found: 'dart:ui'
import 'dart:ui' show lerpDouble;
^
file:///C:/flutter/packages/flutter/lib/src/material/arc.dart:6:8: Error: Not found: 'dart:ui'
import 'dart:ui' show lerpDouble;
^
file:///C:/flutter/packages/flutter/lib/src/material/bottom_app_bar_theme.dart:5:8: Error: Not found: 'dart:ui'
import 'dart:ui' show lerpDouble;
^
file:///C:/flutter/packages/flutter/lib/src/material/card_theme.dart:5:8: Error: Not found: 'dart:ui'
import 'dart:ui' show lerpDouble;
^
file:///C:/flutter/packages/flutter/lib/src/material/chip_theme.dart:5:8: Error: Not found: 'dart:ui'
import 'dart:ui' show lerpDouble;
^
file:///C:/flutter/packages/flutter/lib/src/material/colors.dart:5:8: Error: Not found: 'dart:ui'
import 'dart:ui' show Color;
^
file:///C:/flutter/packages/flutter/lib/src/material/dialog_theme.dart:5:8: Error: Not found: 'dart:ui'import 'dart:ui' show lerpDouble;