Home > Mobile >  Error when i called the widget inside view class
Error when i called the widget inside view class

Time:08-24

enter image description here

CodePudding user response:

You have used _ while creating class that refers to a private class so you can not use a private class as publically any other files so use like this :

class AllFieldsForm extends StatefulWidget {
  const AllFieldsForm({Key? key}) : super(key: key);

  @override
  _AllFieldsForm createState() => _AllFieldsForm();

}

class _AllFieldsForm extends State<AllFieldsForm> {
@override
Widget build(BuildContext context){
  return Scaffold();
}
}
  • Related