i followed this tutorial on youtube https://www.youtube.com/watch?v=LnpGU8vj7TI in order to set firebase with flutter,and after doing exactly as the guy did am having a lot of errors showing in my terminal when I try to run the main.dart file
import 'package:firebase_core/firebase_core.dart';
import 'package:flutter/material.dart';
import 'package:flutter/widgets.dart';
void main() async{
WidgetsFlutterBinding().ensureVisualUpdate();
await Firebase.initializeApp();
runApp(My_pp());
}
class My_pp extends StatefulWidget {
@override
State<StatefulWidget> createState() {
// TODO: implement createState
return My_ppstate();
}
}
class My_ppstate extends State<My_pp> {
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
appBar: AppBar(
title: Text('hello'),
backgroundColor: Color.fromARGB(50, 255, 255, 5),
),
),
);
}
}
and the errors are
lib/main.dart: Warning: Interpreting this as package URI, 'package:led_blink/main.dart'. /D:/flutter_windows_2.0.3-stable/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; ^ /D:/flutter_windows_2.0.3-stable/flutter/packages/flutter/lib/src/material/animated_icons.dart:10:8: Error: Not found: 'dart:ui' import 'dart:ui' show lerpDouble; ^ /D:/flutter_windows_2.0.3-stable/flutter/packages/flutter/lib/src/material/app.dart:5:8: Error: Not found: 'dart:ui' import 'dart:ui' as ui; ^ /D:/flutter_windows_2.0.3-stable/flutter/packages/flutter/lib/src/material/app_bar_theme.dart:5:8: Error: Not found: 'dart:ui' import 'dart:ui' show lerpDouble; ^ /D:/flutter_windows_2.0.3-stable/flutter/packages/flutter/lib/src/material/arc.dart:6:8: Error: Not found: 'dart:ui' import 'dart:ui' show lerpDouble; ^ /D:/flutter_windows_2.0.3-stable/flutter/packages/flutter/lib/src/material/bottom_app_bar_theme.dart:5:8: Error: Not found: 'dart:ui' import 'dart:ui' show lerpDouble; ^ /D:/flutter_windows_2.0.3-stable/flutter/packages/flutter/lib/src/material/bottom_navigation_bar_theme.dart:5:8: Error: Not found: 'dart:ui' import 'dart:ui' show lerpDouble; ^ /D:/flutter_windows_2.0.3-stable/flutter/packages/flutter/lib/src/material/bottom_sheet.dart:5:8: Error: Not found: 'dart:ui' import 'dart:ui' show lerpDouble; ^ /D:/flutter_windows_2.0.3-stable/flutter/packages/flutter/lib/src/material/bottom_sheet_theme.dart:5:8: Error: Not found: 'dart:ui'
import 'dart:ui' show lerpDouble; ^ /D:/flutter_windows_2.0.3-stable/flutter/packages/flutter/lib/src/material/button_bar_theme.dart:5:8: Error: Not found: 'dart:ui' import 'dart:ui' show lerpDouble;
this is the flutter doctor --verbose results: the build.gradle from the android folder the build.gradle from the app folder
flutter clean
and then add yourflutter doctor --verbose
results to your question. It's a bit difficult to help with the amount of information you've given, but I'll see what I can do after we get the doctor's results (and possibly a bit more of your code). – Eli FrontError: Not found:
errors, I am going to assume that the issue lies in the setup of your Flutter project (may want toflutter create
again) or in the flutter SDK you have installed. Try reinstalling flutter and/or recreating the project. – Eli Front