I recently worked on a project but now I've moved to other project and I've removed all boiler plate code from main.dart and add my own HomePage code. code is here:
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
debugShowCheckedModeBanner: false,
home: HomePage(),
);
}
}
class HomePage extends StatefulWidget {
@override
_HomePageState createState() => _HomePageState();
}
class _HomePageState extends State<HomePage> {
@override
Widget build(BuildContext context) {
return Scaffold(
body: Text("Hello"),
);
}
}
But when I RUN this code this throw this error which I've given on the title bar. Any Solution for this Thanks in Advance <3.