For separate appbar widget its must to add implements PreferredSizeWidget in class. Issue is that I see everyone uses it will StateLess Widget.
But I have a Stateful widget and wants to use it with that. How to add implement methods on Stateful widgets
When I add implements PreferredSizeWidget it gives error
class MyAppBar extends StatefulWidget implements PreferredSizeWidget {
@override
_MyAppBarState createState() => _MyAppBarState();
}
How can I fix it?