I was writing a simple code but it gives an error.
this my code:
please help me guys 🙁
2
The Text Button itself is designed correctly. I think the error might be that you gave Scaffold a const. Remove Const before Scaffold .
remove const keyword before Scaffold
return Scaffold( body: Center( child: TextButton( onPressed: () { Navigator.pop(context); }, child: const Text("Go Back!"), ), ), );
Click here to cancel reply.
2
Answers
The Text Button itself is designed correctly. I think the error might be that you gave Scaffold a const. Remove Const before Scaffold .
remove const keyword before Scaffold