floating_navbar 1.1.1 floating_navbar: ^1.1.1 copied to clipboard
Customisable bottom floating navbar.
import 'package:floating_navbar/floating_navbar.dart';
import 'package:flutter/material.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
// This widget is the root of your application.
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',
theme: ThemeData(
primarySwatch: Colors.blue,
visualDensity: VisualDensity.adaptivePlatformDensity,
),
home: FloatingNavBar(
color: Colors.purple,
pages: <Widget>[HomePage(), MyPage()],
icons: [
Icon(
Icons.home,
color: Colors.white,
),
Icon(
Icons.account_circle,
color: Colors.white,
)
],
iconColor: Colors.red,
hapticFeedback: true,
horizontalPadding: 40,
),
);
}
}
class HomePage extends StatefulWidget {
@override
_HomePageState createState() => _HomePageState();
}
class _HomePageState extends State<HomePage> {
@override
Widget build(BuildContext context) {
return Container(
child: Center(
child: Text(
"iamngoni made it👏",
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: 18,
),
),
),
);
}
}
class MyPage extends StatefulWidget {
@override
_MyPageState createState() => _MyPageState();
}
class _MyPageState extends State<MyPage> {
@override
Widget build(BuildContext context) {
return Container(
child: Center(
child: Text(
"iamngoni is cool😎",
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: 18,
),
),
),
);
}
}