The method ‘build’ is always abstract in the supertype in Flutter


i trying to do rebuild my TabController screen every time in the flutter so for that i
need to add; inside the Widget build(BuildContext context) method. but I having an error during compile time

I received below error

The method 'build' is always abstract in the supertype. (Documentation)

Here is my code

class TrendingScreen extends StatefulWidget {
_TrendingScreenState createState() => _TrendingScreenState();

class _TrendingScreenState extends State<TrendingScreen> {

  Widget build(BuildContext context) {;

    return Scaffold(
        backgroundColor: colorSecondary,
        appBar: customAppbar(),
        body: Container(
            height: double.infinity,
            width: double.infinity,
            child: buildTrendingList()));


There is i missing an Add the mixin with AutomaticKeepAliveClientMixin to the state class then you can call the;

Leave a Reply

Your email address will not be published. Required fields are marked *