Skip to content

Instantly share code, notes, and snippets.

@hectorAguero
Created August 2, 2021 21:59
Show Gist options
  • Save hectorAguero/0148d5cf861c88cc2bd521e53d9eb9c4 to your computer and use it in GitHub Desktop.
Save hectorAguero/0148d5cf861c88cc2bd521e53d9eb9c4 to your computer and use it in GitHub Desktop.
BehindNavbar example
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