I don’t know what I did wrong here, everything was working well until I imported the ParishModel class and I started seeing some red lines. First was the CreateState() and when I hover around it, it says ‘ShowAllParishPage.createState’ (‘dynamic Function()’) isn’t a valid override of ‘StatefulWidget.createState’ (‘State Function()’). (Documentation)
The member being overridden (framework.dart:42) and the second error was from the State which says Try specifying a different superclass, or removing the extends clause. Please I need help on how to resolve it.
class ShowAllParishPage extends StatefulWidget {
const ShowAllParishPage({Key? key}) : super(key: key);
@override
State<ShowAllParishPage> createState() => _ShowAllParishPageState();
}
class _ShowAllParishPageState extends State<ShowAllParishPage> {
final Color color = Colors.blue.shade900.withOpacity(0.8);
int dataLength = 0;
bool fetchLoading = true;
ParishModel? parishModel;
@override
void initState() {
super.initState();
}
@override
Widget build(BuildContext context) {
return BlocBuilder<HomeBloc,HomeState>(builder: (context,state){
return Scaffold(
appBar: AppBar(
backgroundColor: Colors.blue.shade900.withOpacity(0.8),
),
);
});
}
}