I've started building a website using Flutter Web, but have come to the issue of being unable to create a persistent sidebar.
Do you know if there is a way to do so, either by somehow making AppBar vertical down the side, or by making a permanent drawer, like the one available in MDC Web?
My original idea was to have a Scaffold with this sidebar persisting across Navigator route changes. I tried playing with nested Navigators, but those didn't help me achieve my desired effect.
Thank you very much for your help
--Jakub
@override
Widget build(BuildContext context) {
return Row(
children: <Widget>[
SideLayout(),
Expanded(
flex: 4,
child: //your child
)])
}
// Side layout file
class SideLayout extends StatelessWidget {
const SideLayout({Key key}) : super(key: key);
@override
Widget build(BuildContext context) {
return Container(
child: Expanded(
child: Container(
padding: EdgeInsets.symmetric(horizontal: 20),
color: Color(0xff404040),
child: Column(
children: <Widget>[
SizedBox(height: 70),
Image.asset('assets/images/logo.png'),
Text(
'Build beautiful Apps',
textAlign: TextAlign.center,
style: TextStyle(
color: Colors.white,
fontSize: 30,
fontWeight: FontWeight.w400,
),
),
],
),
),
),
);
}
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With