Skip to content

Instantly share code, notes, and snippets.

@lamberger
Created November 10, 2019 10:50
Show Gist options
  • Select an option

  • Save lamberger/6bda9ad2108f71828e7b628217fa287e to your computer and use it in GitHub Desktop.

Select an option

Save lamberger/6bda9ad2108f71828e7b628217fa287e to your computer and use it in GitHub Desktop.
DefaultTabController
Widget build(BuildContext context) {
return DefaultTabController(
length: 4,
child: Scaffold(
appBar: AppBar(
bottom: TabBar(
tabs: <Widget>[
Tab(text: 'Områden', icon: Icon(Icons.location_city)),
Tab(icon: Icon(Icons.directions_walk)),
Tab(icon: Icon(Icons.local_gas_station)),
Tab(icon: Icon(Icons.local_gas_station)),
],
),
title: Text('Information'),
),
body: TabBarView(
children: <Widget>[
Icon(Icons.location_city),
Icon(Icons.directions_walk),
Icon(Icons.local_gas_station),
Icon(Icons.local_gas_station),
],
),
),
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment