Quantcast
Channel: How to add add implements PreferredSizeWidget in stateful widget - Stack Overflow
Browsing latest articles
Browse All 4 View Live

Answer by Eric Aig for How to add add implements PreferredSizeWidget in...

For anybody having the same problem, this is what I didclass MyAppBar extends StatefulWidget implements PreferredSizeWidget { @override _MyAppBarState createState() => _MyAppBarState(); // you can...

View Article



Answer by meditat for How to add add implements PreferredSizeWidget in...

You can use PreferredSize for that, LikeScaffold( appBar: PreferredSize( preferredSize: Size.fromHeight(yourAppBarHeight), child:Container(child: Text("Body of your app bar") ) )If you want to separate...

View Article

Answer by Suman Maharjan for How to add add implements PreferredSizeWidget in...

Override preferredSize method and return Size using any constructor. @override Size get preferredSize => Size.fromHeight(50);

View Article

How to add add implements PreferredSizeWidget in stateful widget

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...

View Article
Browsing latest articles
Browse All 4 View Live




Latest Images