Skip to content

Instantly share code, notes, and snippets.

@tirth-aubergine
Created December 6, 2019 08:36
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 tirth-aubergine/7ead2a17e040e9813f1e0eba05dba1d0 to your computer and use it in GitHub Desktop.
Save tirth-aubergine/7ead2a17e040e9813f1e0eba05dba1d0 to your computer and use it in GitHub Desktop.
HomeScreen - appBar bottom Dropdown
AppBar(
title: Text('Holden'),
elevation: 0,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.only(
bottomRight: Radius.circular(50),
bottomLeft: Radius.circular(50),
),
),
centerTitle: true,
bottom: homeProvider.xlsxFilePath != null
? PreferredSize(
preferredSize: Size.fromHeight(60),
child: Container(
margin: EdgeInsets.symmetric(horizontal: 60),
child: DropdownButtonFormField(
value: homeProvider.xlsxFileSelectedTable,
onChanged: (newXlsxFileSelectedTable) {
homeProvider.xlsxFileSelectedTable =
newXlsxFileSelectedTable;
},
items: [
...homeProvider.xlsxFileTables.keys.map(
(table) => DropdownMenuItem(
child: Text(table),
value: table,
),
),
],
),
),
)
: PreferredSize(
child: Container(),
preferredSize: Size.fromHeight(0),
),
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment