Created
August 2, 2021 21:59
-
-
Save hectorAguero/0148d5cf861c88cc2bd521e53d9eb9c4 to your computer and use it in GitHub Desktop.
BehindNavbar example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:flutter/material.dart'; | |
final Color darkBlue = Color.fromARGB(255, 18, 32, 47); | |
void main() { | |
runApp(MyApp()); | |
} | |
class MyApp extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
return MaterialApp( | |
debugShowCheckedModeBanner: false, | |
home: MyWidget(), | |
); | |
} | |
} | |
class MyWidget extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
return Scaffold( | |
appBar: AppBar( | |
title: Text('title'), | |
), | |
floatingActionButtonLocation: FloatingActionButtonLocation.centerDocked, | |
floatingActionButton: FloatingActionButton( | |
onPressed: () { }, | |
tooltip: 'Increment', | |
child: Icon(Icons.add), | |
elevation: 2.0), | |
body: ListView.builder( | |
itemCount: 50, | |
itemBuilder: (context, index) => Container( | |
height: 100, | |
color: index % 2 == 0 ? Colors.white : Colors.grey.shade900)), | |
extendBody: true, | |
bottomNavigationBar: BottomAppBar( | |
child: Row( | |
mainAxisSize: MainAxisSize.max, | |
mainAxisAlignment: MainAxisAlignment.spaceBetween, | |
children: <Widget>[ | |
IconButton(icon: Icon(Icons.dangerous), onPressed: (){}), | |
IconButton(icon: Icon(Icons.dangerous), onPressed: (){}), | |
IconButton(icon: Icon(Icons.dangerous), onPressed: (){}), | |
IconButton(icon: Icon(Icons.dangerous), onPressed: (){}), | |
], | |
), | |
shape: CircularNotchedRectangle(), | |
color: Colors.blueGrey, | |
), | |
);} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment