Hide format when exporting as JSON

This commit is contained in:
Hillel Coren 2022-05-29 11:59:16 +03:00
parent 2123b1684f
commit 5546ccefed
1 changed files with 21 additions and 19 deletions

View File

@ -135,26 +135,28 @@ class _ImportExportState extends State<ImportExport> {
.toList()), .toList()),
), ),
), ),
InputDecorator( if (_exportFormat == ImportType.csv)
decoration: InputDecorator(
InputDecoration(labelText: localization.exportType), decoration:
child: DropdownButtonHideUnderline( InputDecoration(labelText: localization.exportType),
child: DropdownButton<ExportType>( child: DropdownButtonHideUnderline(
isDense: true, child: DropdownButton<ExportType>(
value: _exportType, isDense: true,
onChanged: (dynamic value) { value: _exportType,
setState(() { onChanged: (dynamic value) {
_exportType = value; setState(() {
}); _exportType = value;
}, });
items: ExportType.values },
.map((importType) => DropdownMenuItem<ExportType>( items: ExportType.values
value: importType, .map((importType) =>
child: DropdownMenuItem<ExportType>(
Text(localization.lookup('$importType')))) value: importType,
.toList()), child: Text(localization
.lookup('$importType'))))
.toList()),
),
), ),
),
AppButton( AppButton(
iconData: MdiIcons.export, iconData: MdiIcons.export,
label: localization.export.toUpperCase(), label: localization.export.toUpperCase(),