Skip to content

Instantly share code, notes, and snippets.

@kirshiyin89
Created September 30, 2020 12:31
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 kirshiyin89/23c7bb66c4480d7447dcfcba7abe4110 to your computer and use it in GitHub Desktop.
Save kirshiyin89/23c7bb66c4480d7447dcfcba7abe4110 to your computer and use it in GitHub Desktop.
build the tabbar view
@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