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()),
),
),
InputDecorator(
decoration:
InputDecoration(labelText: localization.exportType),
child: DropdownButtonHideUnderline(
child: DropdownButton<ExportType>(
isDense: true,
value: _exportType,
onChanged: (dynamic value) {
setState(() {
_exportType = value;
});
},
items: ExportType.values
.map((importType) => DropdownMenuItem<ExportType>(
value: importType,
child:
Text(localization.lookup('$importType'))))
.toList()),
if (_exportFormat == ImportType.csv)
InputDecorator(
decoration:
InputDecoration(labelText: localization.exportType),
child: DropdownButtonHideUnderline(
child: DropdownButton<ExportType>(
isDense: true,
value: _exportType,
onChanged: (dynamic value) {
setState(() {
_exportType = value;
});
},
items: ExportType.values
.map((importType) =>
DropdownMenuItem<ExportType>(
value: importType,
child: Text(localization
.lookup('$importType'))))
.toList()),
),
),
),
AppButton(
iconData: MdiIcons.export,
label: localization.export.toUpperCase(),