Skip to content

Instantly share code, notes, and snippets.

@ijoschek
Last active April 8, 2019 13:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ijoschek/2aed80696d6eb14e8cd46bb015bc5faa to your computer and use it in GitHub Desktop.
Save ijoschek/2aed80696d6eb14e8cd46bb015bc5faa to your computer and use it in GitHub Desktop.
flutter_bnb_tut
import 'package:flutter/material.dart';
import 'package:flutter_bnb_tut/content.dart';
// ...
class _MainPageState extends State<MainPage> {
int _currentIndex = 0;
final List<Widget> _children = [
ContentPage(title: "Home Page"),
ContentPage(title: "Messages Page"),
ContentPage(title: "Profile Page")
];
void _onBottomNavBarTab(int index) {
setState(() {
_currentIndex = index;
});
}
@override
Widget build(BuildContext context) {
// ...
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment