Advertisements
Show me problem when run the app
this my code :
https://codeshare.io/eV6dyl
add abstract before class Login
>Solution :
try this:
class Login extends StatefulWidget {
const Login({super.key});
@override
State<Login> createState() => _LoginState();
}
class _LoginState extends State<Login> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text("Login"),
),
body: Container(child: Text("Login")),
);
}
}
// Page Main.dart
void main(){
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context){
return const MaterialApp(
debugShowCheckedModeBanner: false,
home: Login(),
routes: {
},
);
}
}
you made a mistake here:
_LoginState creatState() => _LoginState();
it should be :
@override
State<Login> createState() => _LoginState();