Created
September 30, 2020 12:31
-
-
Save kirshiyin89/23c7bb66c4480d7447dcfcba7abe4110 to your computer and use it in GitHub Desktop.
build the tabbar view
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
@override | |
Widget build(BuildContext context) { | |
return MaterialApp( | |
title: _title, | |
home: DefaultTabController( | |
length: createTabs().length, | |
child: Builder(builder: (BuildContext context) { | |
return Scaffold( | |
appBar: AppBar( | |
title: const Text(_title), | |
centerTitle: true, | |
bottom: TabBar( | |
tabs: createTabs(), | |
), | |
), | |
body: TabBarView( | |
children: generateTabColumns(), | |
), | |
); | |
}))); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment