Created
January 9, 2020 19:17
-
-
Save joramkimata/71c02917ec8637991012e9ef4187e03f to your computer and use it in GitHub Desktop.
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:fancy_bottom_navigation/fancy_bottom_navigation.dart'; | |
import 'package:flutter/material.dart'; | |
main() => runApp(MyApp()); | |
class MyApp extends StatefulWidget { | |
@override | |
State<StatefulWidget> createState() { | |
return _MyApp(); | |
} | |
} | |
class _MyApp extends State<MyApp> { | |
@override | |
Widget build(BuildContext context) { | |
return MaterialApp( | |
home: Scaffold( | |
appBar: AppBar( | |
title: Text("FAApApp"), | |
), | |
bottomNavigationBar: FancyBottomNavigation( | |
tabs: [ | |
TabData(iconData: Icons.home, title: "Home"), | |
TabData(iconData: Icons.search, title: "Search"), | |
TabData(iconData: Icons.shopping_cart, title: "Basket") | |
], | |
onTabChangedListener: (position) { | |
setState(() {}); | |
}, | |
), | |
), | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment